/* Magellan Production — storefront hub theme.
   Cohesive with the product pages: same navy/gold brand system (brand_assets/brand.md),
   serif wordmark voice, one-off "does the work" software feel. Mobile-first, no frameworks. */

:root {
  /* brand palette — brand_assets/brand.md */
  --navy:      #0E1F3D;   /* ink / flat navy backgrounds */
  --navy-mid:  #10254A;
  --navy-core: #1A3A66;   /* gradient highlight */
  --navy-edge: #0A1830;   /* gradient shadow / vignette */
  --gold:      #E0A838;   /* primary gold — CTA, accents */
  --gold-hi:   #F4D27A;
  --gold-deep: #B07A1C;   /* gold as TEXT on light (never bright gold on white) */
  --cream:     #F5EFE2;

  --bg:    #ffffff;
  --panel: #fbfcfd;
  --ink:   #14171a;
  --muted: #5b646e;
  --line:  #e7eaee;
  --ok:    #1f9d55;

  --radius: 16px;
  --maxw: 1080px;
  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* layered, navy-tinted shadows (never flat grey) */
  --shadow-1: 0 1px 2px rgba(14, 31, 61, .06), 0 2px 8px rgba(14, 31, 61, .05);
  --shadow-2: 0 8px 20px rgba(14, 31, 61, .12), 0 2px 6px rgba(14, 31, 61, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); }

/* ── NAV ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.nav-links a {
  margin-left: 24px; color: var(--muted); font-weight: 600; font-size: 14px;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--navy); }
.nav-links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 3px; }

/* ── HERO (navy field, layered gradients + grain) ────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 480px at 82% -12%, rgba(224, 168, 56, .22), transparent 60%),
    radial-gradient(1100px 620px at 20% 8%, var(--navy-core) 0%, transparent 55%),
    linear-gradient(160deg, var(--navy-mid) 0%, var(--navy) 48%, var(--navy-edge) 100%);
  color: var(--cream);
  padding: 92px 22px 84px;
}
/* fine grain for depth (feTurbulence noise, very low opacity) */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* thin gold hairline at the base of the hero */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-hi) 50%, var(--gold) 70%, transparent);
  opacity: .55;
}
.hero-inner { position: relative; max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: 12px; font-weight: 700;
  color: var(--gold-hi); margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 60px); line-height: 1.04; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 20px; max-width: 18ch; color: #fff;
}
.hero-sub { font-size: 18px; line-height: 1.7; color: #c9d3e2; max-width: 56ch; margin: 0 0 30px; }
.hero-cta {
  display: inline-block; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep));
  color: var(--navy); font-weight: 800; letter-spacing: .01em;
  padding: 15px 30px; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(224, 168, 56, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .08s cubic-bezier(.2,.8,.2,1), filter .15s ease;
}
.hero-cta:hover { filter: brightness(1.04); transform: translateY(-1px); }
.hero-cta:active { transform: translateY(1px); }
.hero-cta:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.hero-trust {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px;
  padding: 0; margin: 26px 0 0; font-size: 14px; color: #aeb9cc;
}
.hero-trust li { display: flex; align-items: center; gap: 7px; }
.hero-trust li::before { content: "✓"; color: var(--gold); font-weight: 900; }

/* ── LAUNCHER ("Open your tool") ─────────────────────────────────────── */
.launch-head {
  max-width: var(--maxw); margin: 0 auto; padding: 52px 22px 6px;
  border-top: 2px solid transparent;
}
.eyebrow-ink {
  text-transform: uppercase; letter-spacing: .2em; font-size: 12px; font-weight: 700;
  color: var(--gold-deep); margin: 0 0 12px;
}
.launch-head h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -0.02em; font-weight: 700; margin: 0 0 12px; }
.launch-sub { color: var(--muted); max-width: 62ch; margin: 0; font-size: 17px; }
.shop--launch { padding-top: 30px; }
.app-card .card-foot { justify-content: flex-end; margin-top: 14px; }
.app-card .card-cta { font-size: 15px; }

