/* Rush Hour Rent: Coming Soon. Dusk design language (docs/brand/design-language.md). */

@font-face {
  font-family: "Domine";
  src: url("fonts/domine-latin.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-ink: #221D3A;
  --color-text: #4E4866;
  --color-text-muted: #736C8A;
  --color-line: #E9E2D8;
  --color-paper: #FBF7F2;
  --color-surface: #FFFFFF;
  --color-coral: #FF6B4A;
  --color-coral-strong: #D4401E;
  --color-coral-ink: #B5371A;
  --color-coral-soft: #FFE9E2;
  --color-route: #5B4BDB;
  --color-route-soft: #EEEBFF;
  --color-sage: #7C957C;
  --color-map-land: #F1ECE4;

  --font-display: "Domine", Georgia, serif;
  --font-ui: "Geist", system-ui, sans-serif;

  --gutter: 16px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-text);
  font: 400 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

h1, h2, h3 { font-family: var(--font-display); color: var(--color-ink); font-weight: 500; margin: 0; }
p { margin: 0; }
a { color: var(--color-coral-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--color-route); outline-offset: 2px; }

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

.skip-link {
  position: absolute; left: var(--gutter); top: 8px; z-index: 10;
  background: var(--color-surface); color: var(--color-ink);
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--color-line);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}
.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 10px;
}
.brand-mark { flex: none; display: block; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--color-ink);
  letter-spacing: -.01em;
}
.pill {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-coral-ink);
  background: var(--color-coral-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* Lane dashes light up in sequence, like headlights coming down the road. */
.lane { animation: lane 2.4s var(--ease-out) infinite; }
.lane-2 { animation-delay: .25s; }
.lane-3 { animation-delay: .5s; }
@keyframes lane {
  0%, 60%, 100% { opacity: 1; }
  25% { opacity: .35; }
}

/* Hero */

.hero {
  display: grid;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 48px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -.01em;
  max-width: 14ch;
  text-wrap: balance;
}
.lede {
  margin-top: 16px;
  max-width: 56ch;
  font-size: 16px;
}

/* Signup */

.signup-card {
  margin-top: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 20px;
  max-width: 520px;
}
.signup-title { font-size: 20px; line-height: 1.3; margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 6px;
}
.field-row { display: grid; gap: 10px; }
.field-input {
  width: 100%;
  min-height: 52px;
  font: 400 16px/1.2 var(--font-ui); /* 16px keeps iOS from zooming on focus */
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid #B9B2C8; /* 3:1 against surface for a meaningful field border */
  border-radius: 12px;
  padding: 14px 14px;
}
.field-input::placeholder { color: var(--color-text-muted); }
.field-input[aria-invalid="true"] { border-color: var(--color-coral-ink); border-width: 2px; padding: 13px; }

.btn-primary {
  position: relative;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--color-coral-strong);
  color: #fff;
  font: 600 16px var(--font-ui);
  padding: 15px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s;
}
.btn-primary:hover, .btn-primary:active { background: var(--color-coral-ink); }
.btn-primary[disabled] { cursor: progress; }
.btn-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  opacity: 0;
}
[data-state="submitting"] .btn-label { opacity: 0; }
[data-state="submitting"] .btn-spinner { opacity: 1; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.turnstile { margin-top: 10px; }
.turnstile:empty { margin-top: 0; }

.consent {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.form-message {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--color-coral-ink);
}
.form-message:empty { display: none; }

/* Confirmation states, set by app.js through data-state. */
.result {
  display: none;
  align-items: flex-start;
  gap: 12px;
}
.result-icon { flex: none; margin-top: 2px; }
.result-title { font-weight: 500; color: var(--color-ink); font-size: 16px; }
.result-body { margin-top: 2px; }
.result:focus { outline: none; }

[data-state="subscribed"] #subscribed,
[data-state="already"] #already-subscribed { display: flex; animation: pop .45s var(--ease-out) both; }

[data-state="subscribed"] .signup-form,
[data-state="already"] .signup-form,
[data-state="subscribed"] .signup-title,
[data-state="already"] .signup-title { display: none; }

@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* Teaser */

.teaser { margin: 0; }
.teaser-frame {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(34, 29, 58, .04), 0 18px 40px -18px rgba(34, 29, 58, .25);
}
.teaser-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.teaser-placeholder {
  display: grid;
  place-items: center;
  background: var(--color-map-land);
  border: 2px dashed #CFC6B8;
  box-shadow: none;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.teaser figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-muted);
}

/* Road divider: coral lane dashes drifting along a dusk strip. */

.road {
  height: 28px;
  background: var(--color-ink);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.road-dashes {
  width: calc(100% + 64px);
  height: 3px;
  flex: none;
  background: repeating-linear-gradient(90deg, var(--color-coral) 0 32px, transparent 32px 64px);
  border-radius: 2px;
  animation: drive 1.6s linear infinite;
}
@keyframes drive { to { transform: translateX(-64px); } }

/* How it works */

.how { padding-top: 48px; padding-bottom: 64px; }
.how h2 { font-size: 32px; line-height: 1.2; letter-spacing: -.01em; }
.steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.step {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 20px;
}
.step h3 { font-size: 20px; line-height: 1.3; margin-top: 14px; }
.step p { margin-top: 6px; }
.badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font: 600 13px var(--font-ui);
}
.badge-home { background: var(--color-coral-soft); color: var(--color-coral-ink); }
.badge-dest { background: var(--color-route-soft); color: var(--color-route); }

/* Footer */

.site-footer {
  background: var(--color-ink);
  color: var(--color-paper);
}
.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand-dark .wordmark { color: var(--color-paper); font-size: 17px; }
.brand-dark img { display: block; }
.site-footer a { color: var(--color-paper); font-size: 14px; }
.site-footer :focus-visible { outline-color: var(--color-paper); }

/* Entrance */

.reveal { animation: reveal .7s var(--ease-out) both; }
.hero-copy > .reveal:nth-child(2) { animation-delay: .06s; }
.hero-copy > .reveal:nth-child(3) { animation-delay: .12s; }
.hero-copy > .reveal:nth-child(4) { animation-delay: .18s; }
.teaser.reveal { animation-duration: .9s; animation-delay: .2s; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Wider screens */

@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr auto; }
}

@media (min-width: 760px) {
  :root { --gutter: 24px; }
  .hero h1 { font-size: 40px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 56px;
    padding-top: 72px;
    padding-bottom: 80px;
  }
  .hero h1 { font-size: 48px; }
  .lede { font-size: 17px; }
  .teaser-frame { transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); }
}

/* Reduced motion: plain fades instead of movement, and nothing looping. */

@media (prefers-reduced-motion: reduce) {
  .lane, .road-dashes { animation: none; }
  .reveal { animation-name: fade; animation-duration: .3s; }
  [data-state="subscribed"] #subscribed,
  [data-state="already"] #already-subscribed { animation-name: fade; }
  [data-state="submitting"] .btn-spinner { animation-duration: 2.4s; }
  .teaser-frame { transform: none !important; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Privacy notice */

.prose { max-width: 720px; padding-top: 40px; padding-bottom: 64px; }
.prose h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.01em; }
.prose h2 { font-size: 20px; line-height: 1.3; margin-top: 28px; }
.prose p { margin-top: 8px; max-width: 64ch; }
.prose .updated { font-size: 13px; color: var(--color-text-muted); margin-top: 6px; }
.header-inner > a:not(.brand) { font-size: 14px; font-weight: 500; }
