/* =========================================================
   My Pocket Guitar Tuner — Landing
   Aesthetic: warm & musical. Deep navy stage, amber guitar
   glow, purple tuning-fork accent, green "in tune" signal.
   Type: Fraunces (display) + Hanken Grotesk (body).
   ========================================================= */

:root {
  --navy: #1a1d2e;
  --navy-deep: #13151f;
  --navy-card: #21243a;
  --amber: #f06a3c;
  --amber-soft: #f8a05a;
  --purple: #9b6dff;
  --green: #3ddc84;
  --text: #f4f1ea;
  --muted: #a3a6b8;
  --line: rgba(255, 255, 255, 0.08);

  --maxw: 1120px;
  --radius: 20px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Atmospheric backdrop — warm glow top, purple wash, grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 78% -8%, rgba(240, 106, 60, 0.22), transparent 60%),
    radial-gradient(700px 500px at 8% 12%, rgba(155, 109, 255, 0.16), transparent 55%),
    var(--navy);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
section { position: relative; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-soft);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--amber-soft);
}

/* ---------- Buttons ---------- */
.badge-link { display: inline-block; transition: transform 0.3s var(--ease); }
.badge-link:hover { transform: translateY(-3px); }
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  background: var(--text);
  color: var(--navy-deep);
  border-radius: 14px;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.appstore-badge:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5); }
.appstore-badge svg { width: 26px; height: 26px; }
.appstore-badge .small { font-size: 0.66rem; line-height: 1; opacity: 0.7; font-weight: 500; display: block; }
.appstore-badge .big { font-size: 1.18rem; line-height: 1.1; font-family: var(--font-display); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(19, 21, 31, 0.55);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; }
.nav-links a { color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 9px 18px; border-radius: 11px; white-space: nowrap;
  background: linear-gradient(135deg, var(--amber), var(--amber-soft));
  color: var(--navy-deep) !important; font-weight: 600;
}