/* ── SHOP GRID ───────────────────────────────────────────────────────── */
.shop { max-width: var(--maxw); margin: 0 auto; padding: 64px 22px 20px; }
.section-title { font-size: 27px; letter-spacing: -0.01em; font-weight: 700; margin: 0 0 8px; }
.section-sub { color: var(--muted); margin: 0 0 26px; max-width: 60ch; }
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

.card {
  display: flex; flex-direction: column; color: inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: #dfe4ea; }
.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.card--soon { cursor: default; box-shadow: none; }
.card--soon:hover { transform: none; box-shadow: none; border-color: var(--line); }

.card-media { aspect-ratio: 16 / 10; background: var(--navy); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 18px; color: var(--cream); font-weight: 800; font-size: 16px;
  letter-spacing: .01em; font-family: var(--serif);
  background:
    radial-gradient(420px 200px at 75% -20%, rgba(224,168,56,.18), transparent 60%),
    linear-gradient(160deg, var(--navy-mid), var(--navy-edge));
}
.ph--soon {
  color: #9aa6b8; font-family: var(--sans); font-weight: 700; font-size: 14px;
  background:
    repeating-linear-gradient(45deg, #f6f8fa, #f6f8fa 12px, #eef1f5 12px, #eef1f5 24px);
}

.card-body { padding: 17px 17px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.hook { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.price { font-weight: 800; font-size: 19px; color: var(--navy); }
.was { color: var(--muted); text-decoration: line-through; font-size: 14px; margin-left: 8px; font-weight: 500; }
.card-cta { color: var(--gold-deep); font-weight: 800; font-size: 14px; }

/* ── HOW IT WORKS ────────────────────────────────────────────────────── */
.how { max-width: var(--maxw); margin: 0 auto; padding: 48px 22px 74px; }
.how-steps {
  margin: 0; padding-left: 0; list-style: none; display: grid; gap: 18px; counter-reset: step;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
}
.how-steps li {
  position: relative; padding: 24px 20px 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); color: var(--muted); font-size: 15px;
}
.how-steps li strong { color: var(--navy); font-family: var(--serif); font-size: 17px; display: block; margin-bottom: 6px; }
.how-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 20px;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep));
  color: var(--navy); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(224, 168, 56, .3);
}

/* ── FOOTER ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); text-align: center; padding: 40px 22px 52px; }
.foot-seal { margin: 0 auto 12px; opacity: .9; }
.foot-brand { font-family: var(--serif); font-weight: 700; letter-spacing: .04em; margin: 0 0 8px; color: var(--navy); }
.fine { color: var(--muted); font-size: 13px; margin: 0 auto; max-width: 60ch; line-height: 1.6; }

/* "Already have the app?" — fixed bottom-right recovery link for returning buyers */
.recovery {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 999px;
  background: var(--navy); color: #fff; text-decoration: none;
  font-size: 13.5px; font-weight: 600; line-height: 1;
  box-shadow: 0 8px 22px rgba(14, 31, 61, .30), inset 0 0 0 1px rgba(224, 168, 56, .35);
  transition: transform .1s cubic-bezier(.2,.8,.2,1), box-shadow .15s ease;
}
.recovery .recovery-q { color: #cdd6e4; }
.recovery .recovery-cta { color: var(--gold); font-weight: 800; }  /* bright gold on navy = high contrast */
.recovery:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14, 31, 61, .36), inset 0 0 0 1px rgba(224, 168, 56, .6); }
.recovery:active { transform: translateY(0); }
.recovery:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 600px) {
  .hero { padding: 66px 20px 60px; }
  .nav-links a { margin-left: 18px; }
  .shop { padding-top: 48px; }
}
@media (max-width: 460px) {
  .recovery { padding: 9px 13px; font-size: 12px; }
  .recovery .recovery-q { display: none; }  /* tight screens: just "Open it →" */
}
