/* Family Memories — marketing site styles
   Reuses tokens from styles.css (loaded first). This file adds layout,
   editorial type treatments, scroll-reveal classes, and hero motion. */

.mkt {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
}

.mkt-wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.mkt-wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

/* ── Type scale ─────────────────────────────────────────────── */
.mkt-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mkt-display {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8.4vw, 116px);
  line-height: 0.96;
  letter-spacing: -.025em;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.mkt-display em {
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.mkt-h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -.022em;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.mkt-h3 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0;
}
.mkt-lead {
  font-family: var(--font-serif);
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-2);
  text-wrap: pretty;
}
.mkt-body { font-size: 16px; color: var(--ink-2); line-height: 1.65; }
.mkt-small { font-size: 13px; color: var(--ink-3); }

/* ── Nav ─────────────────────────────────────────────────────── */
.mkt-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 16px 28px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.mkt-nav-links {
  display: flex; gap: 22px;
  margin-left: auto;
  font-size: 14px; color: var(--ink-2);
}
.mkt-nav-links a {
  color: inherit; text-decoration: none;
  padding: 6px 4px;
  transition: color .15s;
}
.mkt-nav-links a:hover { color: var(--ink); }

/* ── Pill button ────────────────────────────────────────────── */
.mkt-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 600;
  border: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.mkt-btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.mkt-btn-primary:hover { background: var(--primary-d); transform: translateY(-1px); }
.mkt-btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.mkt-btn-ghost:hover { background: var(--paper-2); }
.mkt-btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── Hero ───────────────────────────────────────────────────── */
.mkt-hero {
  position: relative;
  padding: 64px 0 96px;
  min-height: 84vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.mkt-hero::before {
  /* warm grain glow */
  content: ''; position: absolute; inset: -100px;
  background:
    radial-gradient(circle at 18% 20%, rgba(184,73,44,.10) 0, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(201,148,31,.12) 0, transparent 38%),
    radial-gradient(circle at 50% 110%, rgba(184,73,44,.06) 0, transparent 50%);
  pointer-events: none;
  animation: mktDrift 28s ease-in-out infinite alternate;
}
@keyframes mktDrift {
  from { transform: translate(0,0); }
  to   { transform: translate(20px, -16px); }
}

.mkt-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px; align-items: center;
  width: 100%;
}
@media (max-width: 900px) {
  .mkt-hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.mkt-hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 32px;
}

/* Hero rotating word */
.mkt-rotate {
  display: inline-block; position: relative;
  height: 1em; min-width: 4ch; vertical-align: bottom;
}
.mkt-rotate span {
  position: absolute; left: 0; top: 0;
  opacity: 0; transform: translateY(.4em);
  transition: opacity .9s ease, transform .9s ease;
}
.mkt-rotate span.in {
  opacity: 1; transform: translateY(0);
}
.mkt-rotate span.out {
  opacity: 0; transform: translateY(-.4em);
  transition-duration: .7s;
}

/* Hero photo collage */
.mkt-hero-art {
  position: relative;
  aspect-ratio: 5 / 6;
  min-height: 480px;
}
.mkt-hero-art > * { position: absolute; }

.mkt-photo {
  background: var(--paper);
  border: 8px solid #fff;
  box-shadow: 0 22px 60px rgba(46,34,18,.18), 0 4px 12px rgba(46,34,18,.08);
  overflow: hidden;
  border-radius: 2px;
}
.mkt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Section ─────────────────────────────────────────────────── */
.mkt-section { padding: 96px 0; position: relative; }
.mkt-section-tight { padding: 64px 0; }
.mkt-section-dark {
  background: var(--ink); color: var(--paper);
}
.mkt-section-dark .mkt-eyebrow { color: rgba(255,255,255,.55); }
.mkt-section-dark .mkt-h2 { color: var(--paper); }
.mkt-section-dark .mkt-lead { color: rgba(255,255,255,.7); }
.mkt-section-cream { background: var(--paper-2); }

.mkt-section-head {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 56px;
  max-width: 720px;
}

/* ── Reveal animation ───────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* ── How it works ───────────────────────────────────────────── */
.mkt-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}
@media (max-width: 900px) { .mkt-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mkt-steps { grid-template-columns: 1fr; } }

.mkt-step {
  position: relative;
  padding-top: 24px;
  counter-increment: step;
}
.mkt-step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: -12px; left: 0;
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--primary);
  opacity: .25;
  font-weight: 500;
  font-variant-numeric: oldstyle-nums;
}
.mkt-step h3 { font-size: 20px; }

/* ── Scaled-embed helpers ───────────────────────────────────── */
/* `zoom` (unlike `transform: scale`) shrinks BOTH the visual AND the
   layout box, so the intrinsic 1280px-wide chrome window doesn't blow
   out grid columns or overflow narrow viewports. Supported in modern
   Chrome, Safari, and Firefox 126+. */
.mkt-zoom-52 { zoom: 0.52; }
.mkt-zoom-62 { zoom: 0.62; }
.mkt-zoom-84 { zoom: 0.84; }
@media (max-width: 1180px) {
  .mkt-zoom-84 { zoom: 0.66; }
}
@media (max-width: 720px) {
  .mkt-zoom-84 { zoom: 0.46; }
}

/* Family-angle 2-col grid. minmax(0, 1fr) on the text column lets it
   shrink to the available space instead of being pushed off by the
   right column's intrinsic content. Stacks below 980px. */
