/* Avey Kay — Passenger Seat base */

:root {
  --wheat: #d4b896;
  --cream: #f3ebe0;
  --sage: #8a9a7b;
  --clay: #a67c5d;
  --dusk-rose: #c9897a;
  --ink: #2a221c;
  --ink-soft: rgba(42, 34, 28, 0.72);
  --paper: #f7f0e4;
  --paper-edge: #e6d8c4;
  --display: "Rye", "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --deck-h: 7.75rem;
  --focus: #e6d2b0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::selection {
  background: rgba(212, 184, 150, 0.45);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--cream);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.55;
  background: #1a120c;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  transition: opacity 0.8s var(--ease);
}

body.is-booting {
  opacity: 0;
}

body.is-ready {
  opacity: 1;
}

body[data-light="dawn"] {
  --sky-top: #f2b8a8;
  --sky-mid: #f0d0b0;
  --sky-bot: #d4a878;
}

body[data-light="day"] {
  --sky-top: #7eb6e0;
  --sky-mid: #b8d4e8;
  --sky-bot: #e8d4b0;
}

body[data-light="dusk"] {
  --sky-top: #5a3a4a;
  --sky-mid: #c9897a;
  --sky-bot: #d4a060;
}

body[data-light="night"] {
  --sky-top: #0e1520;
  --sky-mid: #1a2438;
  --sky-bot: #2a3040;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--sky-top) 0%,
    var(--sky-mid) 42%,
    var(--sky-bot) 100%
  );
  transition: background 2.4s var(--ease);
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.plate {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition:
    opacity 1.2s var(--ease),
    filter 1.2s var(--ease),
    transform 1.2s var(--ease);
}

.plate-field {
  background-image: url("../assets/plates/field-at-dusk.png");
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.02);
}

.plate-cabin {
  background-image: url("../assets/plates/passenger-seat.png");
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    transparent 16%,
    rgba(0, 0, 0, 0.4) 32%,
    #000 50%,
    #000 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    transparent 16%,
    rgba(0, 0, 0, 0.4) 32%,
    #000 50%,
    #000 100%
  );
}

.stage-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 8, 4, 0);
  transition: background 0.7s var(--ease);
}

body.is-reading .stage-scrim {
  background: rgba(14, 8, 4, 0.55);
}

body.is-reading .plate-cabin {
  filter: brightness(0.72) saturate(0.9);
}

body.is-reading .plate-field {
  filter: brightness(0.8) saturate(0.95);
}

#atmosphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: soft-light;
  background-image:
    repeating-radial-gradient(
      circle at 12% 18%,
      rgba(255, 255, 255, 0.045) 0 1px,
      transparent 1px 3px
    ),
    repeating-radial-gradient(
      circle at 78% 64%,
      rgba(0, 0, 0, 0.05) 0 1px,
      transparent 1px 4px
    );
  background-size: 180px 180px, 220px 220px;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse 75% 70% at 50% 42%,
    transparent 40%,
    rgba(18, 10, 6, 0.55) 100%
  );
}

.journey {
  position: relative;
  z-index: 3;
}

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1.25rem, 4vw, 3rem);
  padding-bottom: calc(var(--deck-h) + 1.5rem + env(safe-area-inset-bottom, 0px));
}

.panel-hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-copy {
  position: relative;
  max-width: 36rem;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: 4px;
  background:
    linear-gradient(
      180deg,
      rgba(18, 10, 6, 0.18) 0%,
      rgba(18, 10, 6, 0.55) 45%,
      rgba(18, 10, 6, 0.72) 100%
    );
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.panel-tight {
  min-height: auto;
  padding-top: clamp(3rem, 10vh, 6rem);
  padding-bottom: calc(var(--deck-h) + 3rem + env(safe-area-inset-bottom, 0px));
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--wheat);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.brand {
  font-size: clamp(3.2rem, 12vw, 6.5rem);
}

.lede {
  max-width: 28rem;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--cream);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.cta-row-center {
  justify-content: center;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(243, 235, 224, 0.78);
  transition: color 0.2s var(--ease);
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  color: var(--cream);
}

.scroll-cue:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.scroll-cue span {
  display: inline-block;
  margin-left: 0.35rem;
  animation: cue-bob 1.8s var(--ease) infinite;
}

@keyframes cue-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

.windshield-note {
  position: fixed;
  top: 16%;
  right: 8%;
  z-index: 4;
  max-width: 14rem;
  padding: 0.85rem 1rem;
  font-family: "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.05rem;
  color: rgba(243, 235, 224, 0.82);
  opacity: 0;
  transform: rotate(-4deg) translateY(8px);
  pointer-events: none;
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
  text-shadow: 0 0 18px rgba(255, 220, 180, 0.25);
}

.windshield-note.is-visible {
  opacity: 1;
  transform: rotate(-4deg) translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .hero-copy {
    max-width: none;
    padding: 1.1rem 1rem 1rem;
  }

  .windshield-note {
    top: 10%;
    right: 5%;
    left: 5%;
    max-width: none;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span,
  .plate-field {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body.is-booting {
    opacity: 1;
  }
}
