/* ==========================================================================
   Banora — new landing (Departures aesthetic).
   New design-system stylesheet. Legacy /styles.css is still used by the
   other pages until they are re-themed.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces-Variable.woff2') format('woff2-variations'),
       url('/fonts/Fraunces-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces-Italic-Variable.woff2') format('woff2-variations'),
       url('/fonts/Fraunces-Italic-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Variable.woff2') format('woff2-variations'),
       url('/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/GeistMono-Variable.woff2') format('woff2-variations'),
       url('/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette — read from CLAUDE.md */
  --cream:         #F5F0E8;
  --cream-deep:    #ECE5D8;
  --ink:           #1A1819;
  --ink-soft:      #4A4744;
  --ink-mute:      #8C8884;

  --indigo:        #2A1B5E;
  --indigo-deep:   #1F1349;
  --indigo-soft:   #6B5BA8;
  --on-indigo:     #F4EFE5;

  --sage:          #BFD4C2;
  --lilac:         #C8B7E0;
  --blush:         #F0C6BC;
  --sky:           #C2D6E8;
  --sand:          #E8D9BE;

  --mic:           #E04A2B;
  --mic-glow:      #F5C4B5;
  --waveform:      #F4D03F;
  --fan-violet:    #4B2A8E;

  /* Motion */
  --ease-enter:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-exit:     cubic-bezier(0.64, 0, 0.78, 0);

  /* Type */
  --font-display:  'Fraunces', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --font-body:     'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:     'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --max:           1180px;
  --pad:           clamp(24px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.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;
}

/* ---------- WIP gating: hide sections until ?preview=1 ---------- */
[data-wip="true"] { display: none; }
html[data-preview="true"] [data-wip="true"] { display: revert; }

:focus-visible {
  outline: 2px solid rgba(224, 74, 43, 0.42);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ----- shared scaffolding ----- */

main { display: block; }

.moment {
  padding: clamp(60px, 9vh, 120px) var(--pad);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
}

/* ==========================================================================
   1. SIGNATURE MOMENT — scroll-pinned Departures sequence
   ========================================================================== */

.hero {
  min-height: 100vh;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.hero-chrome {
  position: absolute;
  inset: clamp(20px, 3vh, 36px) clamp(24px, 4vw, 56px) auto clamp(24px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 10;
  pointer-events: none;
}

.hero-chrome > * { pointer-events: auto; }

.wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.022em;
  font-variation-settings: 'opsz' 144, 'SOFT' 70, 'wght' 400;
  color: var(--ink);
  line-height: 1;
}

.fan-logo {
  width: 34px;
  height: 34px;
  color: var(--fan-violet);
}

.hero-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding: clamp(80px, 12vh, 140px) clamp(24px, 4vw, 56px) clamp(40px, 6vh, 80px);
  max-width: 1320px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .hero-stage {
    grid-template-columns: 1fr;
    gap: clamp(32px, 6vh, 56px);
    padding-top: clamp(96px, 14vh, 140px);
  }
}

/* ----- the card itself does NOT move during the sequence ----- */
.departures-card {
  background: var(--indigo);
  color: var(--on-indigo);
  border-radius: 24px;
  padding: clamp(24px, 3.2vw, 40px);
  aspect-ratio: 3 / 4;
  max-width: 480px;
  width: 100%;
  justify-self: end;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 36px 70px rgba(26, 24, 25, 0.16),
              0 10px 22px rgba(26, 24, 25, 0.08);
}

@media (max-width: 860px) {
  .departures-card { justify-self: center; max-width: 420px; }
}

.card-metadata {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.card-label,
.card-timestamp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--indigo-soft);
}

.card-timestamp { white-space: nowrap; }

/* ----- quote stack: only one quote visible at a time ----- */
.quote-stack {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 20px 0;
}

