/* EveryDex site — brand colors mirror app/src/main/java/com/pkhomedex/ui/Palette.java */

:root {
  --teal: #14b8a6;
  --teal-bright: #2cc5be;
  --bg: #0a1211;
  --surface: #0d161b;
  --surface-2: #122023;
  --hairline: rgba(255, 255, 255, 0.10);
  --ink: #f2f7f5;
  --muted: #9fb4b1;
  --faint: #6d8481;
  --maxw: 960px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--teal-bright); }
a:hover { color: var(--teal); }

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

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: rgba(13, 22, 27, 0.9);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  z-index: 10;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
}

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

.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  /* A 44px-tall tap target; the negative margin keeps the header's height. */
  padding: 10px 0;
  margin: -10px 0;
}

.site-header nav a:hover { color: var(--teal-bright); }

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

.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--hairline);
  background:
    radial-gradient(900px 380px at 50% -140px, rgba(20, 184, 166, 0.16), transparent 70%);
  text-align: center;
}

.hero img.app-icon {
  width: 92px;
  height: 92px;
  border-radius: 21px;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero .tagline {
  margin: 0 auto;
  max-width: 620px;
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--muted);
}

/* The app's tagline, under the hero copy. */
.hero .motto {
  margin: 14px 0 18px;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 700;
  color: var(--teal-bright);
}

.badge {
  display: inline-block;
  margin-top: 22px;
  line-height: 0;
}

.badge img {
  height: 80px;
  width: auto;
  transition: opacity 0.15s ease;
}

.badge:hover img { opacity: 0.85; }

/* ---- sections ---- */

section { padding: 64px 0; }

/* Clears the sticky header when a nav link jumps to a section. */
section[id] { scroll-margin-top: 64px; }

section + section { border-top: 1px solid var(--hairline); }

h2 {
  font-size: clamp(24px, 3.6vw, 31px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h3 { font-size: 19px; margin: 32px 0 8px; }

.lede {
  color: var(--muted);
  max-width: 700px;
  margin: 0 0 36px;
}

/* Each sentence of a lede takes its own line when both will not fit on one. */
.lede .line { display: inline-block; }

/* ---- feature rows: copy on one side, screenshots on the other ---- */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 52px 0;
}

.feature-row + .feature-row,
.snapshot + .feature-row { border-top: 1px solid var(--hairline); }

/* Flips the art to the left so the rows alternate down the page. */
.feature-row.flip .feature-art { order: -1; }

/* A text-only row: no screenshot, so the copy takes the full width. */
.feature-row.solo { grid-template-columns: 1fr; }

.feature-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(21px, 2.8vw, 26px);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.feature-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 16.5px;
}

.feature-art {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

/* The framed Play Store shots (9:16, dark ground, headline, phone bezel). */
.feature-art img {
  width: 100%;
  max-width: 400px;
  min-width: 0;
  height: auto;
  display: block;
  border: 1px solid var(--hairline);
  border-radius: 16px;
}

/* Two shots share a column, so neither can claim the full width. */
.feature-art.pair img { max-width: 206px; }

/* ---- the exported dex snapshot, shown at its own size ---- */

.snapshot {
  margin: 0;
  padding: 8px 0 52px;
  text-align: center;
}

.snapshot img {
  width: 100%;
  max-width: 440px;
  height: auto;
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

.snapshot figcaption {
  color: var(--faint);
  font-size: 14.5px;
  margin-top: 14px;
}

/* ---- insights ---- */

.insights {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  max-width: 640px;
}

.insights li {
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  color: var(--ink);
  font-size: 16.5px;
}

.insights li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 23px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

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

/* ---- hero eyebrow and the line under the badge ---- */
.hero .eyebrow {
  margin: 0 0 16px;
  color: var(--teal-bright);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero .under-badge { margin: 14px 0 0; color: var(--faint); font-size: 15px; }

/* How it works: a real three-step sequence, so the numbers carry meaning. */
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 14px; padding: 22px 22px 20px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal); color: #05201c;
  font-weight: 700; font-size: 15px; margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* FAQ: definition list, questions as headings for the FAQPage schema to match. */
.faq { max-width: 720px; margin: 8px 0 0; }
.faq dt { font-weight: 600; font-size: 18px; padding-top: 22px; border-top: 1px solid var(--hairline); margin-top: 22px; }
.faq dt:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.faq dd { margin: 8px 0 0; color: var(--muted); }

@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---- legal / policy pages ---- */

.doc { padding: 56px 0 72px; }

.doc h1 { font-size: clamp(28px, 5vw, 38px); margin: 0 0 6px; }

.doc .effective {
  color: var(--faint);
  font-size: 15px;
  margin: 0 0 36px;
}

.doc h2 {
  font-size: 21px;
  margin: 40px 0 10px;
  padding-top: 4px;
}

.doc p, .doc li { color: var(--ink); }

.doc ul { padding-left: 22px; }

.doc li { margin-bottom: 8px; }

.callout {
  background: var(--surface-2);
  border-left: 3px solid var(--teal);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 15.5px;
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 44px 0 56px;
  color: var(--faint);
  font-size: 14.5px;
}

.site-footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.site-footer nav a { text-decoration: none; padding: 10px 0; margin: -10px 0; }

.site-footer p { margin: 0 0 10px; max-width: 720px; }

@media (max-width: 760px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0;
  }
  /* Art always follows its copy once the row stacks. */
  .feature-row.flip .feature-art { order: 0; }
  /* The header wraps to two rows here. */
  section[id] { scroll-margin-top: 88px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 48px; }
  section { padding: 48px 0; }
}

/* ---- coming soon (in place of the Play badge until EveryDex is live) ---- */

.hero .coming-soon {
  display: inline-block;
  margin: 8px 0 0;
  padding: 12px 22px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--teal-bright);
  font-weight: 700;
}

/* ---- the "PKHomeDex is now EveryDex" popup (site.js, ?from=pkhomedex) ---- */

dialog.moved {
  width: min(460px, calc(100vw - 32px));
  padding: 28px 24px 22px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: center;
}

dialog.moved::backdrop { background: rgba(0, 0, 0, 0.6); }

dialog.moved img { width: 64px; height: 64px; border-radius: 15px; }

dialog.moved h2 { margin: 12px 0 8px; font-size: 22px; line-height: 1.3; }

dialog.moved p { margin: 0 0 12px; color: var(--muted); font-size: 16px; }

dialog.moved form { margin: 18px 0 0; }

dialog.moved button {
  min-height: 44px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #062420;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

dialog.moved button:hover { background: var(--teal-bright); }

/* ---- language switcher (footer) ---- */

.site-footer .langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 16px;
}

.site-footer .langs a { color: var(--muted); }
.site-footer .langs a[aria-current="true"] { color: var(--ink); font-weight: 700; }