/* ---------- Hero ---------- */
.hero { padding: 84px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-icon { width: 84px; height: 84px; border-radius: 21px; margin-bottom: 26px; box-shadow: 0 18px 50px rgba(240, 106, 60, 0.35); }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.1rem); margin: 18px 0 0; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--amber), var(--amber-soft));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lede { font-size: 1.22rem; color: var(--muted); margin: 22px 0 32px; max-width: 30ch; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-actions .meta { font-size: 0.88rem; color: var(--muted); }
.hero-actions .meta strong { color: var(--text); }

/* Reveal-on-load stagger */
.reveal { opacity: 0; transform: translateY(20px); animation: rise 0.9s var(--ease) forwards; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.27s; } .d4 { animation-delay: 0.38s; } .d5 { animation-delay: 0.5s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Phone + Tuner mockup (pure CSS) ---------- */
.phone-stage { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 286px; height: 580px;
  background: linear-gradient(165deg, #2a2d44, #181a28);
  border-radius: 46px;
  padding: 14px;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 26px; background: #0f1018; border-radius: 0 0 16px 16px; z-index: 3;
}
.screen {
  position: relative; width: 100%; height: 100%;
  background: radial-gradient(130% 60% at 50% 24%, #20233a, #101019 70%);
  border-radius: 34px; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 42px 16px 18px;
  font-family: var(--font-body);
}

/* App top bar */
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 0; }
.app-title { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.theme-toggle { width: 16px; height: 16px; color: var(--muted); }

/* Tuner main readout */
.tuner-main { display: flex; flex-direction: column; align-items: center; padding: 8px 0 12px; }
.big-note {
  position: relative;
  font-family: var(--font-body); font-weight: 800; font-size: 4.5rem; line-height: 1;
  color: #fff; letter-spacing: -0.02em;
}
.big-note::after {
  content: ""; position: absolute; inset: -28px -10px; z-index: -1;
  background: radial-gradient(circle, rgba(61,220,132,0.55), transparent 68%);
  animation: glow 2.8s ease-in-out infinite;
}
@keyframes glow { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.big-note sup { font-size: 1.7rem; font-weight: 700; vertical-align: super; }
.freq { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-top: 10px; }

/* Horizontal meter */
.meter { display: flex; align-items: center; gap: 12px; width: 100%; margin: 16px 0 12px; }
.meter .sign { color: #ff5d5d; font-weight: 700; font-size: 1.1rem; width: 12px; text-align: center; }
.track { position: relative; flex: 1; height: 2px; background: rgba(255,255,255,0.16); border-radius: 2px; }
.center-tick { position: absolute; left: 50%; top: -7px; width: 2px; height: 16px; background: rgba(255,255,255,0.4); transform: translateX(-50%); }
.marker {
  position: absolute; left: 50%; top: -7px; width: 4px; height: 16px;
  background: var(--green); border-radius: 3px; transform: translateX(-50%);
  box-shadow: 0 0 10px var(--green); animation: nudge 3.4s var(--ease) infinite;
}
@keyframes nudge {
  0% { transform: translateX(calc(-50% - 46px)); background: #ff7a4d; box-shadow: 0 0 10px #ff7a4d; }
  40% { transform: translateX(calc(-50% + 30px)); background: var(--amber-soft); box-shadow: 0 0 10px var(--amber-soft); }
  62%, 100% { transform: translateX(-50%); background: var(--green); box-shadow: 0 0 10px var(--green); }
}
.status { text-align: center; }
.status-label { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green); }
.status-cents { display: block; font-size: 0.82rem; font-weight: 600; color: var(--green); margin-top: 5px; }

/* Standard tuning list */
.tuning-list { margin-top: auto; }
.tuning-head { display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 0 6px 8px; }
.tuning-list ul { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.tuning-list li {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: 9px; font-size: 0.82rem;
}
.tuning-list .num {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.6rem; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line);
}
.tuning-list .tn { font-weight: 700; color: var(--text); }
.tuning-list .tn sub { font-size: 0.62rem; font-weight: 600; color: var(--muted); }
.tuning-list .hz { font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tuning-list li.active {
  background: rgba(61,220,132,0.10);
  box-shadow: inset 0 0 0 1px rgba(61,220,132,0.5), 0 0 16px rgba(61,220,132,0.18);
}
.tuning-list li.active .tn, .tuning-list li.active .hz { color: var(--green); }
.tuning-list li.active .num { color: var(--green); border-color: rgba(61,220,132,0.5); }
.tuning-list li.active .hz svg { width: 13px; height: 13px; }

/* ---------- Section headers ---------- */
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin: 14px 0 0; }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.08rem; }

/* ---------- Features ---------- */
.features { padding: 40px 0 90px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--navy-card), rgba(33,36,58,0.5));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(240,106,60,0.4); box-shadow: 0 22px 50px rgba(0,0,0,0.4); }
.card .ico {
  width: 50px; height: 50px; border-radius: 14px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: rgba(240,106,60,0.12); color: var(--amber-soft);
}
.card .ico svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.28rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- How it works ---------- */
.how { padding: 70px 0 90px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 30px; border-top: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 600;
  background: linear-gradient(120deg, var(--amber), var(--purple));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: block; margin-bottom: 10px;
}
.step h3 { font-size: 1.3rem; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* ---------- Privacy callout ---------- */
.privacy-band { padding: 30px 0 96px; }
.privacy-card {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  background: linear-gradient(135deg, rgba(155,109,255,0.14), rgba(61,220,132,0.10));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 38px 40px;
  overflow: hidden;
}
.privacy-card .shield {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(61,220,132,0.16); color: var(--green); flex-shrink: 0;
}
.privacy-card .shield svg { width: 32px; height: 32px; }
.privacy-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.privacy-card p { color: var(--muted); max-width: 60ch; }
.text-link {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--green);
  white-space: nowrap; transition: gap 0.3s var(--ease);
}
.text-link:hover { gap: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--navy-deep); padding: 56px 0 40px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 16px; }
.footer p { color: var(--muted); font-size: 0.95rem; max-width: 34ch; }
.footer h4 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { color: var(--text); opacity: 0.85; transition: opacity 0.2s, color 0.2s; }
.footer ul a:hover { opacity: 1; color: var(--amber-soft); }
.footer .legal { grid-column: 1 / -1; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 0.86rem; }

/* ---------- Privacy policy page ---------- */
.policy { padding: 70px 0 90px; }
.policy .wrap { max-width: 760px; }
.policy .updated { color: var(--muted); font-size: 0.92rem; margin: 10px 0 40px; }
.policy h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); }
.policy h2 { font-size: 1.5rem; margin: 40px 0 12px; color: var(--amber-soft); }
.policy p { color: #d7d5cf; margin-bottom: 16px; }
.policy a { color: var(--green); border-bottom: 1px solid rgba(61,220,132,0.4); }
.policy ul.bullets { margin: 0 0 16px 1.1rem; color: #d7d5cf; }
.policy ul.bullets li { margin-bottom: 8px; }
.back-home { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; margin-bottom: 28px; transition: gap 0.3s var(--ease), color 0.2s; }
.back-home:hover { gap: 13px; color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 50px; text-align: left; }
  .phone-stage { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .privacy-card { grid-template-columns: 1fr; text-align: left; gap: 18px; padding: 30px 26px; }
  .footer .wrap { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
