/* RaveBase web, shared base. Values mirror RaveBase/Theme.swift (Redesign C / C2). */

@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/DMMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/DMMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #121017;
  --surface: #1B1821;
  --surface-tint: #2A2236;
  --avatar: #2F2A38;
  --line: #2D2836;
  --line-soft: #262130;
  --line-strong: #3B3545;
  --text: #EEEAF4;
  --muted: #A29BAE;
  --accent: #B98CF5;
  --on-accent: #160F24;
  --help: #FF6B5E;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #F4EFFA;
  --surface: #FCFAFE;
  --surface-tint: #EDE3F8;
  --avatar: #E6D9F6;
  --line: #E3DAEE;
  --line-soft: #EEE7F5;
  --line-strong: #D7CBE6;
  --text: #1A1023;
  --muted: #5F5470;
  --accent: #8020CC;
  --on-accent: #FBF8FF;
  --help: #D92D20;
}

/* The six accent choices from RaveBase/AccentChoice.swift. Lila is the default above. */
[data-theme="light"][data-accent="neon"]   { --accent: #9A28D6; }
[data-theme="light"][data-accent="indigo"] { --accent: #4338CA; }
[data-theme="light"][data-accent="ozean"]  { --accent: #1D5FD0; }
[data-theme="light"][data-accent="wald"]   { --accent: #1F7A55; }
[data-theme="light"][data-accent="mono"]   { --accent: #3A3045; }
[data-theme="dark"][data-accent="neon"]    { --accent: #C040FF; }
[data-theme="dark"][data-accent="indigo"]  { --accent: #9B95FF; }
[data-theme="dark"][data-accent="ozean"]   { --accent: #7FB0FF; }
[data-theme="dark"][data-accent="wald"]    { --accent: #6FD3A4; }
[data-theme="dark"][data-accent="mono"]    { --accent: #D8D2E2; }

:root {
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --gutter: 20px;
  --r-card: 22px;
  --r-tile: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --accent-tint: color-mix(in srgb, var(--accent) 13%, transparent);
  --help-tint: color-mix(in srgb, var(--help) 12%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 40px; } }

.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* Logo: the white outline mark, recoloured through a mask so it works on both themes. */
.logo {
  width: 26px; height: 26px; flex: none;
  background: var(--text);
  -webkit-mask: url("logo-mark.png") center / contain no-repeat;
  mask: url("logo-mark.png") center / contain no-repeat;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wordmark { font: 500 15px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; }
.label { font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meta { font: 400 12px/1.3 var(--mono); color: var(--muted); }
.accent { color: var(--accent); }

/* Buttons: capsules, mono labels, like RBTextStyle.button. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font: 500 14px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--muted); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 13px; }

/* Waitlist form */
.waitlist { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
.field label { font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.input {
  width: 100%; min-height: 50px; padding: 0 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font: 400 16px/1 var(--sans); transition: border-color .2s var(--ease);
}
.input::placeholder { color: var(--muted); opacity: .7; }
.input:focus { outline: none; border-color: var(--accent); }
select.input { appearance: none; cursor: pointer; }
.field-row { display: grid; gap: 14px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.inline-submit { display: flex; gap: 10px; }
.inline-submit .input { flex: 1; min-width: 0; }
@media (max-width: 479px) { .inline-submit { flex-direction: column; } }
.form-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.form-msg { font-size: 14px; min-height: 1.5em; }
.form-msg[data-kind="error"] { color: var(--help); }
.form-msg[data-kind="ok"] { color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--help); }

/* Crew live card: a real, working mini version of the app's crew list. Demo data only. */
.crew {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px; width: 100%;
}
.crew-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 4px 14px; }
.crew-title { font-weight: 700; font-size: 18px; line-height: 1.2; margin-top: 6px; }
.crew-list { list-style: none; margin: 0; padding: 0; }
.crew-row {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 4px; border-top: 1px solid var(--line-soft);
}
.crew-row:first-child { border-top: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--avatar); font: 500 14px/1 var(--mono); color: var(--text);
}
.crew-row[data-me] .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.crew-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.crew-state { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.3; }
.crew-state .icon { width: 14px; height: 14px; color: var(--accent); }
.crew-row[data-state="help"] { background: var(--help-tint); border-radius: var(--r-tile); border-top-color: transparent; }
.crew-row[data-state="help"] + .crew-row { border-top-color: transparent; }
.crew-row[data-state="help"] .crew-state, .crew-row[data-state="help"] .crew-state .icon { color: var(--help); }
.crew-row.flash { animation: flash .7s var(--ease); }
@keyframes flash { from { background: var(--accent-tint); } to { background: transparent; } }

.taps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.tap {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.tap:active { transform: scale(.97); }
.tap .icon { width: 16px; height: 16px; }
.tap[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tap[data-kind="help"] { color: var(--help); border-color: color-mix(in srgb, var(--help) 45%, transparent); }
.tap[data-kind="help"][aria-pressed="true"] { background: var(--help); border-color: var(--help); color: var(--bg); }
.crew-foot { display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px 0; }
.crew-hint { font-size: 13px; color: var(--muted); min-height: 2.6em; padding: 10px 4px 0; line-height: 1.45; }

/* Reveal on scroll (IntersectionObserver adds .in). Off under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .reveal.in { opacity: 1; transform: none; }
  .rise { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } }
}

.footer { border-top: 1px solid var(--line); padding-block: 28px 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer a:hover { color: var(--text); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
