/* ========== LUMIO — fonts, tokens, base ========== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-0: #04061a;        /* deepest midnight */
  --bg-1: #070a25;        /* cosmic navy */
  --bg-2: #0c1235;        /* raised navy */
  --bg-3: #131a47;        /* card navy */
  --ink: #1c2659;         /* hairline */

  --gold: #e9c179;
  --gold-bright: #f6dca3;
  --gold-deep: #b48a44;
  --gold-glow: rgba(233, 193, 121, 0.45);

  --cream: #f5ecd6;
  --paper: #efe6cf;
  --text: #e9ecf7;
  --mute: #a9b1cb;
  --mute-2: #6b7398;

  --serif: 'Cormorant Garamond', 'Cormorant', 'Apple Garamond', Georgia, serif;
  --sans:  'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  /* layered cosmic background — radial pools of color over deep midnight */
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(233,193,121,0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(80,110,220,0.10), transparent 60%),
    radial-gradient(1200px 800px at 50% 110%, rgba(120,80,200,0.10), transparent 60%),
    linear-gradient(180deg, #04061a 0%, #060924 40%, #04061a 100%);
}

.font-serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.font-sans  { font-family: var(--sans); }

/* selection */
::selection { background: var(--gold); color: var(--bg-0); }

/* scrollbars (Webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #1c2659; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #2a3680; }

/* ========== Typography helpers ========== */
.h-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 8vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.h-section {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 5.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.h-card {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  color: var(--cream);
}
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.body-lead {
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.55;
  color: var(--mute);
  font-weight: 400;
}

/* ========== Gold rule / divider ========== */
.gold-rule {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--gold); font-family: var(--serif); font-style: italic;
}
.gold-rule::before, .gold-rule::after {
  content: "";
  display: block; width: 56px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-deep), transparent);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  user-select: none;
  white-space: nowrap;
}
.btn-primary {
  color: #1a1208;
  background: linear-gradient(180deg, #f6dca3 0%, #e9c179 50%, #c89a55 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 -8px 16px rgba(180,138,68,0.4) inset,
    0 10px 30px -8px rgba(233,193,121,0.5),
    0 0 0 1px rgba(180,138,68,0.6);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 -8px 16px rgba(180,138,68,0.5) inset,
    0 14px 40px -8px rgba(233,193,121,0.7),
    0 0 0 1px rgba(244,215,150,0.9);
}
.btn-ghost {
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(233,193,121,0.45);
}
.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(233,193,121,0.06);
  box-shadow: 0 0 30px -10px var(--gold-glow);
}
.btn-sm { padding: 11px 18px; font-size: 11px; letter-spacing: 0.2em; }

/* ========== Card surface — dark luxury panels with golden hairline ========== */
.surface {
  background: linear-gradient(180deg, rgba(19,26,71,0.55) 0%, rgba(8,12,40,0.7) 100%);
  border: 1px solid rgba(233,193,121,0.18);
  border-radius: 6px;
  position: relative;
}
.surface::before {
  /* subtle inner top-light */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(233,193,121,0.05), transparent 30%);
  pointer-events: none;
}
.surface-elev {
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.7),
    0 0 0 1px rgba(233,193,121,0.06) inset;
}

