/* CruiseCrew website styles
 *
 * Design system inherited from Mathory (see spec §3–§6) with Heritage
 * palette substitution. Keep this file in sync with the Tailwind config
 * in admin_portal/tailwind.config.js (Phase 2 work) — palette values are
 * duplicated between the two projects.
 *
 * Font subset loaded from Google Fonts:
 *   family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600
 *   &family=Inter:wght@400;500;600;700
 *
 * Display face switched from Fraunces → Playfair Display on 2026-09-22 —
 * Fraunces's warm-humanist stroke modulation read as "italic-adjacent"
 * even in roman, which the intended editorial-but-readable positioning
 * did not want. Playfair Display is a classical transitional serif with
 * unambiguously roman upright shapes. Also matches the mobile app's
 * Heritage theme display face (see carcruise_mobile/lib/app/theme.dart).
 * Any residual `font-variation-settings: "opsz" X` calls were stripped
 * from this file at the same time — Playfair Display has no opsz axis,
 * so the properties silently no-op and become dead code.
 *
 * All tokens use \b word-boundary variable names to avoid collisions if
 * a future consumer scopes CSS.
 */

:root {
  /* Palette — Heritage (burgundy + brass + cream) */
  --color-primary: #5B1A1A;
  --color-primary-hover: #7A2626;
  --color-accent: #C19A3F;
  --color-accent-hover: #A6842F;
  --color-ink: #1B1613;
  --color-text-muted: #5F544C;
  --color-text-tertiary: #8A7864;
  --color-bg: #F5EFE5;
  --color-surface: #FFFFFF;
  --color-highlight: #EBE1CE;
  --color-accent-tint: #F5E7C1;
  --color-border: #DFD3BE;
  --color-nav-ink: #FFFFFF;

  /* Type families */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing scale (rem) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 5rem;
  --space-8: 7rem;
  --space-9: 8rem;

  /* Container widths */
  --width-extra-narrow: 560px;
  --width-narrow: 720px;
  --width-standard: 1080px;
  --width-wide: 1200px;

  /* Radii — sharp reads editorial */
  --radius-sharp: 2px;
}

/* Reset the sharpest edges */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Type scale — matches Mathory §3.2 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
  margin: 0;
}

.display-xl { font-size: 4.5rem; line-height: 1.05; letter-spacing: -0.02em; }
.display-l  { font-size: 3.5rem; line-height: 1.10; letter-spacing: -0.015em; }
.display-m  { font-size: 2.5rem; line-height: 1.15; letter-spacing: -0.01em;  }
.display-s  { font-size: 1.75rem; line-height: 1.20; }

/* Hero + section leads. Upright display serif at Lead size, NOT italic —
 * italic at multi-sentence length reads as tiring. Italic is reserved
 * here for short quotations (see .testimonial blockquote,
 * .testimonial::before, .dropcap::first-letter) where the convention
 * that "italic = brief quoted phrase" reads correctly. Renamed from
 * .lead-italic on 2026-09-22 (display face was Fraunces at the time;
 * later swapped to Playfair Display — same class, same treatment). */
.lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

p { margin: 0 0 1rem; font-size: 1rem; line-height: 1.6; }
.body-l { font-size: 1.15rem; line-height: 1.65; }
.small  { font-size: 0.9rem; line-height: 1.5; font-weight: 500; color: var(--color-text-muted); }
.label  { font-size: 0.85rem; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.micro  { font-size: 0.75rem; line-height: 1.4; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--color-accent); }

strong { font-weight: 600; }

/* ─── Layout ──────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--width-standard);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
.container.extra-narrow { max-width: var(--width-extra-narrow); }
.container.narrow       { max-width: var(--width-narrow); }
.container.wide         { max-width: var(--width-wide); }

/* Section rhythm — alternating cream / white per spec §4.1 */
.section {
  padding: var(--space-7) 0;
  background: var(--color-bg);
}
.section.alt { background: var(--color-surface); }
.section.hero { padding: var(--space-8) 0; position: relative; }

/* Asymmetric section header pattern — eyebrow + H2 left, body content
 * centered below. Spec §4.2. */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: var(--space-6);
}
.section-header .eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.section-header h2 {
  max-width: 20ch;
}

/* Hairline brass rule — editorial punctuation per spec §4.1 */
.rule-brass {
  border: 0;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.6;
  margin: var(--space-6) auto;
  max-width: 120px;
}

/* ─── Site nav ────────────────────────────────────────────
 * Per spec §5. 76px height, white bg, hairline bottom border,
 * launcher icon + Playfair Display wordmark on the left, nav items
 * on the right, single primary CTA "Get the app" as rightmost item.
 * (Spec §5 originally called for italic Fraunces here; wordmark went
 * upright + display face swapped to Playfair Display on 2026-09-22.)
 *
 * NAV MARKUP IS DUPLICATED VERBATIM ACROSS ALL SIX PAGES. There is
 * no template engine (deliberate — no build step). If you change the
 * nav structure, update every .html file. */