.mkt-family-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: center;
}
@media (max-width: 980px) {
  .mkt-family-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ── Phone showcase ─────────────────────────────────────────── */
.mkt-phone-row {
  display: flex; align-items: flex-start;
  justify-content: center;
  gap: 16px;
  padding: 16px 0 0;
}
.mkt-phone-row > .mkt-phone {
  flex: 0 0 auto;
}
.mkt-phone {
  transform-origin: top center;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}

/* Phone grid for inside-the-app section */
.mkt-phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: end;
}
@media (max-width: 980px) { .mkt-phones { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .mkt-phones { grid-template-columns: 1fr; justify-items: center; } }
.mkt-phone-card {
  display: flex; flex-direction: column; gap: 14px;
  align-items: center;
}
.mkt-phone-card h4 {
  font-family: var(--font-serif); font-size: 22px; margin: 0;
  font-weight: 500; letter-spacing: -.01em;
}
.mkt-phone-card p {
  margin: 0; font-size: 14px; color: var(--ink-2); text-align: center; max-width: 280px;
}
.mkt-phone-scale {
  transform: scale(.62);
  transform-origin: top center;
  margin-bottom: -340px;
  pointer-events: none;
}

/* ── Adaptive question cards ───────────────────────────────── */
.mkt-question-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .mkt-question-grid { grid-template-columns: 1fr; } }
.mkt-question-card {
  padding: 26px 26px 22px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}
.mkt-question-card::before {
  content: '"';
  position: absolute; top: -14px; left: 12px;
  font-family: var(--font-serif); font-weight: 500;
  font-size: 88px; line-height: 1; color: var(--primary);
  opacity: .2;
}
.mkt-question-q {
  font-family: var(--font-serif);
  font-size: 22px; line-height: 1.35;
  color: var(--ink);
  font-weight: 500;
  margin: 18px 0 18px;
  letter-spacing: -.008em;
}
.mkt-question-who {
  display: flex; align-items: center; gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.mkt-avatar {
  width: 26px; height: 26px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-size: 11px; font-weight: 600; flex-shrink: 0;
}

/* ── Manifesto text strip ──────────────────────────────────── */
.mkt-manifesto {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.25;
  letter-spacing: -.012em;
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}
.mkt-manifesto em {
  color: var(--primary);
  font-style: italic;
}

/* ── Use cases ─────────────────────────────────────────────── */
.mkt-cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 720px) { .mkt-cases { grid-template-columns: 1fr; } }
.mkt-case {
  padding: 28px 28px 26px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.mkt-case-tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--primary-tint); color: var(--primary-d);
}

/* ── CTA strip ─────────────────────────────────────────────── */
.mkt-cta-form {
  display: flex; gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  max-width: 480px;
  box-shadow: 0 8px 24px rgba(46,34,18,.06);
}
.mkt-cta-form input {
  flex: 1; border: none; outline: none;
  background: transparent;
  font-size: 15px; color: var(--ink);
  font-family: inherit;
  padding: 8px 0;
  min-width: 0;
}
.mkt-cta-form input::placeholder { color: var(--ink-3); }

/* ── Footer ────────────────────────────────────────────────── */
.mkt-footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-2);
}
.mkt-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) { .mkt-footer-grid { grid-template-columns: 1fr 1fr; } }
.mkt-footer h5 {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .1em;
  margin: 0 0 14px;
}
.mkt-footer a {
  display: block; padding: 6px 0;
  font-size: 14px; color: var(--ink-2);
  text-decoration: none;
}
.mkt-footer a:hover { color: var(--ink); }

/* ── Validation diagram ─────────────────────────────────────── */
.mkt-validation {
  position: relative;
  padding: 40px 0;
}
.mkt-validation-row {
  display: grid;
  grid-template-columns: 1fr 60px 1fr 60px 1fr;
  gap: 0;
  align-items: center;
}
@media (max-width: 720px) {
  .mkt-validation-row { grid-template-columns: 1fr; gap: 20px; }
  .mkt-validation-row > .mkt-arrow { transform: rotate(90deg); justify-self: center; }
}
.mkt-validation-node {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}
.mkt-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  opacity: .6;
}

/* ── Hero phone overlap ─────────────────────────────────────── */
.mkt-hero-phone {
  position: absolute; right: -20px; bottom: -40px;
  width: 320px;
  transform: rotate(4deg);
  filter: drop-shadow(0 28px 50px rgba(46,34,18,.18));
}

/* Polaroid notch */
.mkt-polaroid {
  background: #fff;
  padding: 12px 12px 38px;
  box-shadow: 0 18px 50px rgba(46,34,18,.18), 0 3px 10px rgba(46,34,18,.06);
}
.mkt-polaroid .mkt-photo-inner {
  aspect-ratio: 5 / 4;
  background: linear-gradient(135deg, #c9a47a, #8a6a4a);
  overflow: hidden;
  position: relative;
}
.mkt-polaroid figcaption {
  font-family: "Caveat", "Marker Felt", "Comic Sans MS", cursive;
  font-size: 18px; color: var(--ink-2);
  text-align: center;
  margin-top: 10px;
}

/* Scroll-driven progress strip in hero */
.mkt-marquee {
  display: flex; gap: 64px;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-3);
  font-size: 22px;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
  overflow: hidden;
  position: relative;
}
.mkt-marquee-track {
  display: flex; gap: 64px;
  animation: mktScroll 60s linear infinite;
  will-change: transform;
  padding-right: 64px;
  flex-shrink: 0;
}
@keyframes mktScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.mkt-marquee-track span { flex-shrink: 0; }
.mkt-marquee-track span::before {
  content: '·'; margin-right: 64px; opacity: .4;
}
