/* ==========================================================
   TBL Flights — Coming Soon
   ========================================================== */

:root {
  --brand: #0b2b9c;
  --brand-bright: #2f5bff;
  --ink: #050a1f;
  --ink-2: #0a1233;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.14);

  --ring-font: "Archivo", "Arial Black", Impact, sans-serif;
  --ui-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Size of the 3D stage — everything inside scales from this */
  --stage: min(80vw, 62vh, 640px);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--white);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

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

/* ---------- Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 45%, var(--ink-2) 0%, var(--ink) 60%, #02040d 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.glow--a {
  width: 60vmax; height: 60vmax;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(47, 91, 255, 0.55), rgba(11, 43, 156, 0) 65%);
  animation: breathe 9s ease-in-out infinite;
}
.glow--b {
  width: 40vmax; height: 40vmax;
  right: -12vmax; bottom: -16vmax;
  background: radial-gradient(circle, rgba(11, 43, 156, 0.7), transparent 65%);
}

@keyframes breathe {
  0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 0.7;  transform: translate(-50%, -50%) scale(1.08); }
}

#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Top / bottom bars ---------- */
.bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 48px);
}

.brand img {
  width: auto;
  height: clamp(44px, 6vw, 64px);
}

.link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
}
.link:hover { opacity: 1; }
.link:not(.link--pill)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.link:not(.link--pill):hover::after { transform: scaleX(1); transform-origin: left; }

.link--pill {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.link--pill:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

.social { display: flex; gap: clamp(16px, 3vw, 40px); flex-wrap: wrap; }

.copyright {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  gap: clamp(8px, 2vh, 24px);
}

.stage {
  position: relative;
  width: var(--stage);
  height: calc(var(--stage) * 0.82);
  perspective: calc(var(--stage) * 2.4);
  perspective-origin: 50% 40%;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.2s ease, transform 1.4s cubic-bezier(.2, .8, .2, 1);
}
.is-ready .stage { opacity: 1; transform: scale(1); }

.scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Orb */
.orb {
  position: absolute;
  left: 50%; top: 50%;
  width: calc(var(--stage) * 0.48);
  height: calc(var(--stage) * 0.48);
  margin: calc(var(--stage) * -0.24) 0 0 calc(var(--stage) * -0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #6f8dff 0%, #2f5bff 18%, #1236c4 42%, #0b2b9c 62%, #06175a 82%, #030a2e 100%);
  box-shadow:
    inset -18px -26px 60px rgba(0, 0, 0, 0.55),
    inset 10px 14px 40px rgba(140, 170, 255, 0.25),
    0 0 80px rgba(47, 91, 255, 0.35),
    0 0 180px rgba(47, 91, 255, 0.18);
  animation: float 7s ease-in-out infinite;
}
.orb__shade {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 70% 80%, rgba(90, 130, 255, 0.35), transparent 40%);
  mix-blend-mode: screen;
}
.orb__plane {
  position: absolute;
  left: 50%; top: 50%;
  width: 36%;
  transform: translate(-44%, -72%) rotate(-4deg);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
  animation: plane 5s ease-in-out infinite;
}
.orb__shine {
  position: absolute;
  left: 18%; top: 10%;
  width: 34%; height: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%);
  transform: rotate(-28deg);
  filter: blur(2px);
}

@keyframes float {
  0%, 100% { translate: 0 -1.5%; }
  50%      { translate: 0 1.5%; }
}
@keyframes plane {
  0%, 100% { transform: translate(-44%, -72%) rotate(-4deg); }
  50%      { transform: translate(-38%, -80%) rotate(2deg); }
}

/* Text ring */
.ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
}

.ch {
  position: absolute;
  left: 0; top: 0;
  transform-style: preserve-3d;
  font-family: var(--ring-font);
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1;
  white-space: pre;
}

.ch span {
  position: absolute;
  left: 0; top: 0;
  backface-visibility: visible;
}

/* front face */
.ch .face {
  color: #ffffff;
}
/* extruded depth layers (set by JS) */
.ch .depth { color: #1b3cc0; }

/* soft contact shadow under the stage */
.shadow {
  position: absolute;
  left: 50%; bottom: 2%;
  width: 46%; height: 7%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65), transparent 70%);
  filter: blur(6px);
}

/* Copy */
.copy {
  text-align: center;
  max-width: 560px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
}
.is-ready .copy { opacity: 1; transform: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  100% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
}

.lead {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sub {
  margin: 0;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  :root { --stage: min(92vw, 52vh); }
  .bar--bottom { flex-direction: column-reverse; gap: 14px; }
  .link { font-size: 12px; }
  .link--pill { padding: 8px 14px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root { --stage: min(60vw, 64vh); }
  .copy .sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .glow--a, .orb, .orb__plane, .dot { animation: none; }
}
