/* ==========================================================================
   AI File Renamer — landing page styles
   Palette: the SHIPPED app theme (app/src/jvmMain/kotlin/dev/filerenamer/app/ui/Theme.kt,
   "Paper & Ink 2.0"). Older design files carry competing teals — Theme.kt wins so the
   page matches what a visitor sees after install. See README.md.
   No external requests: system font stack, local assets only.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* light — Theme.kt lightScheme */
  --paper: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --ink: #1a1916;
  --muted: #6b675f;
  --outline: #e3e0d9;
  --hairline: #f0eee9;
  --primary: #0e7a74;
  --primary-text: #0a5f5a; /* small text on paper: 6.89:1 */
  --on-primary: #ffffff;
  --primary-tint: #e3f1ef;
  --accent: #b97d14;
  --accent-text: #8a5d0e; /* small text on paper: 5.27:1 */
  --shadow: 0 1px 2px rgba(26, 25, 22, 0.05), 0 8px 24px rgba(26, 25, 22, 0.06);
  --shadow-sm: 0 1px 2px rgba(26, 25, 22, 0.06);

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Segoe UI Variable Text",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* dark — Theme.kt darkScheme */
    --paper: #141311;
    --surface: #1e1c19;
    --surface-2: #191815;
    --ink: #ece9e2;
    --muted: #9a958a;
    --outline: #2c2a25;
    --hairline: #262420;
    --primary: #3fb7ae;
    --primary-text: #3fb7ae; /* 7.60:1 on paper */
    --on-primary: #0e2523;
    --primary-tint: #26312e;
    --accent: #d9a94a;
    --accent-text: #d9a94a; /* 8.60:1 on paper */
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.32);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

/* --------------------------------------------------------------- base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-text);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.125rem);
  font-weight: 700;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 20;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lede {
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  color: var(--muted);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-text);
  margin: 0 0 0.75rem;
}

section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
  border-top: 1px solid var(--hairline);
}

section > .wrap > h2 {
  max-width: 22ch;
}

.section-intro {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ------------------------------------------------------------- header ---- */

.site-header {
  border-bottom: 1px solid var(--outline);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(1.4) blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.0625rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  align-items: center;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* --------------------------------------------------------------- hero ---- */

.hero {
  border-top: 0;
  padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 7vw, 4.5rem);
  text-align: center;
}

.hero .wrap > * {
  margin-inline: auto;
}

.hero h1 {
  max-width: 18ch;
}

.hero .lede {
  max-width: 58ch;
}

.badge-offline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-tint);
  color: var(--primary-text);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.badge-offline svg {
  width: 15px;
  height: 15px;
}

/* ----------------------------------------------------------------- cta --- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, #000);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--outline);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn:active {
  transform: translateY(1px);
}

/* placeholder CTAs — no URL exists yet (see HTML comments) */
.btn[disabled] {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--outline);
  box-shadow: none;
  cursor: not-allowed;
}

.btn[disabled]:active {
  transform: none;
}

.btn[disabled]::after {
  content: "soon";
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--outline);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.cta-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------------------------------------------------------- rename card -- */

.demo {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
  max-width: 860px;
}

.demo-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.demo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
}

.demo-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.demo-rows li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hairline);
}

.demo-rows li:last-child {
  border-bottom: 0;
}

.fname {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.fname-old {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--muted) 55%, transparent);
}

.fname-new {
  color: var(--ink);
  font-weight: 600;
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
}

.fname-new svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
  flex: none;
  transform: translateY(1px);
}

.demo-foot {
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (min-width: 720px) {
  .demo-rows li {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 1.25rem;
  }
}

/* ------------------------------------------------------------ problem ---- */

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  margin-top: 0;
}

.panel p:last-child {
  margin-bottom: 0;
}

.filelist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.filelist li {
  padding: 0.28rem 0;
  border-bottom: 1px dashed var(--hairline);
}

.filelist li:last-child {
  border-bottom: 0;
}

.panel--promise {
  background: var(--primary-tint);
  border-color: color-mix(in srgb, var(--primary) 25%, transparent);
}

/* ----------------------------------------------------------- features ---- */

.grid-features {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .grid-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .grid-features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.feature h3 {
  margin-bottom: 0.4rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary-tint);
  color: var(--primary-text);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

/* --------------------------------------------------------------- steps --- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1rem;
  margin: 2.25rem 0 0;
  padding: 0;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--outline);
  color: var(--accent-text);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.steps h3 {
  margin-bottom: 0.35rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------- privacy --- */

.privacy-band {
  background: var(--primary-tint);
  border-top: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}

.privacy-band .wrap {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

@media (min-width: 860px) {
  .privacy-band .wrap {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.checks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.7rem;
  align-items: start;
  font-size: 0.9375rem;
}

.checks svg {
  width: 22px;
  height: 22px;
  color: var(--primary-text);
  margin-top: 1px;
}

.checks strong {
  display: block;
}

.checks span {
  color: var(--muted);
}

/* --------------------------------------------------------- screenshots --- */

.shot {
  margin: 2.25rem 0 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.shot figcaption {
  margin-top: 0.7rem;
  max-width: 60ch;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ----------------------------------------------------------------- faq --- */

.faq {
  display: grid;
  gap: 1.5rem 2.5rem;
  margin-top: 2.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .faq {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.faq h3 {
  margin-bottom: 0.35rem;
}

.faq p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* -------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--outline);
  background: var(--surface-2);
  padding-block: 2.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer p {
  margin: 0;
}

/* ------------------------------------------------------- legal (privacy) - */

.legal {
  padding-block: clamp(2.5rem, 7vw, 4rem);
  border-top: 0;
}

.legal .wrap {
  max-width: 760px;
}

.legal h2 {
  font-size: 1.375rem;
  margin-top: 2.25rem;
}

.legal h2:first-of-type {
  margin-top: 1.5rem;
}

.legal ul {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal .meta {
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--outline);
}

.legal th {
  background: var(--surface-2);
}

.table-scroll {
  overflow-x: auto;
}

.callout {
  background: var(--primary-tint);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------- a11y ---- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
