/* OwnTongue public site — marketing layout layer (issue #55).
   /brand/brand.css owns tokens, fonts, base element styles, and the .ot-*
   component classes; this file owns marketing page scaffolding only: the
   sticky paper header, hero, caption preview, section/card patterns, the
   pricing grid, prose articles (legal pages), and the dark ink footer. Every value
   here is a brand token — no raw hex, no ad-hoc palettes. */

/* ── Layout shell ──────────────────────────────────────────────────────── */
.wrap { max-width: var(--container-lg); margin: 0 auto; padding: 0 1.5rem; }

/* ── Header (mk-header: sticky, blurred paper, two-tone wordmark) ─────── */
.mk-header {
  position: sticky; top: 0; z-index: var(--z-header);
  /* Solid paper base: color-mix() with var() parses at declaration time but
     fails at computed-value time on Safari < 16.2 / WebView < 111, which would
     leave the sticky header fully transparent — so a plain earlier fallback
     declaration can't save it. Gate the translucent form behind @supports. */
  background: var(--bg-page);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
@supports (background: color-mix(in srgb, red, blue)) {
  .mk-header { background: color-mix(in srgb, var(--bg-page) 88%, transparent); }
}
.mk-header__in {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container-lg); margin: 0 auto; padding: 0.85rem 1.5rem;
}
.mk-brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.mk-brand:hover { text-decoration: none; }
.mk-brand img { width: 30px; height: 30px; display: block; }
.mk-wm { font-family: var(--font-sans); font-size: 1.2rem; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); }
.mk-wm .a { color: var(--text-primary); }
.mk-wm .b { color: var(--brand-700); }
.mk-nav { display: flex; align-items: center; gap: 1.4rem; }
.mk-nav a:not(.ot-btn) { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-muted); text-decoration: none; }
.mk-nav a:not(.ot-btn):hover { color: var(--text-primary); text-decoration: none; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 4.5rem 0 1rem; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, var(--text-5xl));
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
  max-width: 16ch; margin: 0.6rem auto 0;
}
.hero .sub {
  font-family: var(--font-sans); font-size: var(--text-lg); color: var(--text-secondary);
  max-width: 620px; margin: 1.25rem auto 1.8rem; line-height: var(--leading-normal);
}
.hero .ctas { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.hero .fine { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-faint); margin-top: 1rem; }

/* ── Caption preview (illustration of the live viewer) ─────────────────── */
.preview { margin: 2.5rem auto 0; max-width: 880px; }
.preview__frame {
  background: var(--content-bg); border-radius: var(--radius-xl);
  padding: 2.6rem 2rem 1.6rem; box-shadow: var(--shadow-lg);
  position: relative; min-height: 9.5rem;
  display: flex; align-items: center; justify-content: center;
}
.preview__bar {
  position: absolute; top: 0.9rem; left: 1.2rem;
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-sans); font-size: 0.78rem; color: var(--content-muted);
}
.preview__dot {
  width: 8px; height: 8px; border-radius: var(--radius-pill);
  background: var(--success-500); animation: ot-pulse 1.5s ease-in-out infinite;
}
@keyframes ot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}
/* All rotation pairs are stacked in one grid cell: the tallest pair sets the
   height at every viewport, so the frame never resizes while lines rotate
   (on narrow screens the longer pairs wrap — swapping textContent used to
   grow/shrink the frame every 2.6s, a continuous layout shift). The script
   toggles .is-active; inactive pairs keep their size but stay invisible. */
.preview__lines { display: grid; text-align: center; }
.preview__pair {
  grid-area: 1 / 1; visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
}
.preview__pair.is-active { visibility: visible; }
.preview__lines .en { font-family: var(--font-sans); color: var(--content-dim); font-size: 1.35rem; }
.preview__lines .tr { font-family: var(--font-sans); color: var(--content-highlight); font-size: 1.6rem; font-weight: var(--weight-medium); }
.preview__caption { text-align: center; font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-faint); margin-top: 0.85rem; }
@media (prefers-reduced-motion: reduce) {
  .preview__dot { animation: none; }
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.section { padding: 3.5rem 0 0; }
/* Overline labels are brand.css's .ot-eyebrow — no local clone. */
.section h1 { font-size: var(--text-3xl); margin: 0.35rem 0 0.5rem; }
.section h2 { font-size: var(--text-2xl); margin: 0.35rem 0 0.4rem; }
.section .lead { font-family: var(--font-sans); color: var(--text-secondary); max-width: 640px; margin: 0 0 1.6rem; }

/* Card grids + feature card */
.cards3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); margin-top: 1.4rem; }
.cards4 { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); margin-top: 1.4rem; }
.feat {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm);
}
.feat .step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: var(--radius-sm);
  background: var(--brand-600); color: var(--text-on-brand);
  font-family: var(--font-mono); font-weight: var(--weight-semibold); font-size: 0.85rem;
  margin-bottom: 0.7rem;
}
.feat h3 { font-size: var(--text-lg); margin: 0 0 0.35rem; }
.feat p { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-normal); margin: 0; }

