/* Woule "Night Drive" palette (utils/theme.ts). */
:root {
  --midnight: #14163a;
  --indigo: #5b5bf0;
  --deep-indigo: #3f3fc9;
  --coral: #ff7a59;
  --haze: #f5f5fb;
  --bg: #f5f5fb;
  --surface: #ffffff;
  --border: #e3e3f0;
  --text: #14163a;
  --muted: #53567c;
  --subtle: #6a6d90;
  --primary: #3f3fc9;
  --primary-hover: #3434b0;
  --on-primary: #ffffff;
  --plate: #c8382e;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d0e26;
    --surface: #17193f;
    --border: #2a2d5c;
    --text: #f1f1fa;
    --muted: #b8bad9;
    --subtle: #9496bf;
    --primary: #8b8bff;
    --primary-hover: #a3a3ff;
    --on-primary: #0d0e26;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0d0e26; --surface: #17193f; --border: #2a2d5c; --text: #f1f1fa; --muted: #b8bad9;
  --subtle: #9496bf; --primary: #8b8bff; --primary-hover: #a3a3ff; --on-primary: #0d0e26; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lexend', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Hero (always Midnight) */
.hero { background: var(--midnight); color: #fff; padding: 22px 0 80px; position: relative; overflow: hidden; }
.hero::after {
  /* a road's centre line */
  content: ''; position: absolute; left: 0; right: 0; bottom: 34px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--coral) 0 44px, transparent 44px 84px);
  opacity: 0.85;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 20px; }
.brand img { width: 32px; height: 32px; }
.nav a.link { color: #c9cae8; text-decoration: none; font-size: 15px; }
.nav a.link:hover { color: #fff; }
.hero-body { padding: 72px 0 24px; max-width: 640px; }
.eyebrow { color: var(--coral); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 14px; }
.hero h1 { font-size: clamp(34px, 6vw, 54px); letter-spacing: -0.01em; }
.hero p.lede { font-size: 19px; color: #d4d5ec; margin: 18px 0 28px; }
.hero .soon { color: #c9cae8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
}
.btn:hover { background: var(--primary-hover); }
.hero .btn { background: #fff; color: var(--midnight); }
.hero .btn:hover { background: var(--haze); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.soon { margin: 0; color: var(--muted); font-size: 15px; }

/* Sections */
section { padding: 64px 0; }
.section-head { max-width: 620px; margin-bottom: 32px; }
.section-head h2 { font-size: 30px; }
.section-head p { color: var(--muted); margin: 10px 0 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(91, 91, 240, 0.12); color: var(--primary); margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.school-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  text-decoration: none; color: var(--text);
}
.school-card:hover { border-color: var(--primary); }
.school-card .name { font-weight: 500; }
.school-card .meta { color: var(--subtle); font-size: 13px; }
.school-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: #fff; border: 1px solid var(--border); }
.school-logo.plate { display: grid; place-items: center; border: 2.5px solid var(--plate); color: var(--plate); font-weight: 700; font-size: 22px; }
.school-logo.lg { width: 96px; height: 96px; border-radius: 22px; font-size: 48px; }
.muted { color: var(--muted); }

.owners { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.owners .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.owners ul { margin: 0; padding-left: 20px; color: var(--muted); }
.owners li { margin: 6px 0; }

footer { padding: 32px 0 48px; color: var(--subtle); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Join page */
.join { min-height: 100vh; display: flex; flex-direction: column; }
.join .hero { padding-bottom: 60px; }
.join-card {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 22px;
  max-width: 520px; margin: -40px auto 0; padding: 32px 28px; text-align: center; position: relative; z-index: 1;
  box-shadow: 0 16px 48px rgba(20, 22, 58, 0.12);
}
.join-card h1 { font-size: 28px; margin: 18px 0 8px; }
.join-card .school-logo { margin: 0 auto; }
.join-card .actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.join-card .stores { justify-content: center; }
.steps { text-align: left; margin: 24px 0 0; padding: 18px 20px 18px 40px; background: var(--bg); border-radius: 14px; color: var(--muted); font-size: 15px; }
.steps li { margin: 4px 0; }
.steps strong { color: var(--text); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin 0.8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .owners .wrap { grid-template-columns: 1fr; }
  .hero-body { padding-top: 48px; }
  section { padding: 48px 0; }
}
/* main is a flex item in .join; without an explicit width, margin:auto shrinks it to its content */
.join main.wrap { width: 100%; }
