/* storytimeguru.com marketing home — page-local layout layer.
   shared/tokens.css is the source of truth for every brand value: the warm-editorial
   palette (paper / alt-band / card / ink / gold / Deep Blue / Vibrant Purple), the
   three type tiers (Montserrat display, Fraunces editorial, Open Sans body), the 8pt
   spacing + rhythm variables, radius, shadow, and the .section / .band--* / .card /
   .chip / .phone / .btn recipes. Nothing brand-y is hardcoded here, and this file
   introduces NO color, radius, shadow, or font of its own.

   Page-local additions (layout-only, deliberately not brand values):
     --ease        shared easing curve for the entrance reveal
     --check-mask  inline SVG check glyph, painted with a CSS mask in Vibrant Purple
*/

:root {
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 10.6l4.2 4.2L16.4 5.4'/%3E%3C/svg%3E");
}

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

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 50;
  background: var(--stg-deep-blue); color: var(--paper);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md);
  font-family: var(--font-heading); font-weight: 700; text-decoration: none;
  transition: top var(--dur-base) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding-block: var(--sp-3);
}
/* The byline links to gradelevelguru.com, so it cannot sit inside the home link.
   The glyph gets its own (decorative, unfocusable) home link and the wordmark carries
   the accessible one; the lockup renders exactly as before. */
.brand { display: flex; align-items: center; gap: var(--sp-3); }
.brand__glyph-link { display: flex; flex: none; }
.brand__glyph { width: 40px; height: auto; flex: none; }
.brand__home { text-decoration: none; }
.brand__text { display: grid; gap: var(--sp-1); justify-items: start; }
.brand .byline { line-height: 1.2; }
a.byline { color: var(--muted); text-decoration: none; }
a.byline:hover { text-decoration: underline; }
.site-header .btn { white-space: nowrap; }

@media (max-width: 767px) {
  .brand__glyph { width: 32px; }
  .brand .wordmark--sm { font-size: 1rem; }
  .brand .byline { font-size: 0.625rem; letter-spacing: 1.2px; white-space: nowrap; }
  .site-header .btn { padding-inline: var(--sp-4); font-size: 0.875rem; }
}
@media (max-width: 380px) {
  .brand__glyph { display: none; }
}

/* ---------- Buttons / store rows ---------- */

.store-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.btn--store svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.btn--outline-on-brand { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn--outline-on-brand:hover { background: var(--paper); color: var(--ink); }

/* ---------- Section scaffolding ---------- */

/* Rhythm (locked): eyebrow -> heading 8 (the .eyebrow margin), heading -> lead 16,
   lead -> content 40, paragraph -> paragraph 16, statement -> body 24. */
.section__head { max-width: 46ch; margin-bottom: var(--gap-content); }
.muted { color: var(--muted); }
.band--dark .wordmark { color: var(--paper); }

/* ---------- Hero ---------- */

.hero__grid { display: grid; gap: var(--col-gap); align-items: center; }
/* No measure cap on the COLUMN: tokens already caps every <p> at 64ch, and capping
   the column instead leaves the locked-pattern "leftover whitespace" beside it. */
.hero__copy h1 { margin-bottom: var(--gap-lead); max-width: 20ch; }
.hero__copy .tagline { margin-bottom: var(--gap-statement); max-width: 46ch; }
.hero__body { max-width: 46ch; margin-bottom: var(--gap-content); font-size: var(--fs-body-xl); }

.hero__art { justify-self: center; }
.hero__shot { width: min(100%, 220px); }

@media (min-width: 1025px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .hero__art { justify-self: end; }
  .hero__shot { width: 280px; }
}

/* ---------- How it works (4 cards) ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--card-gap); }
.step {
  display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--sp-2);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); }
.step h3 { margin: 0; }
.step p { margin: 0; color: var(--muted); font-size: var(--fs-body-md); max-width: 34ch; }
.step .eyebrow { margin-bottom: 0; }
.step__figure { display: flex; justify-content: center; margin-top: var(--sp-6); }
.step__shot { width: min(100%, 180px); }

@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Two-column content sections ---------- */

.split { display: grid; gap: var(--col-gap); align-items: center; }
.split__art { justify-self: center; }
.split__art img { width: min(100%, 220px); }

@media (min-width: 1025px) {
  .split { grid-template-columns: minmax(0, 1fr) 260px; }
  .split--art-first { grid-template-columns: 260px minmax(0, 1fr); }
  .split__art img { width: 260px; }
}

.split__copy h2 { margin-bottom: var(--gap-lead); }
.split__copy .statement { margin-bottom: var(--gap-statement); }

/* Stats: Montserrat, ink, flat (no gradient text) */
.stats { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin: var(--gap-content) 0; }
.stat__value {
  font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1; color: var(--ink);
}
.stat__label { font-size: var(--fs-body-md); color: var(--muted); margin-top: var(--sp-1); }

/* Feature list: purple check marks (Storytime's secondary accent) */
.inside-list { list-style: none; margin: 0 0 var(--gap-content); padding: 0; }
.inside-list li {
  position: relative; padding-left: var(--sp-8); padding-block: var(--sp-4);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-body-lg);
}
.inside-list li:first-child { border-top: 1px solid var(--hairline); }
.inside-list li::before {
  content: ""; position: absolute; left: 0; top: 50%; margin-top: -10px;
  width: 20px; height: 20px; background-color: var(--stg-vibrant-purple);
  -webkit-mask-image: var(--check-mask); mask-image: var(--check-mask);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 20px 20px; mask-size: 20px 20px;
}

