/* TunerPal site: base, nav, buttons, hero type, phone frames and the overview.
   Type follows the app: Raleway (bundled in the app, OFL) for the wordmark and headings,
   the platform sans for text and the platform monospace for readouts, like the app's FREQ/CENTS boxes. */
@font-face {
  font-family: "Raleway";
  src: url("fonts/raleway-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("fonts/raleway-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --display: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --r: 16px;
  --r-lg: 24px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body { /* overflow on body only: it passes to the viewport, so body never becomes a scroll container
          (that would break the sticky nav and the scroll-driven reveals) */
  overflow-x: hidden;
  font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--sub); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .4s, color .4s;
}
img { display: block; max-width: 100%; height: auto; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(var(--accent-rgb), .35); color: var(--text); }
h1, h2, h3 { font-family: var(--display); color: var(--text); font-weight: 700; letter-spacing: -.01em; line-height: 1.12; text-wrap: balance; }
strong { color: var(--text); font-weight: 600; }
p, li, figcaption { text-wrap: pretty; }
.mono, code { font-family: var(--mono); }
code { font-size: .88em; color: var(--text); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 600;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: var(--nav-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(150%) blur(16px); backdrop-filter: saturate(150%) blur(16px);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.wordmark:hover { color: var(--text); }
.wordmark svg { width: 30px; height: 30px; flex: none; }
/* the app's fork mark (ic_launcher_foreground), tinted with the theme accent as in the app's header */
.fork .t { fill: none; stroke: var(--accent); stroke-width: 3.4; stroke-linecap: round; }
.fork .w { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-linecap: round; opacity: .45; }
.fork .d { fill: var(--accent); opacity: .7; }
.wordmark .name, .tp {
  font-family: var(--display); font-weight: 600; letter-spacing: .1em;
  background: var(--wordmark); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark .name { font-size: 1.2rem; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: .9rem; }
.nav-links a { position: relative; padding: 6px 0; color: var(--sub); }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a[aria-current="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .7);
}
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-3); background: var(--surface); color: var(--text);
  font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: border-color .2s, background-color .2s;
}
.theme-toggle:hover { border-color: var(--accent-2); }
html:not(.js) .theme-toggle { display: none; }
.theme-toggle i { width: 9px; height: 9px; border-radius: 50%; background: var(--in-tune); box-shadow: 0 0 8px rgba(var(--in-tune-rgb), .8); }
.nav .btn { flex: none; }

/* ── Buttons: the primary is the app's START TUNING pill ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px;
  border-radius: 999px; border: 0; font: inherit; font-size: .9rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s;
}
.btn-primary {
  color: var(--cta-ink); background: var(--cta);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 14px 34px -14px rgba(var(--accent-rgb), .9), 0 0 46px -12px rgba(var(--accent-rgb), .55);
}
.btn-primary:hover {
  color: var(--cta-ink); transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 18px 40px -12px rgba(var(--accent-rgb), 1), 0 0 64px -10px rgba(var(--accent-rgb), .7);
}
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--accent-2); }
.btn-ghost:hover { color: var(--text); background: rgba(var(--accent-2-rgb), .14); }
.btn-sm { height: 38px; padding: 0 16px; font-size: .74rem; }
.btn .sep { opacity: .55; }
.btn svg { width: 16px; height: 16px; }

/* ── Hero copy (the stage and the gauge are in motion.css) ── */
.hero-copy { position: relative; text-align: center; max-width: 940px; margin: 0 auto; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-3); background: rgba(0, 0, 0, .25);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sub);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--in-tune); flex: none;
  box-shadow: 0 0 0 4px rgba(var(--in-tune-rgb), .15), 0 0 12px rgba(var(--in-tune-rgb), .9);
}
.hero h1 { margin-top: 18px; font-size: clamp(3.4rem, 10.5vw, 7.8rem); font-weight: 600; letter-spacing: .06em; line-height: 1; }
.hero h1 .tp { letter-spacing: inherit; padding: 0 .02em; text-shadow: none; filter: drop-shadow(0 0 28px rgba(var(--accent-rgb), .28)); }
.hero-tag {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px;
  font-family: var(--display); font-size: .78rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--label);
}
.hero-tag::before, .hero-tag::after { content: ""; width: 32px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-2)); }
.hero-tag::after { transform: scaleX(-1); }
.hero-sub { margin-top: 18px; font-size: clamp(1.2rem, 2.4vw, 1.65rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.3; color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 24px; list-style: none;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: var(--sub);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ── Phone frame around a real screenshot ─────────────────── */
.phone {
  position: relative; width: 100%; max-width: 340px; margin: 0 auto; padding: 10px; border-radius: 44px;
  background: linear-gradient(160deg, #2a2a2c, #0b0b0c 45%, #1c1c1e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 50px 100px -40px rgba(0, 0, 0, .95), 0 30px 90px -40px rgba(var(--accent-rgb), .55);
}
.phone img { width: 100%; border-radius: 34px; background: var(--bg-well); aspect-ratio: 720 / 1238; object-fit: cover; }
.phone::after { /* glass highlight */
  content: ""; position: absolute; inset: 10px; border-radius: 34px; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .07), transparent 32%);
}
.phone.sm { max-width: 250px; padding: 8px; border-radius: 36px; }
.phone.sm img, .phone.sm::after { border-radius: 28px; }
.phone.sm::after { inset: 8px; }
.show-stage { display: none; }
:root[data-theme="stage"] .show-stage { display: block; }
:root[data-theme="stage"] .show-classic { display: none; }

/* ── Overview: the app beside a summary and its key numbers ── */
.overview { position: relative; z-index: 1; padding-top: clamp(40px, 6vw, 80px); }
.overview-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 90px); align-items: center; }
.overview .glow {
  position: absolute; inset: 8% 4%; z-index: -1; filter: blur(70px); opacity: .7; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 45%, rgba(var(--accent-rgb), .45), transparent 70%);
}
.overview figure { position: relative; isolation: isolate; }
.overview figcaption { margin-top: 16px; text-align: center; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--muted); }
.overview-lead { font-size: clamp(1.15rem, 1.9vw, 1.38rem); line-height: 1.55; color: var(--text); letter-spacing: -.005em; }
.overview .label + .overview-lead { margin-top: 16px; }
.overview-lead + p { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 32px; list-style: none; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--glass); }
.stats li { padding: 20px 22px; border-top: 1px solid var(--line); }
.stats li:nth-child(-n+2) { border-top: 0; }
.stats li:nth-child(even) { border-left: 1px solid var(--line); }
.stats .v { font-family: var(--mono); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -.03em; color: var(--text); line-height: 1.15; }
.stats .v small { margin-left: 4px; font-size: .5em; letter-spacing: 0; color: var(--sub); }
.stats .k { margin-top: 6px; font-size: .88rem; line-height: 1.4; }