.quote {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-variation-settings: 'wght' 800;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--on-indigo);
  margin: 0;
  /* Inactive quotes pre-positioned below the card, invisible.
     The first quote is reset via [data-quote="0"]. */
  transform: translateY(100%);
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

.quote[data-quote="0"] {
  transform: translateY(0);
  opacity: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ghost-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--indigo-soft);
  opacity: 0.45;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.04em;
  user-select: none;
}

.category-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--indigo);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background-color 320ms var(--ease-out);
}

/* ----- right column: taglines + lede ----- */
.hero-text {
  max-width: 520px;
  align-self: center;
}

.taglines {
  position: relative;
  margin-bottom: clamp(20px, 2.5vh, 32px);
}

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 70, 'wght' 400;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.024em;
  color: var(--ink);
  margin: 0;
}

.tagline-2,
.tagline-3 {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 36em;
  margin: 0 0 clamp(16px, 2vh, 24px) 0;
}

.coming-to-ios {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}

/* Static initial card lift — runs once on load. GSAP takes over for the
   pinned sequence. Skipped under reduced-motion via the global rule. */
.departures-card,
.taglines,
.lede,
.coming-to-ios {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-lift 800ms var(--ease-out) forwards;
}
.wordmark, .fan-logo  { opacity: 0; transform: translateY(-8px); animation: hero-lift 700ms var(--ease-out) forwards; }
.taglines             { animation-delay: 120ms; }
.departures-card      { animation-delay: 240ms; }
.lede                 { animation-delay: 360ms; }
.coming-to-ios        { animation-delay: 480ms; }

@keyframes hero-lift {
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   2. ARCHES (how it works)
   ========================================================================== */

.m-arches {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

.toggle-pill {
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  gap: 2px;
}

.toggle-pill__opt {
  font-family: var(--font-body);
  font-weight: 300;
  font-variation-settings: 'wght' 300;
  font-size: 14px;
  padding: 10px 24px;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: background-color 350ms var(--ease-enter),
              color 350ms var(--ease-enter),
              font-variation-settings 350ms var(--ease-enter);
}

.toggle-pill__opt.is-active {
  background: var(--ink);
  color: var(--cream);
  font-variation-settings: 'wght' 700;
}

.arches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(8px, 1.4vw, 18px);
  width: 100%;
  max-width: 820px;
  height: 340px;
  align-items: end;
}

.arch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  height: 100%;
}

.arch__bar {
  width: 100%;
  height: var(--h, 60%);
  background: var(--c, var(--sage));
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  position: relative;
  transform-origin: bottom;
  transition: height 600ms var(--ease-enter),
              background-color 400ms var(--ease-enter);
}

.arch__circle {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  box-shadow: 0 2px 4px rgba(26, 24, 25, 0.06);
}

.arch__circle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.arch__label {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 300;
  color: var(--ink);
  text-align: center;
  min-height: 32px;
  line-height: 1.25;
  padding: 0 2px;
  word-break: break-word;
}

/* Arch entrance — scaleY rise, staggered */
.arches:not(.is-in-view) .arch__bar { transform: scaleY(0); }
.arches.is-in-view .arch__bar {
  animation: arch-rise 900ms var(--ease-enter) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}

@keyframes arch-rise {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@supports (animation-timeline: view()) {
  .arches .arch__bar {
    transform: scaleY(0);
    animation: arch-rise 1ms linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }
  /* When using the scroll timeline, the JS is-in-view class still works as a fallback hook */
}

/* The flex column parent (.m-arches) does NOT stretch its cross-axis;
   without `width: 100%` here the absolute children get a 0-width
   containing block and each word wraps to its own line. */
.arches-copy {
  width: 100%;
  max-width: 620px;
  text-align: center;
  position: relative;
  min-height: 96px;
}

.arches-copy__p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms var(--ease-enter);
}