/* ========== Star field overlay ========== */
.starfield {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 22%, #fff6dc 0%, transparent 60%),
    radial-gradient(1px 1px at 31% 64%, #c9d5ff 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 47% 12%, #f5ecd6 0%, transparent 60%),
    radial-gradient(1px 1px at 63% 78%, #fff6dc 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 35%, #c9d5ff 0%, transparent 60%),
    radial-gradient(1px 1px at 88% 58%, #fff6dc 0%, transparent 60%),
    radial-gradient(1px 1px at 7% 80%, #fff6dc 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 56% 47%, #f5ecd6 0%, transparent 60%),
    radial-gradient(1px 1px at 22% 92%, #c9d5ff 0%, transparent 60%),
    radial-gradient(1px 1px at 71% 90%, #fff6dc 0%, transparent 60%);
  background-size: 100% 100%;
  opacity: 0.7;
}
.starfield.dense {
  background-image:
    radial-gradient(1px 1px at 4% 12%, #fff 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 19% 38%, #fff6dc 0%, transparent 60%),
    radial-gradient(1px 1px at 32% 8%, #c9d5ff 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 28%, #f5ecd6 0%, transparent 60%),
    radial-gradient(1px 1px at 57% 71%, #fff 0%, transparent 60%),
    radial-gradient(1px 1px at 69% 11%, #c9d5ff 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 81% 47%, #fff6dc 0%, transparent 60%),
    radial-gradient(1px 1px at 92% 84%, #fff 0%, transparent 60%),
    radial-gradient(1px 1px at 11% 73%, #fff 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 27% 92%, #f5ecd6 0%, transparent 60%),
    radial-gradient(1px 1px at 43% 89%, #c9d5ff 0%, transparent 60%),
    radial-gradient(1px 1px at 64% 38%, #fff6dc 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 76% 65%, #fff 0%, transparent 60%),
    radial-gradient(1px 1px at 88% 22%, #fff6dc 0%, transparent 60%);
}

/* tiny twinkle animation */
@keyframes twinkle { 0%,100% { opacity: 0.55 } 50% { opacity: 1 } }
.twinkle { animation: twinkle 4s ease-in-out infinite; }
.twinkle.slow { animation-duration: 7s; }
.twinkle.fast { animation-duration: 2.6s; }

/* float */
@keyframes drift-y { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
@keyframes drift-y-rev { 0%,100% { transform: translateY(0) } 50% { transform: translateY(10px) } }
.drift { animation: drift-y 8s ease-in-out infinite; }
.drift.rev { animation-name: drift-y-rev; animation-duration: 9s; }
.drift.slow { animation-duration: 12s; }

/* portal glow pulse */
@keyframes portal-pulse {
  0%,100% { filter: drop-shadow(0 0 30px rgba(233,193,121,0.55)) drop-shadow(0 0 80px rgba(233,193,121,0.25)); }
  50%     { filter: drop-shadow(0 0 50px rgba(233,193,121,0.8))  drop-shadow(0 0 120px rgba(233,193,121,0.4)); }
}
.portal-pulse { animation: portal-pulse 5s ease-in-out infinite; }

/* particle rise */
@keyframes rise {
  0%   { transform: translateY(0)    translateX(0); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

/* spin slow */
@keyframes spin-slow { from { transform: rotate(0) } to { transform: rotate(360deg) } }
.spin-slow { animation: spin-slow 60s linear infinite; }
.spin-slower { animation: spin-slow 120s linear infinite; }
.spin-rev { animation: spin-slow 90s linear infinite reverse; }

/* gold shimmer text */
.gold-text {
  background: linear-gradient(90deg, #b48a44 0%, #f6dca3 25%, #e9c179 50%, #f6dca3 75%, #b48a44 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0% 50% } 100% { background-position: 200% 50% } }

/* ========== World card ========== */
.world-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(233,193,121,0.22);
  cursor: pointer;
  isolation: isolate;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .3s ease;
}
.world-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 30px 60px -25px rgba(233,193,121,0.35); }
.world-card.selected { border-color: var(--gold-bright); box-shadow: 0 0 0 1px var(--gold) inset, 0 30px 80px -25px rgba(233,193,121,0.55); }
.world-card .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(4,6,26,0.4) 60%, rgba(4,6,26,0.95) 100%);
  z-index: 2;
  pointer-events: none;
}
.world-card .corner-frame {
  position: absolute; inset: 8px;
  border: 1px solid rgba(233,193,121,0.0);
  pointer-events: none;
  z-index: 3;
  transition: border-color .3s ease;
}
.world-card:hover .corner-frame,
.world-card.selected .corner-frame { border-color: rgba(233,193,121,0.45); }

/* corner ornaments */
.corner-frame::before, .corner-frame::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border: 1px solid var(--gold);
}
.corner-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner-frame::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* ========== Form ========== */
.field {
  width: 100%;
  background: rgba(4,6,26,0.65);
  border: 1px solid rgba(233,193,121,0.22);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 14px 16px 14px 44px;
  border-radius: 3px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  appearance: none;
}
.field:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(233,193,121,0.12);
  background: rgba(8,12,40,0.85);
}
.field::placeholder { color: var(--mute-2); }
.field.error { border-color: #e26a6a; box-shadow: 0 0 0 3px rgba(226,106,106,0.15); }
.field-wrap { position: relative; }
.field-wrap .field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gold); opacity: .85;
  pointer-events: none;
}
select.field {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
select.field option { background: var(--bg-1); color: var(--text); }

/* ========== image-slot — premium dark theming ========== */
image-slot {
  display: block !important;
  color: rgba(245, 236, 214, 0.78);
  font-family: var(--sans) !important;
  width: 100% !important;
  height: 100% !important;
}
image-slot::part(frame) {
  background: transparent !important;
}
image-slot::part(empty) {
  color: rgba(245, 236, 214, 0.85);
  padding: 28px !important;
  gap: 12px !important;
  font-family: var(--serif) !important;
  font-size: 15px !important;
  font-style: italic;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 18px rgba(0,0,0,0.6);
}
image-slot::part(image) {
  /* let images breathe */
}

/* ========== Misc ========== */
.hairline { background: linear-gradient(90deg, transparent, rgba(233,193,121,0.4), transparent); height: 1px; width: 100%; }
.no-select { user-select: none; }

/* timeline dot */
.tl-node {
  width: 64px; height: 64px; border-radius: 999px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(233,193,121,0.25), rgba(8,12,40,0.9) 70%);
  border: 1px solid rgba(233,193,121,0.5);
  color: var(--gold);
  position: relative;
  box-shadow: 0 0 30px -8px var(--gold-glow);
}
.tl-node.active { border-color: var(--gold-bright); box-shadow: 0 0 40px -4px var(--gold-glow); }

/* check tick */
.tick {
  width: 22px; height: 22px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: linear-gradient(180deg, #f6dca3, #c89a55);
  color: #1a1208;
  flex: 0 0 22px;
}

/* keyframe entry helpers (no-JS fallback if needed) */
.fade-in { animation: fade-in .8s ease forwards; opacity: 0; }
@keyframes fade-in { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(8px); } }

/* ───────────────────────────────────────────────────────────────────────
   Responsive refinements
   Mobile (≤640px): tight, scannable, big tap targets, no edge-touching text
   Tablet (641-1024px): comfortable two-column layouts stay readable
   ─────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  /* ── 1. Container gutters: never let text or buttons touch the edges ── */
  .max-w-7xl, .max-w-5xl { padding-left: 20px !important; padding-right: 20px !important; }

  /* ── 2. Section paddings: shrink the 7rem desktop padding to something
        that fits on a phone without scrolling forever between sections ── */
  section { padding-top: 56px !important; padding-bottom: 56px !important; }
  section.py-28 { padding-top: 56px !important; padding-bottom: 56px !important; }
  section.py-32 { padding-top: 64px !important; padding-bottom: 64px !important; }
  section.py-40 { padding-top: 72px !important; padding-bottom: 72px !important; }

  /* hero — fixed nav clearance on top, tight bottom, no forced viewport height */
  section#top {
    min-height: auto !important;
    padding-top: 96px !important;
    padding-bottom: 40px !important;
  }
  section#top .min-h-\[70svh\] { min-height: auto !important; }

  /* ── 3. Typography ── */
  .h-display { font-size: clamp(34px, 9vw, 52px) !important; line-height: 1.05 !important; }
  .h-section { font-size: clamp(26px, 7.5vw, 38px) !important; line-height: 1.1 !important; }
  .h-card    { font-size: 18px !important; line-height: 1.3 !important; }
  .body-lead { font-size: 15px !important; line-height: 1.6 !important; }
  .stat-big  { font-size: 44px !important; }
  .price-big { font-size: 44px !important; }
  .price-sm  { font-size: 18px !important; }

  /* eyebrow: smaller letters, tighter, and the rule on each side hides
     so wrapping is graceful. Achieved via .flex-wrap + hidden on rules
     (see Eyebrow primitive). */
  .eyebrow {
    font-size: 10px !important;
    letter-spacing: 0.20em !important;
    line-height: 1.4 !important;
  }

  /* ── 4. Buttons ── big targets, comfortable padding, max-width so
        they don't look comical edge-to-edge on tablets-in-portrait ── */
  .btn {
    padding: 15px 24px !important;
    font-size: 12px !important;
    letter-spacing: 0.18em !important;
    min-height: 50px;
  }
  .btn-sm { padding: 11px 18px !important; font-size: 10.5px !important; letter-spacing: 0.16em !important; }

  /* keep cards' bordered surfaces less rounded on mobile for a sharper look */
  .surface { border-radius: 6px !important; }
  .surface-pad { padding: 22px !important; }

  /* ── 5. Hero-specific spacing ── */
  section#top .mt-9 { margin-top: 22px !important; }
  section#top .mt-6 { margin-top: 16px !important; }
  section#top .mt-5 { margin-top: 14px !important; }
  section#top .gap-3 { gap: 10px !important; }
  section#top .gap-4 { gap: 12px !important; }

  /* hero buttons: full-width but capped so they look intentional */
  section#top .btn {
    width: 100% !important;
    max-width: 100%;
  }

  /* ── 6. Grid collapses: any lg:grid-cols-{2,3,4,12} should be 1 col on phone.
        Tailwind handles this if breakpoints are correct, but some sections use
        explicit grid-template-columns. Catch the obvious cases. ── */
  .grid.md\:grid-cols-2,
  .grid.md\:grid-cols-3,
  .grid.lg\:grid-cols-2,
  .grid.lg\:grid-cols-3,
  .grid.lg\:grid-cols-4 { gap: 16px !important; }

  /* ── 7. Footer: stack columns nicely with breathing room ── */
  footer .grid { gap: 32px !important; }
  footer .eyebrow { margin-bottom: 10px !important; }
  footer ul { font-size: 13px !important; line-height: 1.8 !important; }

  /* ── 8. Hide nav-bar preorder pill on phone (the hamburger handles it) ── */
  header .btn-sm { display: none !important; }

  /* ── 9. Reveal animations are jittery on small screens, cap them ── */
  .reveal { transition-duration: 0.5s !important; }

  /* ── 10. Decorative blur orbs on mobile are heavy + over-saturated.
        Tone them down so paint perf doesn't suffer. ── */
  .glow-orb, [class*='blur-'] { opacity: 0.6 !important; }
}

/* ── Tablet (641–1024px): a few targeted fixes so two-column hero
   sections don't look cramped before they collapse on phone ── */
@media (min-width: 641px) and (max-width: 1024px) {
  .max-w-7xl { padding-left: 28px !important; padding-right: 28px !important; }
  section { padding-top: 80px !important; padding-bottom: 80px !important; }

  .h-display { font-size: clamp(46px, 7vw, 72px) !important; line-height: 1.05; }
  .h-section { font-size: clamp(34px, 5.2vw, 52px) !important; line-height: 1.1; }
}

/* ── Desktop polish (≥1280px): subtle improvements on big screens
   that make the brand feel more deliberate ── */
@media (min-width: 1280px) {
  /* slightly stronger leading on display headlines for that "luxury editorial" feel */
  .h-display { line-height: 1.04; letter-spacing: -0.012em; }

  /* heavier weight contrast on the gold-italic descender */
  .h-display .italic { font-weight: 300 !important; }
}

/* ── Universal: smoother focus rings on keyboard tabbing ── */
*:focus-visible {
  outline: 2px solid rgba(233, 193, 121, 0.6);
  outline-offset: 3px;
  border-radius: 3px;
}
button:focus-visible, a:focus-visible {
  outline-color: #e9c179;
}

/* ── Universal: prevent horizontal scroll on long words/URLs ── */
body, html { overflow-x: hidden; }
section, footer, header { overflow-x: clip; }

/* responsive nav blur */
.nav-blur {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: linear-gradient(180deg, rgba(4,6,26,0.7), rgba(4,6,26,0.3));
  border-bottom: 1px solid rgba(233,193,121,0.08);
}
