/* ============================================================
   Dew Crew website — design tokens mirror Dew Crew/Support/DesignTokens.swift
   exactly (hex values pulled from Assets.xcassets colorsets, not eyeballed).
   ============================================================ */

:root {
  /* Crew colors */
  --crew-gold: #F0B429;
  --crew-green: #7CB768;
  --crew-blue: #5EC4E0;
  --crew-purple: #9B7EDE;
  --crew-pink: #F0A0C0;

  /* Purple accent scale */
  --brand-purple-light: #EFE8FB;
  --brand-purple: #9B7EDE;
  --brand-purple-dark: #6B4FB0;

  /* Neutrals */
  --bg: #FDF8F3;
  --surface: #FFFFFF;
  --text-primary: #3A332E;
  --text-secondary: #7A7069;
  --border: #E8E0D8;

  /* Semantic */
  --success: #5CAE7A;
  --error: #E86A5E;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-xxxl: 48px;

  /* Elevation */
  --shadow-resting: 0 2px 8px rgba(58, 51, 46, 0.06);
  --shadow-raised: 0 8px 24px rgba(58, 51, 46, 0.10);

  /* Type */
  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", sans-serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --content-width: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 var(--space-md);
  line-height: 1.15;
  color: var(--text-primary);
}
h1 { font-size: 48px; font-weight: 700; }
h2 { font-size: 32px; }
h3 { font-size: 22px; }

p { margin: 0 0 var(--space-lg); color: var(--text-secondary); }

a { color: var(--brand-purple-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.caption {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand-purple);
  color: #fff;
  box-shadow: var(--shadow-raised);
}
.btn-primary:hover { background: var(--brand-purple-dark); }

.btn-secondary {
  background: transparent;
  color: var(--brand-purple-dark);
  border: 2px solid var(--brand-purple-light);
}
.btn-secondary:hover { border-color: var(--brand-purple); background: var(--brand-purple-light); }

.btn-note {
  display: block;
  margin-top: var(--space-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 243, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
}
.brand:hover { text-decoration: none; }
.brand-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--crew-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-dot svg { width: 18px; height: 18px; }

.main-nav { display: flex; align-items: center; gap: var(--space-xxl); }
.main-nav a {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
}
.main-nav a:hover { color: var(--brand-purple-dark); text-decoration: none; }
.main-nav .btn { padding: 10px 22px; font-size: 15px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--text-primary); }

@media (max-width: 760px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-md) var(--space-xl) var(--space-xl);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: var(--space-md) 0; border-bottom: 1px solid var(--border); }
  .main-nav .btn { margin-top: var(--space-lg); }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-media {
  width: 100%;
  aspect-ratio: 1.79 / 1;
  object-fit: cover;
  object-position: center 65%;
}
.hero-copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8vw var(--space-xl) 0;
  text-align: center;
}
.hero-copy h1 {
  font-size: clamp(34px, 6vw, 64px);
  max-width: 820px;
  margin: 0 auto var(--space-md);
}
.hero-copy .lede {
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-primary);
}
.hero-cta { display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hero-media { aspect-ratio: 1 / 1.05; object-position: center 80%; }
  .hero-copy { padding-top: 40px; }
}

/* ---------- Sections ---------- */
section { padding: var(--space-xxxl) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-xxl); }
.section-head .caption { display: block; margin-bottom: var(--space-sm); }

.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Value strip ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xxl) var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-resting);
}
.value-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.value-icon svg { width: 30px; height: 30px; }
.value-card h3 { margin-bottom: var(--space-sm); }
.value-card p { margin-bottom: 0; }

@media (max-width: 860px) {
  .value-grid { grid-template-columns: 1fr; }
}

/* ---------- How it works steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xxl) var(--space-xl) var(--space-xl);
  text-align: center;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-purple);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-resting);
}
.step-icon { width: 56px; height: 56px; margin: 0 auto var(--space-md); color: var(--brand-purple-dark); }
.step-icon svg { width: 100%; height: 100%; }
.step h3 { font-size: 19px; margin-bottom: var(--space-sm); }
.step p { margin-bottom: 0; font-size: 15px; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Crew grid ---------- */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
}
.crew-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-resting);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease;
  text-decoration: none;
  display: block;
  color: inherit;
}
.crew-card:hover, .crew-card:focus-visible {
  transform: scale(1.04);
  box-shadow: var(--shadow-raised);
  text-decoration: none;
}
.crew-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.crew-card-body { padding: var(--space-lg) var(--space-md); text-align: center; }
.crew-role-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.crew-role-icon svg { width: 18px; height: 18px; }
.crew-card-body h3 { font-size: 17px; margin-bottom: 2px; }
.crew-card-body .role { font-size: 13px; color: var(--text-secondary); font-weight: 700; }

@media (max-width: 860px) {
  .crew-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Homepage teaser strip (smaller, non-linking-per-card variant reused via .crew-card) */
.crew-teaser-grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 640px) {
  .crew-teaser-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Road / feature split section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxl);
  align-items: center;
}
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.split .eyebrow { color: var(--brand-purple-dark); font-weight: 700; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split .split-media { order: -1; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(180deg, var(--brand-purple-light) 0%, var(--bg) 100%);
  text-align: center;
}
.cta-band h2 { margin-bottom: var(--space-sm); }
.cta-band p { max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xxl) 0;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.footer-links { display: flex; gap: var(--space-xl); }
.footer-links a { color: var(--text-secondary); font-weight: 700; font-size: 14px; }
.footer-copy { color: var(--text-secondary); font-size: 14px; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  padding: var(--space-xxxl) 0 var(--space-xl);
  text-align: center;
}
.page-header p { max-width: 560px; margin: 0 auto; }

/* ---------- Content pages (privacy/support) ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: var(--space-xxxl);
}
.doc h2 { margin-top: var(--space-xxl); }
.doc ul { color: var(--text-secondary); padding-left: 1.2em; }
.doc li { margin-bottom: var(--space-sm); }
.doc .updated { color: var(--text-secondary); font-size: 14px; margin-bottom: var(--space-xxl); }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
}
.faq-item h3 { font-size: 18px; margin-bottom: var(--space-sm); color: var(--brand-purple-dark); }
.faq-item p { margin-bottom: 0; }

.contact-card {
  background: var(--brand-purple-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  margin-bottom: var(--space-xxl);
}
.contact-card .email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--brand-purple-dark);
  margin-top: var(--space-sm);
}

/* ---------- Motion ---------- */
@keyframes idleBob {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-6px) rotate(-1.5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
.idle-bob { animation: idleBob 3.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .idle-bob { animation: none; }
  html { scroll-behavior: auto; }
  .crew-card, .btn { transition: none; }
}