.arches-copy__p[data-active="true"] {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   3. LISTENING (full-bleed indigo)
   ========================================================================== */

.m-listening {
  background: var(--indigo);
  color: var(--on-indigo);
  padding-left: 0;
  padding-right: 0;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  padding-top: clamp(64px, 12vh, 140px);
  padding-bottom: clamp(64px, 12vh, 140px);
}

.listening-label {
  color: var(--on-indigo);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.2em;
}

.waveform-wrap {
  width: min(70%, 760px);
  padding: 0 var(--pad);
}

.waveform-wrap svg {
  width: 100%;
  height: 96px;
}

.wave-base {
  stroke: var(--indigo-soft);
  stroke-width: 1.4;
  fill: none;
  opacity: 0.7;
}

.wave-yellow {
  stroke: var(--waveform);
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: wave 4.6s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { d: path('M0 50 Q 50 50 100 50 T 200 50 T 300 50 T 400 50 T 500 50 T 600 50 T 700 50 T 800 50'); }
  20%      { d: path('M0 50 Q 50 32 100 50 T 200 44 T 300 56 T 400 38 T 500 52 T 600 46 T 700 50 T 800 50'); }
  40%      { d: path('M0 50 Q 50 56 100 38 T 200 30 T 300 60 T 400 28 T 500 62 T 600 40 T 700 52 T 800 50'); }
  60%      { d: path('M0 50 Q 50 42 100 60 T 200 28 T 300 56 T 400 32 T 500 58 T 600 36 T 700 48 T 800 50'); }
  80%      { d: path('M0 50 Q 50 54 100 44 T 200 56 T 300 42 T 400 50 T 500 46 T 600 52 T 700 50 T 800 50'); }
}

.encour {
  position: relative;
  width: 100%;
  max-width: 680px;
  min-height: 1.6em;
  padding: 0 var(--pad);
  text-align: center;
}

.encour__line {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 80, 'wght' 400;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--on-indigo);
  opacity: 0;
  transition: opacity 1000ms var(--ease-enter);
}

.encour__line.is-active { opacity: 1; }

/* ==========================================================================
   4. RETURNS (closing moment)
   ========================================================================== */

.m-returns {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: clamp(36px, 5vw, 72px);
  padding-top: clamp(80px, 13vh, 160px);
  padding-bottom: clamp(40px, 7vh, 80px);
  align-items: center;
}

@media (min-width: 900px) {
  .m-returns { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

.ret-card {
  background: var(--indigo);
  color: var(--on-indigo);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 32px);
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 26px;
  box-shadow: 0 22px 44px rgba(26, 24, 25, 0.13);
}

.ret-card__head,
.ret-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ret-card .mono { color: var(--indigo-soft); }

.ret-card__quote {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--on-indigo);
}

.ret-card__tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--on-indigo);
  opacity: 0.85;
}

.ret-prose {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 460px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 64px var(--pad) 56px;
  max-width: var(--max);
  margin: 56px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(26, 24, 25, 0.08);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--font-body);
  font-size: 13px;
}

.footer__nav a {
  color: var(--ink-soft);
  transition: color 200ms var(--ease-enter);
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  color: var(--ink);
}

.footer__addr {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .arches .arch__bar { transform: none !important; }
  .quote,
  .encour__line,
  .arches-copy__p,
  .dep-card__tag { transition: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 740px) {
  .topbar { padding-top: 24px; padding-bottom: 8px; }
  .m-departures { padding-top: 16px; gap: 32px; }
  .dep-card { aspect-ratio: auto; min-height: 460px; max-width: 100%; }
  .arches { height: 240px; max-width: 100%; gap: 6px; }
  .arch__circle { width: 28px; height: 28px; bottom: 8px; }
  .arch__circle svg { width: 14px; height: 14px; }
  .arch__label { font-size: 10.5px; min-height: 38px; margin-top: 10px; }
  .waveform-wrap { width: 88%; }
  .ret-card { max-width: 100%; }
  .footer { padding-top: 48px; }
}

@media (max-width: 420px) {
  .arches { height: 200px; }
}
