/* ============================================================
   THE STARPRINTS — marketing site shared styles
   Links the design-system tokens (../../styles.css) on top.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cosmic-900);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: var(--container-narrow); }
section { position: relative; }
.section-pad { padding: clamp(72px, 11vw, 150px) 0; }

/* ---------- type roles ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0;
}
.display {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  line-height: 1.04;
  margin: 0;
}
.gold-foil {
  background: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 48%, var(--gold-600) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.serif-q {
  font-family: var(--font-serif);
  font-weight: var(--fw-medium);
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}
.lead { font-size: var(--text-md); font-weight: var(--fw-medium); line-height: var(--leading-relaxed); color: var(--text-muted-dark); margin: 0; }
.body-strong { font-weight: var(--fw-bold); }

/* ---------- filigree divider ---------- */
.filigree {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold-500);
}
.filigree::before, .filigree::after {
  content: ""; height: 1px; width: clamp(40px, 12vw, 120px);
  background: linear-gradient(90deg, transparent, var(--gold-600));
}
.filigree::after { background: linear-gradient(270deg, transparent, var(--gold-600)); }
.filigree .star { font-size: 13px; line-height: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: var(--fw-bold);
  font-size: var(--text-sm); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 15px 30px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-soft), box-shadow var(--dur-base) var(--ease-soft), background var(--dur-base) var(--ease-soft), color var(--dur-base) var(--ease-soft);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); color: var(--ink-900); box-shadow: var(--shadow-pill); }
.btn-primary:hover { box-shadow: var(--shadow-pill), var(--shadow-glow-gold); background: linear-gradient(180deg, var(--gold-200), var(--gold-400)); }
.btn-ghost { background: transparent; color: var(--gold-200); box-shadow: inset 0 0 0 1px var(--border-hairline); }
.btn-ghost:hover { background: rgba(201,162,39,0.10); color: var(--gold-100); box-shadow: inset 0 0 0 1px var(--gold-500); }
.btn-cream { background: var(--mist-100); color: var(--ink-900); box-shadow: var(--shadow-pill); }
.btn-cream:hover { background: var(--pure-white); }
.btn-lg { padding: 18px 38px; font-size: var(--text-base); }

/* ---------- chips / badges ---------- */
.pill-label {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--mist-100); color: var(--ink-900);
  border-radius: var(--radius-pill); padding: 9px 18px 9px 9px;
  font-weight: var(--fw-bold); font-size: var(--text-base); box-shadow: var(--shadow-pill);
}
.medallion {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, var(--gold-300), var(--gold-600));
  color: var(--cosmic-950); font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}
.tag {
  display: inline-block; font-size: var(--text-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--gold-300); border: 1px solid var(--border-hairline);
  padding: 6px 13px; border-radius: var(--radius-pill);
}
/* solid-highlight eyebrow — replaces the numbered medallions */
.eyebrow-solid {
  display: inline-block;
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--ink-900);
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  padding: 6px 13px; border-radius: 7px; box-shadow: var(--shadow-pill);
}

/* ---------- header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: background var(--dur-base) var(--ease-soft), backdrop-filter var(--dur-base);
}
.site-header.scrolled { background: rgba(8,7,15,0.82); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(201,162,39,0.14); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup img { width: 34px; height: 34px; object-fit: contain; }
.brand-lockup .wm { font-family: var(--font-display); font-weight: var(--fw-bold); letter-spacing: 0.2em; font-size: 15px; color: var(--star-white); text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav a.navlink { font-size: var(--text-sm); font-weight: var(--fw-semibold); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; color: var(--text-muted-dark); transition: color var(--dur-fast); }
.nav a.navlink:hover, .nav a.navlink.active { color: var(--gold-200); }
.nav-toggle {
  display: none; position: relative; z-index: 70;
  background: none; border: none; cursor: pointer; padding: 0;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  color: var(--star-white); -webkit-tap-highlight-color: transparent;
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-header .nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(82vw, 330px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0;
    background: rgba(9,7,17,0.98); backdrop-filter: blur(16px);
    padding: 92px 28px 36px;
    transform: translateX(100%);
    transition: transform 0.34s var(--ease-soft);
    box-shadow: -24px 0 60px rgba(0,0,0,0.55);
    z-index: 60; overflow-y: auto;
  }
  .site-header .nav .navlink {
    display: block; font-size: 1.04rem; letter-spacing: 0.14em;
    padding: 17px 2px; border-bottom: 1px solid var(--border-hairline); color: var(--star-white);
  }
  .site-header .nav .navlink.active { color: var(--gold-200); }
  .site-header .nav .btn { margin-top: 24px; width: 100%; justify-content: center; padding-top: 16px; padding-bottom: 16px; }
  .site-header.nav-open .nav { transform: translateX(0); }
  body.nav-lock { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-veil { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 40%, transparent 30%, rgba(8,7,15,0.55) 78%, var(--cosmic-950) 100%); }
.hero-inner { position: relative; z-index: 2; padding: 120px 24px 80px; }
.hero-emblem { width: clamp(86px, 11vw, 130px); margin: 0 auto 26px; filter: drop-shadow(var(--shadow-glow-gold)); }
.hero h1.display { font-size: clamp(46px, 9vw, 104px); }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface-dark); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); overflow: hidden; position: relative;
}
.card-veil { box-shadow: var(--shadow-lg), var(--shadow-inset-hairline); }
.scrim {
  background: var(--surface-veil); backdrop-filter: blur(2px);
  border-radius: var(--radius-md); padding: 22px 26px;
}

/* product / journey grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.product-card {
  background: var(--surface-navy); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-inset-hairline);
  padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--dur-base) var(--ease-glide), box-shadow var(--dur-base);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-600); }
.product-card h3 { font-family: var(--font-display); font-weight: var(--fw-semibold); letter-spacing: 0.05em; text-transform: uppercase; font-size: var(--text-lg); margin: 0; color: var(--star-white); }
.product-card p { margin: 0; color: var(--text-muted-dark); font-size: var(--text-sm); line-height: var(--leading-relaxed); }
.product-card .when { margin-top: auto; font-size: var(--text-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--gold-400); font-weight: var(--fw-bold); }

/* feature list */
.feature-row { display: flex; gap: 18px; align-items: flex-start; }
.feature-row .ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; box-shadow: var(--shadow-inset-hairline); color: var(--gold-300); }
.feature-row h4 { margin: 2px 0 6px; font-family: var(--font-display); letter-spacing: 0.05em; text-transform: uppercase; font-size: var(--text-base); color: var(--star-white); font-weight: var(--fw-semibold); }
.feature-row p { margin: 0; color: var(--text-muted-dark); font-size: var(--text-sm); line-height: var(--leading-relaxed); }