.callout {
  background: var(--tint-purple-bg); color: var(--ink);
  border-radius: var(--radius-lg); padding: var(--sp-6);
  font-size: var(--fs-body-lg); margin: 0; max-width: var(--measure);
}

/* ---------- Download band (flat Deep Blue) ---------- */

.band--brand { background: var(--stg-deep-blue); color: var(--paper); }
.band--brand h2 { color: var(--paper); }
.band--brand p { color: var(--paper); }
.band--brand .eyebrow { color: var(--paper); }
.band__inner { max-width: 46ch; }
.band__inner h2 { margin-bottom: var(--gap-lead); }
.band__inner .store-row { margin-top: var(--gap-content); }

/* ---------- Redeem (universal-link fallback page, /redeem/) ---------- */

.redeem { max-width: 46rem; }
.redeem__panel[hidden] { display: none; }
.redeem h1 { margin-bottom: var(--gap-lead); }
.redeem .lead { margin-bottom: var(--gap-content); }
.redeem__card { margin-bottom: var(--gap-content); }
.redeem__h2 { margin-bottom: var(--gap-lead); }

.coderow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.btn--copy { padding-inline: var(--sp-4); }
.btn--block { width: 100%; }
.code-inline { font-family: var(--font-mono); letter-spacing: 0.06em; color: var(--stg-deep-blue); }

/* Open in app: the primary action, with the stores reachable directly beneath it. */
.openrow { display: grid; gap: var(--sp-3); }
.openrow .btn svg { flex: none; }
.store-row--tight .btn { flex: 1 1 auto; }
.openrow .help { margin: 0; color: var(--muted); font-size: var(--fs-body-md); }
.openrow .status { margin: 0; font-size: var(--fs-body-md); color: var(--muted); }
.openrow .status:empty { display: none; }
.openrow .status[data-tone="error"] { color: #9B2C1E; font-weight: 600; }

.howto { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.howto li {
  counter-increment: step; position: relative;
  padding-left: calc(var(--sp-8) + var(--sp-2)); min-height: 32px; max-width: var(--measure);
}
.howto li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: var(--radius-md);
  background: var(--tint-blue-bg); color: var(--stg-deep-blue);
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-body-md);
}
.howto__text { display: block; padding-top: 3px; }

/* ---------- Footer ---------- */

.site-footer { padding-block: var(--sp-12); }
.site-footer__inner { display: grid; gap: var(--sp-8); }
.site-footer p { margin: var(--sp-2) 0 0; max-width: none; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); }
.site-footer a {
  color: var(--paper); text-decoration: none;
  border-bottom: 1px solid var(--muted-on-dark);
  display: inline-flex; align-items: center; min-height: var(--touch-min);
}
.site-footer a:hover { border-bottom-color: var(--paper); }
.site-footer small { color: var(--muted-on-dark); font-size: var(--fs-body-md); }
@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: auto 1fr; align-items: start; justify-content: space-between; }
  .site-footer nav { justify-self: end; }
}

/* ---------- Entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise 700ms var(--ease) forwards; }
  .reveal--1 { animation-delay: 60ms; }
  .reveal--2 { animation-delay: 150ms; }
  .reveal--3 { animation-delay: 240ms; }
  .reveal--4 { animation-delay: 330ms; }
  .reveal--5 { animation-delay: 420ms; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
