/* EQBase: eqbase.app
   Apple-style product page. Follows the system appearance (dark when unset — matches the app's
   UI); an explicit choice via .theme-toggle is stored and wins (theme.js + the inline head
   snippet set html[data-theme="light"]). SF (system stack) type with tight display tracking,
   Apple blue as the single action color, real app screenshots as the imagery.
   Doc pages (/privacy /terms …) share .nav/.doc/.footer. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-alt: #161617;
  --bg-dark: #0b0b0d;              /* the interactive-EQ band, constant in both themes */
  --text: #f5f5f7;
  --text-dark-bg: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --hairline: #424245;
  --hairline-dark: rgba(255, 255, 255, 0.14);
  --blue: #2997ff;                 /* links, eyebrows, accents */
  --btn: #0071e3;                  /* filled buttons, constant in both themes */
  --btn-hover: #0077ed;
  --card: #1d1d1f;                 /* bento cards on the page background */
  --card-on-alt: #1d1d1f;          /* bento cards inside .section.alt */
  --plan-bg: #1d1d1f;
  --nav-bg: rgba(22, 22, 23, 0.72);
  --nav-border: rgba(255, 255, 255, 0.10);
  --nav-link: rgba(245, 245, 247, 0.8);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --hairline: #d2d2d7;
  --blue: #0071e3;
  --card: #f5f5f7;
  --card-on-alt: #ffffff;
  --plan-bg: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --nav-border: rgba(0, 0, 0, 0.08);
  --nav-link: rgba(29, 29, 31, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 300ms ease, color 300ms ease;
  /* short pages (support, 404, …) still pin the footer to the viewport bottom */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.wrap { max-width: 1024px; margin: 0 auto; padding: 0 22px; }
.wrap.wide { max-width: 1180px; }

/* ---- nav: translucent, sticky, full-bleed ---- */

.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--nav-border);
  transition: background-color 400ms ease, border-color 400ms ease;
}
/* scroll edge effect: the material appears only once content scrolls under the bar */
.nav.top { background: transparent; border-bottom-color: transparent; }
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.nav-inner {
  max-width: 1024px; margin: 0 auto; padding: 0 22px;
  height: 52px;
  display: flex; align-items: center; gap: 12px;
}
.nav .brand {
  display: flex; align-items: center; gap: 9px;
  color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
.nav .brand:hover { text-decoration: none; }
.nav .brand img { width: 26px; height: 26px; }
.nav .links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 13px; }
.nav .links a { color: var(--nav-link); }
.nav .links a:hover { color: var(--text); text-decoration: none; }

/* theme toggle: shows a sun in dark mode (tap for light), a moon in light mode */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--nav-link);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.theme-toggle:hover { color: var(--text); background: var(--nav-border); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---- buttons ---- */

.btn {
  display: inline-block;
  background: var(--btn);
  color: #fff;
  font-weight: 500;
  border: 0; border-radius: 980px;
  padding: 12px 24px;
  font-size: 17px;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}
.btn:hover { text-decoration: none; background: var(--btn-hover); }
.btn:active { transform: scale(0.97); }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.ghost {
  background: transparent; color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.btn.ghost:hover { background: var(--btn); color: #fff; box-shadow: inset 0 0 0 1px var(--btn); }

.more { font-size: 17px; white-space: nowrap; }
.more::after { content: " ›"; }
.more:hover { text-decoration: underline; }

/* ---- section rhythm ---- */

.section { padding: 110px 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--bg-dark); color: var(--text-dark-bg); }

.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--blue);
}
.section.dark .eyebrow { color: #2997ff; }

.section h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  font-weight: 700;
  margin: 8px 0 0;
}
.section .lede {
  margin-top: 18px;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.42;
  color: var(--muted);
  max-width: 640px;
}
.section.dark .lede { color: #a1a1a6; }

.section-head { text-align: center; }
.section-head .lede { margin-left: auto; margin-right: auto; }

/* legal footnote-style small print */
.fineprint { font-size: 12px; color: var(--faint); }

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

.hero { padding: 88px 0 110px; text-align: center; }
.hero h1 {
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 880px;
  margin: 10px auto 0;
}
.hero .lede {
  margin: 22px auto 0;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.4;
  color: var(--muted);
  max-width: 660px;
}
.hero .cta {
  margin-top: 34px;
  display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap;
}
.hero .fineprint { margin-top: 18px; }

.hero-shot {
  margin: 64px auto 0;
  max-width: 1080px;
  padding: 0 22px;
}
.hero-shot img {
  width: 100%;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.22));
}
/* on black, a hairline of light separates the dark window from the page */
html:not([data-theme="light"]) .hero-shot img,
html:not([data-theme="light"]) .shot-window img,
html:not([data-theme="light"]) .shot-popover img {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.28)) drop-shadow(0 30px 60px rgba(0, 0, 0, 0.65));
}

/* stats strip under the hero */
.stats {
  margin: 88px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  max-width: 980px; padding: 0 22px;
  text-align: center;
}
.stats .n {
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 700; letter-spacing: -0.015em;
  line-height: 1.1;
  white-space: nowrap;
}
.stats .l { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* ---- split feature (text + image side by side) ---- */

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center;
}
.split .lede { font-size: 19px; }
.split ul.points { list-style: none; margin-top: 22px; }
.split ul.points li {
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 15px; color: var(--muted);
}
.split ul.points li:last-child { border-bottom: 1px solid var(--hairline); }
.split ul.points strong { color: var(--text); font-weight: 600; }