/* ---------- light (dream) sections ---------- */
.dream { background: var(--bg-dream); color: var(--text-on-light); }
.dream .eyebrow { color: var(--gold-600); }
.dream .lead { color: var(--ink-700); }
.dream .display { color: var(--ink-900); }
.dream .serif-q { color: var(--ink-900); }
.paper { background-color: var(--mist-cream); background-image: url('../../assets/bg-paper.png'); background-size: cover; color: var(--text-on-light); }

/* ---------- author ---------- */
.author-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.author-photo { border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4/5; object-fit: cover; }
@media (max-width: 760px) { .author-wrap { grid-template-columns: 1fr; } }

/* ---------- newsletter ---------- */
.subscribe { display: flex; flex-wrap: wrap; gap: 10px; max-width: 480px; margin: 26px auto 0; }
.fd-embed { max-width: 480px; margin: 28px auto 0; }
/* progressive name field (revealed on email focus/typing) */
.subscribe-name { flex: 1 1 100%; opacity: 0; transform: translateY(-6px); transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-soft); }
.subscribe.show-name .subscribe-name { opacity: 1; transform: none; }
.subscribe-name input { width: 100%; padding: 15px 20px; border-radius: var(--radius-sm); border: none; background: rgba(255,255,255,0.08); color: var(--star-white); font-family: var(--font-body); font-size: var(--text-base); box-shadow: var(--shadow-inset-hairline); outline: none; }
.subscribe-name input::placeholder { color: var(--text-muted-dark); }
.subscribe-name input:focus { box-shadow: inset 0 0 0 1px var(--gold-400); background: rgba(255,255,255,0.12); }
.dream .subscribe-name input { background: rgba(26,22,32,0.05); color: var(--ink-900); box-shadow: inset 0 0 0 1px var(--border-soft); }
.dream .subscribe-name input::placeholder { color: var(--ink-500); }
.subscribe input {
  flex: 1; padding: 15px 20px; border-radius: var(--radius-sm); border: none;
  background: rgba(255,255,255,0.08); color: var(--star-white); font-family: var(--font-body);
  font-size: var(--text-base); box-shadow: var(--shadow-inset-hairline); outline: none;
}
.subscribe input::placeholder { color: var(--text-muted-dark); }
.subscribe input:focus { box-shadow: inset 0 0 0 1px var(--gold-400); background: rgba(255,255,255,0.12); }
.dream .subscribe input { background: rgba(26,22,32,0.05); color: var(--ink-900); box-shadow: inset 0 0 0 1px var(--border-soft); }
.dream .subscribe input::placeholder { color: var(--ink-500); }
@media (max-width: 540px) { .subscribe { flex-direction: column; } }

/* ---------- footer ---------- */
.site-footer { background: var(--cosmic-950); padding: 64px 0 40px; text-align: center; }
.site-footer .brand-lockup { justify-content: center; margin-bottom: 22px; }
.footer-nav { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.footer-nav a { font-size: var(--text-sm); color: var(--text-muted-dark); font-weight: var(--fw-semibold); }
.footer-nav a:hover { color: var(--gold-200); }
.copyright { font-family: var(--font-display); letter-spacing: var(--tracking-wide); text-transform: uppercase; font-size: var(--text-xs); color: var(--ink-500); }

/* ---------- sparkles ---------- */
.sparkle { position: absolute; color: var(--gold-300); pointer-events: none; opacity: 0.8; animation: twinkle 4s var(--ease-soft) infinite; }
@keyframes twinkle { 0%,100% { opacity: 0.25; transform: scale(0.85); } 50% { opacity: 0.9; transform: scale(1.1); } }

/* ---------- entrance ----------
   Content is ALWAYS visible by default (no hiding), so it renders in every
   context — including environments that freeze CSS animations at frame 0.
   The .reveal class is kept as a harmless hook for future enhancement. */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sparkle { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- custom scrollbar (celestial gold on cosmic) ---------- */
html {
  scrollbar-width: thin;                                  /* Firefox */
  scrollbar-color: var(--gold-600) var(--cosmic-950);
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track {
  background: var(--cosmic-950);
  box-shadow: inset 1px 0 0 rgba(201, 162, 39, 0.14);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-300), var(--gold-600));
  border-radius: var(--radius-pill);
  border: 3px solid var(--cosmic-950);                    /* inset the thumb */
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold-200), var(--gold-500));
}
::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-700));
}
::-webkit-scrollbar-corner { background: var(--cosmic-950); }
