/* ==========================================================================
   Master GDS — landing page
   Builds on app.css tokens. Motion is opt-out via prefers-reduced-motion.
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sky: #5b8bc7;
  --sky-light: #8fb4dd;
}

/* ---------- scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- navbar scroll state ---------- */
.topbar { transition: background .35s ease, box-shadow .35s ease, height .35s ease; }
.topbar.scrolled { background: rgba(8, 19, 36, .98); box-shadow: 0 10px 30px -18px rgba(0,0,0,.9); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero-x {
  position: relative;
  background: var(--midnight);
  color: #fff;
  overflow: hidden;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  isolation: isolate;
}

/* layered aurora wash */
.hero-x::before,
.hero-x::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  pointer-events: none;
}
.hero-x::before {
  width: 780px; height: 780px; top: -300px; right: -180px;
  background: radial-gradient(circle, rgba(212,175,55,.34), transparent 65%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.hero-x::after {
  width: 700px; height: 700px; bottom: -320px; left: -200px;
  background: radial-gradient(circle, rgba(91,139,199,.36), transparent 65%);
  animation: drift2 26s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(-70px, 60px, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(70px, -50px, 0) scale(1.08); } }

/* faint world map behind everything */
.hero-map {
  position: absolute; inset: 0; z-index: -1;
  opacity: .16; pointer-events: none;
  display: grid; place-items: center;
}
.hero-map svg { width: 115%; height: auto; }
.hero-map .route {
  fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round;
  stroke-dasharray: 340; stroke-dashoffset: 340;
  animation: draw 5s var(--ease-out) infinite;
}
.hero-map .route:nth-of-type(2) { animation-delay: 1.1s; stroke: var(--sky-light); }
.hero-map .route:nth-of-type(3) { animation-delay: 2.2s; }
.hero-map .route:nth-of-type(4) { animation-delay: 3.1s; stroke: var(--sky-light); }
@keyframes draw {
  0%   { stroke-dashoffset: 340; opacity: 0; }
  18%  { opacity: 1; }
  62%  { stroke-dashoffset: 0;   opacity: 1; }
  88%  { stroke-dashoffset: 0;   opacity: 0; }
  100% { stroke-dashoffset: 0;   opacity: 0; }
}
.hero-map .hub { fill: var(--gold); animation: pulseHub 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-map .hub:nth-of-type(even) { animation-delay: 1.4s; }
@keyframes pulseHub { 0%,100% { opacity:.45; r:2.2; } 50% { opacity:1; r:3.6; } }

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem 1rem .4rem .5rem;
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 100px;
  background: rgba(212,175,55,.07);
  font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}
.hero-eyebrow b {
  background: var(--gold); color: var(--midnight);
  padding: .18rem .55rem; border-radius: 100px;
  font-size: .62rem; letter-spacing: .1em;
}

.hero-x h1 {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: #fff;
  margin-bottom: 1.3rem;
}
.hero-x h1 .shine {
  background: linear-gradient(100deg, var(--gold) 20%, #fff6d5 42%, var(--gold) 64%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: -250% 0; } }

.hero-x .lead { max-width: 48ch; color: #b9c6d8; font-size: 1.05rem; font-weight: 300; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.btn-lift { position: relative; overflow: hidden; }
.btn-lift::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45), transparent 70%);
  transform: translateX(-120%);
}
.btn-lift:hover::after { transform: translateX(120%); transition: transform .8s var(--ease-out); }
.btn-lift:hover { transform: translateY(-2px); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.2rem; }
.hero-meta div { display: flex; align-items: center; gap: .55rem; font-size: .84rem; color: #9fb0c6; }
.hero-meta svg { width: 17px; height: 17px; flex: none; color: var(--gold); }

/* ---------- animated terminal ---------- */
.term {
  border-radius: 12px;
  background: #060d18;
  border: 1px solid rgba(212,175,55,.22);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.03) inset;
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(2.5deg);
  transition: transform .8s var(--ease-out);
}
.term:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(0deg) translateY(-4px); }
.term-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem .95rem;
  background: linear-gradient(180deg, #14233c, #0d1929);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-title {
  margin-left: .5rem; font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: #7d8ea6;
}
.term-badge {
  margin-left: auto; font-size: .58rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(212,175,55,.35); padding: .12rem .5rem; border-radius: 4px;
}
.term-body {
  padding: 1.1rem 1.2rem 1.4rem;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: .78rem; line-height: 1.65;
  min-height: 310px;
  color: #b7f5c8;
  white-space: pre-wrap;
}
.term-body .cmd { color: #fff; }
.term-body .dim { color: #5d7186; }
.term-body .hl  { color: var(--gold-light); }
.term-caret {
  display: inline-block; width: 8px; height: 1em;
  background: var(--gold); vertical-align: text-bottom;
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- airline ticker ---------- */
.ticker {
  border-block: 1px solid rgba(212,175,55,.15);
  background: var(--midnight-soft);
  padding: 1rem 0; overflow: hidden;
}
.ticker-label {
  text-align: center; font-size: .64rem; letter-spacing: .22em;
  text-transform: uppercase; color: #6b7c94; margin-bottom: .85rem;
}
.ticker-track { display: flex; gap: 3rem; width: max-content; animation: slide 34s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.ticker-item {
  display: flex; align-items: baseline; gap: .5rem;
  font-family: 'SF Mono', ui-monospace, monospace; white-space: nowrap;
}
.ticker-item b { color: var(--gold); font-size: 1rem; letter-spacing: .08em; }
.ticker-item span { color: #7d8ea6; font-size: .74rem; }

/* ==========================================================================
   BENTO FEATURES
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.bento-card {
  position: relative;
  grid-column: span 2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.7rem;
  overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s;
}
.bento-card:hover { transform: translateY(-5px); border-color: rgba(212,175,55,.6); box-shadow: 0 26px 50px -26px rgba(10,25,47,.45); }
.bento-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(212,175,55,.1), transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.bento-card:hover::before { opacity: 1; }
.bento-wide { grid-column: span 3; }
.bento-tall { grid-column: span 3; }
.bento-dark { background: var(--midnight); border-color: rgba(212,175,55,.3); color: #fff; }
.bento-dark h3 { color: #fff; }
.bento-dark p { color: #b9c6d8; }

.bento-ico {
  width: 46px; height: 46px; border-radius: 9px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(145deg, var(--midnight), #1d3557);
  color: var(--gold);
}
.bento-dark .bento-ico { background: rgba(212,175,55,.14); }
.bento-ico svg { width: 22px; height: 22px; }
.bento-card h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.bento-card p { font-size: .88rem; color: var(--ink-soft); margin: 0; }

/* chips inside a bento card */
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chip-mono {
  font-family: 'SF Mono', ui-monospace, monospace; font-size: .7rem;
  padding: .28rem .6rem; border-radius: 5px;
  background: rgba(212,175,55,.12); color: var(--gold-dark);
  border: 1px solid rgba(212,175,55,.25);
}
.bento-dark .chip-mono { color: var(--gold-light); }

/* ==========================================================================
   LEARNING PATH
   ========================================================================== */
.path { position: relative; display: grid; gap: 1.1rem; }
.path::before {
  content: ''; position: absolute; left: 25px; top: 12px; bottom: 12px;
  width: 2px; background: linear-gradient(180deg, var(--gold), rgba(212,175,55,.12));
}
.path-step {
  position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 1.2rem;
  align-items: start;
}
.path-num {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--midnight); color: var(--gold);
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  border: 2px solid var(--gold); z-index: 1;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.path-step:hover .path-num { transform: scale(1.08); box-shadow: 0 0 0 7px rgba(212,175,55,.14); }
.path-body { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 1.3rem 1.5rem; }
.path-body h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.path-body p { margin: 0; font-size: .89rem; color: var(--ink-soft); }

/* ==========================================================================
   FOUNDER
   ========================================================================== */
.founder-card {
  display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
  background: var(--midnight-soft); border: 1px solid rgba(212,175,55,.25);
  border-radius: 12px; padding: 2.2rem;
}
.founder-avatar {
  width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--midnight); font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 700; flex: none;
  box-shadow: 0 0 0 6px rgba(212,175,55,.12);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .term { transform: none; order: 2; }
  .term:hover { transform: translateY(-4px); }
  .bento-card, .bento-wide, .bento-tall { grid-column: span 6; }
}
@media (max-width: 620px) {
  .hero-meta { gap: .8rem 1.4rem; }
  .term-body { font-size: .68rem; min-height: 250px; }
  .founder-card { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 1.6rem; }
  .path::before { left: 19px; }
  .path-step { grid-template-columns: 40px 1fr; gap: .9rem; }
  .path-num { width: 40px; height: 40px; font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-x::before, .hero-x::after,
  .hero-map .route, .hero-map .hub,
  .ticker-track, .hero-x h1 .shine, .term-caret {
    animation: none !important;
  }
  .term { transform: none; }
}

/* ---------- compact header on phones ----------
   Brand + two actions + menu toggle must stay on one row; wrapping pushed the
   hero down by a whole button height on a 390px screen. */
@media (max-width: 560px) {
  .topbar .wrap { gap: .5rem; }
  .navactions { flex-wrap: nowrap; gap: .35rem; }
  .navactions .btn {
    padding: .46rem .62rem;
    font-size: .58rem;
    letter-spacing: .06em;
    white-space: nowrap;
  }
  .brand-mark { width: 28px; height: 28px; font-size: .78rem; }
  .brand-name { font-size: .82rem; letter-spacing: .06em; }
  .navtoggle { font-size: 1.25rem; padding: 0 .1rem; }
  .hero-x { padding-top: 2.5rem; }
  .hero-x h1 { font-size: clamp(1.95rem, 8.5vw, 2.5rem); }
  .hero-eyebrow { margin-bottom: 1.1rem; font-size: .6rem; }
  .hero-cta .btn { flex: 1 1 100%; }
}