/* Honest media placeholders (no stock, no fakes — warm paper, dashed border) */
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 1.4rem; }
.media-slot {
  background: var(--paper-100); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg); min-height: 240px; padding: 1rem;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-faint);
}
.media-slot--tall { min-height: 300px; }
.media-grid + .media-slot { margin-top: var(--space-4); } /* matches the grid gap */

/* Closing call to action */
.cta-final { text-align: center; padding: 3.5rem 0 0.5rem; }
.cta-final .lead { margin: 0.5rem auto 1.3rem; }

/* ── Pricing grid (cards themselves are .ot-plan from brand.css) ───────── */
.plans4 { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); margin-top: 1.4rem; align-items: stretch; }
.ot-plan .ot-btn { margin-top: auto; }
/* Stacked info cards below the grid (was inline margin-top on pricing.html) */
.plans4 + .ot-card { margin-top: var(--space-5); }
.section .ot-card + .ot-card { margin-top: var(--space-4); }

/* ── Prose articles (serif heads, --container-md) ──────────────────────── */
/* Legal pages and sub-processors reuse .prose; .effective is the date line;
   the table treatment covers the sub-processors register. */
.prose { max-width: var(--container-md); margin: 2.75rem auto 0; padding: 0 1.5rem; }
.prose h1 { font-size: var(--text-3xl); margin: 0.35rem 0 0.6rem; }
.prose h2 { font-size: var(--text-xl); margin: 2.1rem 0 0.55rem; }
.prose h3 { font-size: var(--text-lg); margin: 1.5rem 0 0.4rem; }
.prose p, .prose li {
  font-size: var(--text-md); color: var(--text-secondary);
  line-height: var(--leading-relaxed); margin: 0 0 0.7rem;
}
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 0.9rem; }
.prose .effective { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-faint); margin: 0 0 1.6rem; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem;
  font-family: var(--font-sans); font-size: var(--text-sm);
  background: var(--surface-card); border: 1px solid var(--border-subtle);
}
.prose th {
  text-align: left; font-weight: var(--weight-semibold); color: var(--text-primary);
  background: var(--paper-100); padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-default);
}
.prose td {
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary); vertical-align: top;
}

/* ── Footer (mk-footer: dark ink) ──────────────────────────────────────── */
.mk-footer { margin-top: 4.5rem; background: var(--ink-900); color: var(--paper-200); }
.mk-footer__in { max-width: var(--container-lg); margin: 0 auto; padding: 2.2rem 1.5rem; }
.mk-footer .fbrand { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.9rem; }
.mk-footer .fbrand img { width: 26px; height: 26px; display: block; }
.mk-footer .fbrand span { font-family: var(--font-sans); font-size: 1.1rem; font-weight: var(--weight-semibold); color: var(--paper-0); }
.mk-footer nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; margin-bottom: 0.9rem; }
.mk-footer nav a { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--paper-300); text-decoration: none; }
.mk-footer nav a:hover { color: var(--paper-0); text-decoration: none; }
.mk-footer .copy { font-family: var(--font-sans); font-size: var(--text-xs); color: var(--stone-500); }
.mk-footer .copy a { color: var(--paper-300); }
.mk-footer .copy a:hover { color: var(--paper-0); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .cards3, .cards4, .plans4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cards3, .cards4, .plans4, .media-grid { grid-template-columns: 1fr; }
  .wrap, .mk-header__in, .mk-footer__in { padding-left: 1.1rem; padding-right: 1.1rem; }
  .prose { padding: 0 1.1rem; }
  .hero { padding-top: 3rem; }
  .mk-nav { gap: 0.9rem; }
  .preview__frame { padding: 2.6rem 1.1rem 1.4rem; }
  .preview__lines .en { font-size: 1.1rem; }
  .preview__lines .tr { font-size: 1.3rem; }
}