nav.site-nav {
  height: 76px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
nav.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
nav.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
nav.site-nav .brand img {
  width: 40px;
  height: 40px;
}
nav.site-nav .brand .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--color-ink);
}
nav.site-nav ul {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
nav.site-nav ul a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
}
nav.site-nav ul a:hover { color: var(--color-ink); }
nav.site-nav ul a[aria-current="page"] {
  color: var(--color-ink);
}
nav.site-nav ul a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--color-accent);
}
nav.site-nav .cta {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-accent);
  color: var(--color-nav-ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sharp);
}
nav.site-nav .cta:hover { background: var(--color-accent-hover); }

/* ─── Site footer ─────────────────────────────────────────
 * Per spec §6.4. Burgundy bg, 4-column grid, brass column headers,
 * white body copy. */

footer.site-footer {
  background: var(--color-primary);
  color: var(--color-nav-ink);
  padding: var(--space-7) 0 var(--space-4);
  margin-top: var(--space-7);
}
footer.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-6);
}
footer.site-footer .brand-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
footer.site-footer .brand-col .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-nav-ink);
}
footer.site-footer .brand-col .brand img {
  width: 40px;
  height: 40px;
}
footer.site-footer .brand-col .brand .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
}
footer.site-footer .brand-col .tagline {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 32ch;
}
footer.site-footer h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
footer.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
footer.site-footer ul a {
  color: var(--color-nav-ink);
  opacity: 0.8;
  font-size: 0.9rem;
  text-decoration: none;
}
footer.site-footer ul a:hover { opacity: 1; }
/* Footer bottom strip — copyright + trademark line, hairline top
 * divider. Spans the full 4-column footer grid (grid-column 1 / -1)
 * and text-align:center for horizontal centering across the
 * container's 1200px max-width. Copyright renders at low opacity
 * (0.55 white) — deliberately quiet to keep visual weight on the
 * marketing content above the divider. The .footer-maker class + its
 * three-tier hierarchy (a Mathory carry-over) was removed on
 * 2026-09-24 when the maker-credit line was dropped from all pages. */
footer.site-footer .footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  text-align: center;
}
footer.site-footer .footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
footer.site-footer .footer-bottom .footer-copy {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

/* ─── Buttons — spec §6.1 ──────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius-sharp);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}
.btn.primary {
  background: var(--color-accent);
  color: var(--color-nav-ink);
}
.btn.primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(1px);
}
.btn.secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn.secondary:hover {
  background: var(--color-primary);
  color: var(--color-nav-ink);
}
.btn.ghost {
  padding: 0;
  background: transparent;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}
.btn.ghost:hover { color: var(--color-accent); }

/* Play Store badge — official Google asset. Sized restrictively so
 * the badge doesn't dominate hero moments. */
.play-badge {
  display: inline-block;
  height: 60px;
  transition: transform 150ms ease;
}
.play-badge:hover { transform: translateY(-1px); }
.play-badge img { height: 100%; width: auto; }

/* ─── Cards — spec §6.2 ────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sharp);
  padding: var(--space-5);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.card.content:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(27, 22, 19, 0.06);
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}
.card p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* Stat card — bare typography, no borders. Spec §4.3.2. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  text-align: center;
}
.stat .number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--color-accent);
}
.stat .label {
  margin-top: var(--space-2);
}

/* Testimonial — single-column narrow. Spec §4.3.3. */
.testimonial {
  max-width: var(--width-narrow);
  margin: 0 auto;
  padding: 0 var(--space-4);
  text-align: center;
  position: relative;
}
.testimonial::before {
  content: '\201C';                   /* left double quotation mark */
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 5rem;
  color: var(--color-accent);
  line-height: 1;
  display: block;
  margin-bottom: -1.5rem;
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--color-ink);
  margin: 0 0 var(--space-4);
}
.testimonial .attribution {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-accent);
  display: inline-block;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Hero motif — spec §3.5. Absolute-positioned bottom-right of hero
 * container. 8rem, brass at 8% opacity, single-weight linework SVG
 * generated in Task 5. Only used in Pattern B (Home hero). */
.hero-motif {
  position: absolute;
  right: 4rem;
  bottom: 4rem;
  width: 8rem;
  height: 8rem;
  color: var(--color-accent);
  opacity: 0.08;
  pointer-events: none;
}
.hero-motif img { width: 100%; height: 100%; }

/* Dropcap — first-letter of first paragraph on long-form pages. Spec
 * §3.2 editorial signatures. */
.dropcap::first-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
  font-size: 5rem;
  line-height: 1;
  float: left;
  margin: 0.1em 12px 0 0;
}

/* Long-form article styling — used on Privacy + Terms */
.article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}
.article h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}
.article p, .article li {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-ink);
}
.article ul {
  margin-bottom: var(--space-3);
  padding-left: var(--space-4);
}
.article .last-updated {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

@media (max-width: 720px) {
  .card-grid, .stat-grid { grid-template-columns: 1fr; }
  footer.site-footer .container {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  nav.site-nav ul { display: none; }
  .hero-motif { right: 1rem; bottom: 1rem; width: 5rem; height: 5rem; }
}