.shot-popover { display: flex; justify-content: center; }
.shot-popover img {
  width: min(320px, 80%);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}
.shot-window img { filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.22)); }

/* ---- the interactive EQ (dark band) ---- */

.graph-card {
  margin-top: 56px;
  background: #161618;
  border: 1px solid var(--hairline-dark);
  border-radius: 20px;
  padding: 12px 12px 4px;
}
.graph-card svg { display: block; width: 100%; height: auto; }
.graph-card .caption {
  font-family: var(--mono); font-size: 12px; color: #86868b;
  padding: 8px 12px 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.band { cursor: grab; touch-action: none; }
.band.dragging { cursor: grabbing; }
.band-dot {
  transform-box: fill-box; transform-origin: center;
  transition: transform 150ms ease;
  pointer-events: none;
}
.band:hover .band-dot,
.band:focus-visible .band-dot,
.band.dragging .band-dot { transform: scale(1.35); }
.eq-tip {
  fill: #d5d5da; font-family: var(--mono); font-size: 12px;
  opacity: 0; transition: opacity 150ms ease;
  pointer-events: none;
}
.eq-tip.show { opacity: 1; }

/* ---- bento feature grid ---- */

.bento {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.bcard {
  background: var(--card);
  border-radius: 24px;
  padding: 30px 30px 0;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.section.alt .bcard { background: var(--card-on-alt); }
.bcard.pad { padding-bottom: 30px; }
.bcard .k {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint);
}
.bcard .k.pro { color: var(--blue); }
.bcard h3 { font-size: 21px; letter-spacing: -0.01em; margin: 8px 0 6px; }
.bcard p { font-size: 15px; color: var(--muted); }
.bcard .shot {
  margin: 26px -6px 0;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.14);
}
.bcard .shot img { width: 100%; height: 300px; object-fit: cover; object-position: 62% 0; }
/* mini rule list inside the Auto Switch card: trigger → preset */
.mini-rules { margin-top: auto; padding-top: 26px; }
.mini-rules .rule {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 13px; color: var(--text);
}
.mini-rules .arr { color: var(--faint); }
.mini-rules .dst {
  margin-left: auto;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 980px;
  white-space: nowrap;
}

.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: span 4; }
.span6 { grid-column: span 6; }

.alsoline {
  margin: 40px auto 0; text-align: center;
  font-size: 15px; color: var(--faint); max-width: 760px;
}

/* ---- compare table ---- */

.compare { margin-top: 56px; }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; }
.compare thead th {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
  border-bottom: 1px solid var(--text);
}
.compare th.c, .compare td.c { text-align: center; width: 110px; }
.compare tbody tr { border-bottom: 1px solid var(--hairline); }
.compare .yes { color: var(--text); font-weight: 600; }
.compare td.c.yes:last-child { color: var(--blue); }
.compare .no { color: var(--hairline); }

/* ---- pricing ---- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.plan {
  position: relative;
  background: var(--plan-bg);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 30px 26px 26px;
  display: flex; flex-direction: column; gap: 8px;
  text-align: center;
}
.plan.best { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.plan .flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--btn); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  padding: 4px 12px; border-radius: 980px;
  white-space: nowrap;
}
.plan h3 { font-size: 17px; font-weight: 600; }
.plan .price { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.plan p { font-size: 14px; color: var(--muted); flex: 1; }
.plan .devices { font-size: 12px; color: var(--faint); }
.plan .btn, .plan .btn.ghost { margin-top: 10px; }
.buynote {
  margin: 36px auto 0; text-align: center;
  font-size: 14px; color: var(--faint); max-width: 620px;
}

/* ---- FAQ ---- */

.faq { margin: 48px auto 0; max-width: 720px; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; padding: 22px 4px; font-weight: 600; font-size: 17px;
  list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--faint); font-weight: 300; font-size: 24px; line-height: 1;
  display: inline-block;
  transition: transform 260ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 4px 24px; color: var(--muted); font-size: 15px; }

/* ---- doc pages (privacy / terms / …) ---- */

.doc { max-width: 680px; margin: 0 auto; padding: 56px 22px 96px; }
.doc .tick, .tick {
  font-size: 13px; font-weight: 600; color: var(--blue);
}
.doc h1 { font-size: 40px; letter-spacing: -0.02em; line-height: 1.1; margin: 10px 0 6px; }
.doc .updated { font-size: 13px; color: var(--faint); }
.doc h2 { font-size: 21px; margin: 40px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--muted); font-size: 16px; margin-bottom: 10px; }
.doc ul { padding-left: 22px; margin: 8px 0; }
.doc strong { color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.doc th, .doc td { border-bottom: 1px solid var(--hairline); padding: 10px 12px; text-align: left; }
.doc th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--faint); border-bottom-color: var(--text);
}

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

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  padding: 24px 0 40px;
  font-size: 12px; color: var(--faint);
}
.footer .wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); text-decoration: none; }
.footer .spacer { flex: 1; }

/* ---- scroll reveal (JS adds .reveal; guarded for reduced motion) ---- */

.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---- responsive ---- */

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span2, .span3, .span4, .span6 { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 620px) {
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 72px; }
  .nav .links a:not(.btn) { display: none; }
  .bento { grid-template-columns: 1fr; }
  .span2, .span3, .span4, .span6 { grid-column: span 1; }
  .bcard .shot img { height: 220px; }
  .compare th.c, .compare td.c { width: 64px; padding: 12px 8px; }
}
