/* ============================================================================
   iCARUS — cinematic layer
   Scroll-driven storytelling, flight map, gallery, atmosphere & polish.
   Loads after styles.css. Keeps the warm, light editorial palette throughout.
   ========================================================================== */

:root {
  --gold-blaze: #ffce6b;
  --gold-soft: #ffe6ad;
  --dusk-rose: #f7dccb;   /* luminous sunset, still light */
  --sea-mist: #e0eaea;    /* pale aegean */
  --ink: #1a1410;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---- Accessibility: skip link ------------------------------------------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---- Atmosphere overlays (very subtle) ---------------------------------- */
.fx-grain,
.fx-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}
.fx-grain {
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.fx-vignette {
  z-index: 1;
  background: radial-gradient(120% 100% at 50% 0%, transparent 62%, rgba(120, 53, 15, 0.05) 100%);
}

/* ---- Reading progress --------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light), var(--gold-blaze));
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.5);
  transition: width 0.1s linear;
}

/* ---- Nav scroll state --------------------------------------------------- */
.nav-inner { transition: height 0.35s var(--ease-out), background 0.35s, box-shadow 0.35s; }
.nav.is-scrolled .nav-inner {
  height: 56px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 10px 30px rgba(26, 20, 16, 0.1);
}
.nav-links a.is-active {
  color: var(--primary-dark);
  background: var(--hover-bg);
}

/* ---- Reveal system (only hides when JS is present) ---------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---- Living-illustration motion (independent props so GSAP transforms
        compose on top without conflict) -------------------------------- */
@keyframes living {
  0%, 100% { translate: 0 0; rotate: 0deg; scale: 1; }
  30%      { translate: 6px -12px; rotate: 0.7deg; scale: 1.012; }
  62%      { translate: -5px -6px; rotate: -0.6deg; scale: 1.006; }
}
.is-alive { animation: living 7.5s ease-in-out infinite; }
.story-fig--fall.is-alive { animation-duration: 8.5s; animation-delay: -2s; }

/* The hero figure keeps its drop-shadow but swaps float -> living drift. */
.hero-figure img.hero-icarus.is-alive {
  animation: living 7.5s ease-in-out infinite;
}

/* ---- Hero: kinetic title + scroll cue ----------------------------------- */
.hero-title-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em; /* keep descenders/stroke from clipping */
}
.js .hero-title-line > span {
  display: block;
  transform: translateY(110%);
}
.js .hero-title.is-in .hero-title-line > span {
  transform: translateY(0);
  transition: transform 1s var(--ease-out);
}
.js .hero-title.is-in .hero-title-line:nth-child(2) > span { transition-delay: 0.12s; }

.hero-scrollcue {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted-light);
  z-index: 11;
}
.hero-scrollcue svg { animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob { 0%,100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(5px); opacity: 1; } }
.nav.is-scrolled ~ main .hero-scrollcue,
.is-scrolled-any .hero-scrollcue { opacity: 0; transition: opacity 0.4s; }

/* ============================================================================
   THE MYTH — scroll-scrubbed sequence
   ========================================================================== */
.story { position: relative; }

/* default / fallback: readable stacked cards */
.story .story-stage,
.story .story-atmosphere,
.story .story-rays { display: none; }
.story .story-pin { position: relative; padding: 3rem 1rem 1rem; }
.story .story-beats .container { position: relative; }
.story-intro { margin-bottom: 2.5rem; }
.story-beats { display: block; }
.story-beat {
  position: relative;
  max-width: 46rem;
  margin: 0 auto 1.25rem;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.story-beat-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 2px;
  color: var(--primary);
}
.story-beat h3 { font-size: 1.3rem; font-weight: 700; margin: 0.4rem 0 0.6rem; }
.story-beat p { font-size: 0.95rem; line-height: 1.7; color: var(--muted); }

/* enhanced / pinned mode (scroll length comes from GSAP pin spacing) */
.story.is-enhanced .story-pin {
  position: relative;
  height: 100vh;
  padding: 0;
  overflow: clip;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story.is-enhanced .story-atmosphere {
  display: block;
  position: absolute;
  inset: 0;
  background: var(--background);
  z-index: 0;
}
.story.is-enhanced .story-rays {
  display: block;
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  z-index: 1;
  opacity: 0;
  background:
    conic-gradient(from 210deg at 78% 14%,
      rgba(255, 206, 107, 0) 0deg,
      rgba(255, 206, 107, 0.5) 8deg,
      rgba(255, 206, 107, 0) 16deg,
      rgba(255, 206, 107, 0) 26deg,
      rgba(255, 230, 173, 0.45) 34deg,
      rgba(255, 206, 107, 0) 42deg,
      rgba(255, 206, 107, 0) 58deg,
      rgba(255, 206, 107, 0.4) 66deg,
      rgba(255, 206, 107, 0) 74deg);
  mix-blend-mode: screen;
  pointer-events: none;
}
.story.is-enhanced .story-stage {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
}
.story.is-enhanced .story-beats {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.story.is-enhanced .story-beats .container {
  max-width: none;
  margin: 0;
  height: 100%;
  padding: 0;
}
.story.is-enhanced .story-intro {
  position: absolute;
  top: clamp(5rem, 12vh, 9rem);
  left: 0; right: 0;
  text-align: center;
  margin: 0;
}
.story.is-enhanced .story-beat {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(3.5rem, 9vh, 7rem);
  margin: 0 auto;
  width: min(620px, 88vw);
  max-width: none;
  text-align: center;
  background: rgba(255, 253, 248, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(26, 20, 16, 0.06);
  box-shadow: 0 18px 50px rgba(26, 20, 16, 0.12);
  opacity: 0;
}
.story.is-enhanced .story-beat h3 { font-size: clamp(1.4rem, 3.4vw, 2rem); }

/* figures — centered, sized to stay fully on-screen at any width */
.story.is-enhanced .story-fig {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(200px, 23vw, 360px);
  height: auto;
  opacity: 0;
  z-index: 5;
  object-fit: contain;
  filter: drop-shadow(0 22px 44px rgba(26, 20, 16, 0.2));
}
.story.is-enhanced .story-fig--fall { width: clamp(220px, 26vw, 400px); }

/* Daedalus — transparent cinemagraph that floats like the other figures */
.story.is-enhanced .story-daedalus {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(320px, 40vw, 580px);
  aspect-ratio: 1 / 1;
  margin: 0;
  opacity: 0;
  z-index: 4;
  filter: drop-shadow(0 30px 55px rgba(26, 20, 16, 0.3));
}
.story-daedalus-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.story-daedalus figcaption {
  position: absolute;
  left: 0; right: 0; bottom: -2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* feather storm container */
.story.is-enhanced .story-feathers {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}
.story-storm-feather {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 4px rgba(26, 20, 16, 0.18));
}

/* ============================================================================
   FLIGHT MAP
   ========================================================================== */
.flight-map {
  position: relative;
  max-width: 60rem;
  margin: 2.5rem auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.flight-sun-3d {
  position: absolute;
  left: 84.6%; top: 24.2%;
  width: clamp(120px, 17vw, 190px);
  height: clamp(120px, 17vw, 190px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 200, 120, 0.85) 0%, rgba(217, 119, 6, 0.3) 34%, rgba(217, 119, 6, 0) 66%);
}
.flight-sun-3d.is-live { background: none; }
.flight-sun-3d canvas { display: block; }
.flight-svg { display: block; width: 100%; height: auto; }
.flight-island { fill: #e7d9bf; stroke: #c9b48c; stroke-width: 1.5; }
.flight-island-img { filter: drop-shadow(0 6px 14px rgba(26, 20, 16, 0.22)); }
.flight-route, .flight-fallpath { stroke-linejoin: round; }
.flight-dot { fill: var(--primary-dark); }
.flight-dot-ring { fill: none; stroke: var(--primary); stroke-width: 2; opacity: 0.5; }
.flight-sun-marker circle:first-child { opacity: 0.9; }
.flight-pulse { fill: none; stroke: var(--primary); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.flight.in-view .flight-pulse { animation: flight-pulse 2.1s ease-out infinite; }
@keyframes flight-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(3.4); opacity: 0; }
}
.flight-label .flight-label-main {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 2px;
  fill: var(--primary-dark);
  paint-order: stroke;
  stroke: var(--background);
  stroke-width: 7px;
  stroke-linejoin: round;
}
.flight-label .flight-label-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  fill: var(--foreground);
  paint-order: stroke;
  stroke: var(--background);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.flight-sun-marker circle:first-child { fill: var(--primary); opacity: 0.22; }
.flight-sun-marker circle:last-child { fill: var(--primary-dark); }
.js .flight-label { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.js .flight-label.is-shown { opacity: 1; }

/* ============================================================================
   GALLERY + LIGHTBOX
   ========================================================================== */
.gallery .container { margin-bottom: 1.75rem; }
.gallery-rail {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem clamp(1rem, 5vw, 3rem) 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}
.gallery-rail::-webkit-scrollbar { height: 8px; }
.gallery-rail::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 999px; }
.gallery-rail::-webkit-scrollbar-track { background: rgba(26, 20, 16, 0.05); border-radius: 999px; }

.gallery-item {
  flex: 0 0 auto;
  width: clamp(240px, 32vw, 360px);
  margin: 0;
  scroll-snap-align: center;
  cursor: pointer;
}
.gallery-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #efe7d6;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
}
.gallery-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(26, 20, 16, 0.06), inset 0 -40px 60px rgba(26, 20, 16, 0.18);
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.gallery-item:hover .gallery-frame img { transform: scale(1.06); }
.gallery-item:hover .gallery-frame::after { opacity: 1; }
.gallery-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.25rem 0;
}
.gallery-title { font-weight: 700; font-size: 0.95rem; }
.gallery-meta {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted-light);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 8, 0.86);
  backdrop-filter: blur(6px);
}
.lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease-out);
}
.lightbox.is-open .lightbox-figure { transform: scale(1); }
.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: #efe7d6;
}
.lightbox-caption {
  color: rgba(255, 247, 230, 0.85);
  font-size: 0.85rem;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}
.lightbox-btn {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.06); }
.lightbox-close { top: clamp(1rem, 4vw, 2rem); right: clamp(1rem, 4vw, 2rem); }
.lightbox-prev { left: clamp(0.5rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: clamp(0.5rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

/* ============================================================================
   POLISH — tilt, magnetic, quote, back-to-top
   ========================================================================== */
[data-tilt] { transform-style: preserve-3d; transition: transform 0.3s var(--ease-out); }

/* Quote: richer editorial type */
.quote-text { font-family: var(--font-display); }
.quote-block { background: linear-gradient(145deg, var(--primary-deep), var(--primary-dark)); }
.quote-block .quote-spark {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 80% 10%, rgba(255, 206, 107, 0.35), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-primary-glow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.2s;
  z-index: 110;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* Section drop-cap on the first myth beat (editorial flourish, enhanced off) */
.story:not(.is-enhanced) .story-beat[data-beat="0"] p::first-letter {
  font-family: var(--font-display);
  font-size: 3.1rem;
  line-height: 0.8;
  float: left;
  margin: 0.1em 0.12em 0 0;
  color: var(--primary-dark);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .story.is-enhanced .story-daedalus { width: min(78vw, 360px); }
  .story.is-enhanced .story-fig { width: clamp(180px, 52vw, 300px); }
  .story.is-enhanced .story-fig--fall { width: clamp(200px, 58vw, 330px); }
}

/* FAQ — animated height (overrides the display toggle in styles.css) */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  padding: 0;
  transition: grid-template-rows 0.38s var(--ease-out);
}
.faq-item.open .faq-answer { display: grid; grid-template-rows: 1fr; }
.faq-answer-inner {
  overflow: hidden;
  padding: 0 1.5rem 1.5rem 4.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
}
@media (min-width: 640px) {
  .faq-answer-inner { padding: 0 1.5rem 1.5rem 4.5rem; }
}

/* ============================================================================
   RICHNESS LAYER — atmospheric depth, gilding & ornament
   ========================================================================== */

/* Warm atmospheric blooms behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 32% at 86% 10%, rgba(255, 206, 107, 0.16), transparent 70%),
    radial-gradient(50% 42% at 8% 88%, rgba(180, 83, 9, 0.07), transparent 70%),
    radial-gradient(60% 50% at 50% 50%, rgba(255, 247, 233, 0.5), transparent 75%);
}

/* Custom scrollbar */
html { scrollbar-color: var(--primary-light) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary-light), var(--primary-dark));
  border-radius: 999px;
  border: 3px solid var(--background);
}

/* Gilded, shimmering title */
.hero-title .fill {
  background: linear-gradient(96deg, #5a3410 0%, #8a5212 16%, #c8841f 36%, #f6c95f 50%, #c8841f 64%, #8a5212 84%, #5a3410 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: foil-sheen 9s ease-in-out infinite;
}
@keyframes foil-sheen { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }

/* Hero atmosphere: god-rays, clouds, faint sun emblem */
.hero-atmos { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-godrays {
  position: absolute;
  top: -35%; left: -25%;
  width: 95%; height: 130%;
  background: repeating-conic-gradient(from 32deg at 12% 6%,
    rgba(255, 221, 150, 0) 0deg, rgba(255, 221, 150, 0.18) 2deg, rgba(255, 221, 150, 0) 5.5deg);
  -webkit-mask-image: radial-gradient(62% 62% at 12% 6%, #000 0%, transparent 72%);
  mask-image: radial-gradient(62% 62% at 12% 6%, #000 0%, transparent 72%);
  mix-blend-mode: screen;
  transform-origin: 12% 6%;
  animation: godray-shimmer 16s ease-in-out infinite alternate;
}
@keyframes godray-shimmer { 0% { transform: rotate(-3deg); opacity: 0.45; } 100% { transform: rotate(3deg); opacity: 0.85; } }
.hero-cloud {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%);
  filter: blur(7px);
  opacity: 0.5;
  mix-blend-mode: screen;
}
.hero-cloud--1 { width: 360px; height: 120px; top: 16%; left: 6%; animation: cloud-drift 30s ease-in-out infinite; }
.hero-cloud--2 { width: 280px; height: 96px; top: 44%; right: 12%; animation: cloud-drift 40s ease-in-out infinite reverse; }
.hero-cloud--3 { width: 220px; height: 78px; bottom: 16%; left: 32%; animation: cloud-drift 34s ease-in-out infinite; }
@keyframes cloud-drift { 0%, 100% { translate: -16px 0; } 50% { translate: 16px 0; } }
@keyframes cloud-drift-scape { 0%, 100% { translate: -52px 0; } 50% { translate: 52px 0; } }
.hero-glyph {
  position: absolute;
  right: -4%; top: 50%;
  transform: translateY(-50%);
  width: min(44vw, 560px);
  aspect-ratio: 1;
  opacity: 0.07;
  background:
    repeating-conic-gradient(from 0deg, var(--primary) 0 1.4deg, transparent 1.4deg 15deg),
    radial-gradient(circle at 50% 50%, transparent 30%, var(--primary) 30.5%, transparent 33%),
    radial-gradient(circle at 50% 50%, transparent 41%, var(--primary) 41.5%, transparent 43%);
  -webkit-mask-image: radial-gradient(circle, #000 56%, transparent 70%);
  mask-image: radial-gradient(circle, #000 56%, transparent 70%);
}

/* Greek-meander-style ornamental divider (medallion + flanking studs) */
.meander-divider, .hero-divider {
  position: relative;
  height: 34px;
  margin: 0.5rem auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
}
.meander-divider::before, .hero-divider::before {
  content: "";
  position: absolute;
  left: 14%; right: 14%; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 83, 9, 0.4) 22%, rgba(180, 83, 9, 0.4) 78%, transparent);
}
.meander-divider::after, .hero-divider::after {
  content: "";
  position: relative;
  width: 13px; height: 13px;
  transform: rotate(45deg);
  background: var(--primary);
  box-shadow:
    0 0 0 4px var(--background),
    -26px 0 0 -3px var(--primary-light), 26px 0 0 -3px var(--primary-light),
    -52px 0 0 -4px rgba(180, 83, 9, 0.5), 52px 0 0 -4px rgba(180, 83, 9, 0.5);
}

.commission {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  border-block: 1px solid rgba(180, 83, 9, 0.14);
  background:
    linear-gradient(90deg, rgba(180, 83, 9, 0.08), rgba(22, 78, 99, 0.045), rgba(113, 63, 18, 0.06)),
    rgba(255, 251, 235, 0.42);
}

.commission-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr) auto;
  align-items: center;
  gap: 1rem;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.commission-eyebrow {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--primary-dark);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.commission h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  letter-spacing: 0;
}

.commission p {
  max-width: 68ch;
  margin: 0.42rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.commission-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.commission-ledger span {
  min-width: 0;
  padding: 0.6rem 0.62rem;
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.commission-ledger b {
  display: block;
  color: var(--primary-dark);
  font-family: var(--font-serif);
  font-size: 1rem;
}

.commission-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(180, 83, 9, 0.42);
  border-radius: 0;
  background: transparent;
  color: var(--primary-dark);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: none;
  transition: color 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.commission-link:hover {
  transform: translateY(-2px);
  color: var(--wine);
}

/* Flanking lines on centered eyebrows */
.section-header.center .section-eyebrow { position: relative; }
.section-header.center .section-eyebrow::before,
.section-header.center .section-eyebrow::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light));
}
.section-header.center .section-eyebrow::before { right: 100%; margin-right: 14px; transform: scaleX(-1); }
.section-header.center .section-eyebrow::after { left: 100%; margin-left: 14px; }

/* Gilded card edges + deeper shadow on hover */
.bento-card, .figure-card { position: relative; }
.bento-card::before, .figure-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--primary-dark), var(--gold-blaze), var(--primary-light));
  opacity: 0;
  transition: opacity 0.35s;
}
.bento-card:hover::before, .figure-card:hover::before { opacity: 1; }

/* Button sheen sweep */
.btn-primary { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)); }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s var(--ease-out);
}
.btn-primary:hover::after { left: 130%; }

/* ---- Story decorative layers ------------------------------------------- */
.story .story-sun-3d, .story .story-laby, .story .story-sea, .story .story-cloud { display: none; }

.story.is-enhanced .story-sun-3d {
  display: block;
  position: absolute;
  left: 64%; top: 16%;
  width: min(46vh, 400px);
  height: min(46vh, 400px);
  opacity: 0;
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  /* warm fallback glow until the WebGL sun paints (or if it can't) */
  background: radial-gradient(circle at 50% 50%, rgba(255, 200, 120, 0.9) 0%, rgba(255, 180, 77, 0.5) 30%, rgba(217, 119, 6, 0) 68%);
}
.story.is-enhanced .story-sun-3d.is-live { background: none; }
.story-sun-3d canvas { display: block; }

.story.is-enhanced .story-cloud {
  display: block;
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.72), transparent 70%);
  filter: blur(9px);
  opacity: 0.5;
  mix-blend-mode: screen;
}
.story-cloud--a { width: 46vw; max-width: 620px; height: 160px; top: 22%; left: -6%; animation: cloud-drift 44s ease-in-out infinite; }
.story-cloud--b { width: 38vw; max-width: 520px; height: 130px; bottom: 24%; right: -4%; animation: cloud-drift 56s ease-in-out infinite reverse; }

/* Painterly, flat-bottomed cloudscape that fills the scenes */
.story .story-scape, .story .story-horizon { display: none; }
.story.is-enhanced .story-scape {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.scene-cloud {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  will-change: transform;
}
.cloud-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.story.is-enhanced .story-horizon {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 50%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(212, 178, 118, 0.3) 0%, rgba(231, 206, 158, 0.13) 42%, transparent 100%);
}

.story.is-enhanced .story-laby {
  display: block;
  position: absolute;
  left: 50%; top: 50%;
  width: min(44vh, 360px);
  aspect-ratio: 1;
  color: var(--primary-dark);
  opacity: 0;
  z-index: 3;
}

.story.is-enhanced .story-sea {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%; height: 40vh;
  opacity: 0;
  z-index: 6;
}
.story-wave { transform-box: view-box; }
.story-wave--back { fill: rgba(180, 140, 90, 0.18); animation: wave-drift 11s ease-in-out infinite; }
.story-wave--front { fill: rgba(120, 150, 150, 0.3); animation: wave-drift 8s ease-in-out infinite reverse; }
@keyframes wave-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-44px); } }

/* ---- Reduced motion: freeze everything decorative ---------------------- */
@media (prefers-reduced-motion: reduce) {
  .is-alive,
  .hero-figure img.hero-icarus.is-alive,
  .hero-scrollcue svg,
  .hero-godrays, .hero-cloud, .hero-title .fill,
  .story-cloud, .scene-cloud, .story-sun::after, .story-wave,
  .flight.in-view .flight-pulse { animation: none !important; }
  .is-alive { translate: 0 !important; rotate: 0deg !important; scale: 1 !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .hero-title-line > span { transform: none !important; transition: none !important; }
  .gallery-item:hover .gallery-frame img { transform: none; }
  .faq-answer { transition: none; }
}

/* ============================================================================
   EXTREMALIST PASS - denser mythic detail, stronger contrast, richer motion
   ========================================================================== */

:root {
  --aegean: #0f766e;
  --aegean-dark: #134e4a;
  --lapis: #1e3a8a;
  --wine: #8f1d2c;
  --olive: #4d5f21;
  --rose-fired: #c24d45;
  --marble: #fffaf0;
  --gild: #f4b942;
  --hero-beams-height: clamp(620px, 78vh, 760px);
}

::selection {
  background: rgba(244, 185, 66, 0.45);
  color: var(--foreground);
}

body {
  background:
    linear-gradient(115deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(245deg, rgba(143, 29, 44, 0.055), transparent 38%),
    repeating-linear-gradient(90deg, rgba(30, 58, 138, 0.035) 0 1px, transparent 1px 82px),
    repeating-linear-gradient(0deg, rgba(26, 20, 16, 0.025) 0 1px, transparent 1px 82px),
    var(--background);
}

body::before {
  background:
    repeating-conic-gradient(from 45deg at 50% 50%, rgba(180, 83, 9, 0.05) 0 4deg, transparent 4deg 14deg),
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 30%),
    linear-gradient(315deg, rgba(143, 29, 44, 0.06), transparent 36%),
    radial-gradient(60% 50% at 50% 50%, rgba(255, 247, 233, 0.5), transparent 75%);
  opacity: 0.9;
}

.fx-grain {
  opacity: 0.62;
}

.nav-inner {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 253, 248, 0.9), rgba(255, 250, 236, 0.78)),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(180, 83, 9, 0.045) 24px 25px);
  border-color: rgba(180, 83, 9, 0.16);
}

.nav-inner > * {
  position: relative;
  z-index: 1;
}

.nav-inner::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  border: 1px solid rgba(244, 185, 66, 0.28);
  pointer-events: none;
}

.nav-inner::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: skewX(-22deg);
  animation: nav-sheen 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes nav-sheen {
  0%, 62% { left: -42%; opacity: 0; }
  70% { opacity: 1; }
  100% { left: 122%; opacity: 0; }
}

.brand-mark {
  box-shadow:
    0 0 0 1px rgba(180, 83, 9, 0.24),
    0 0 18px rgba(244, 185, 66, 0.22);
}

.btn-tertiary {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--aegean-dark), var(--lapis));
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.22);
}

.btn-tertiary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.28);
}

.btn-tertiary::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -55%;
  width: 44%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s var(--ease-out);
}

.btn-tertiary:hover::after {
  left: 125%;
}

.hero {
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -6% -4%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(30, 58, 138, 0.07) 12% 12.25%, transparent 12.25% 25%, rgba(143, 29, 44, 0.06) 25% 25.25%, transparent 25.25%),
    repeating-linear-gradient(125deg, transparent 0 18px, rgba(15, 118, 110, 0.045) 18px 19px),
    repeating-linear-gradient(35deg, transparent 0 46px, rgba(244, 185, 66, 0.06) 46px 48px);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 74%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 74%, transparent 100%);
  animation: tableau-drift 22s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  right: clamp(-120px, -6vw, -40px);
  top: clamp(80px, 13vh, 140px);
  z-index: 0;
  width: min(42vw, 440px);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-conic-gradient(from 0deg, var(--primary-dark) 0 1.5deg, transparent 1.5deg 10deg),
    radial-gradient(circle, transparent 0 36%, var(--primary-dark) 36.5% 37.5%, transparent 38% 52%, var(--aegean) 52.5% 53.5%, transparent 54%);
  -webkit-mask-image: radial-gradient(circle, transparent 0 30%, #000 31% 64%, transparent 65%);
  mask-image: radial-gradient(circle, transparent 0 30%, #000 31% 64%, transparent 65%);
  animation: halo-turn 38s linear infinite;
}

@keyframes tableau-drift {
  from { transform: translate3d(-1.4%, -1%, 0); }
  to { transform: translate3d(1.4%, 1%, 0); }
}

@keyframes halo-turn {
  to { transform: rotate(360deg); }
}

.hero-main {
  max-width: 47rem;
}

.hero-main::before {
  content: "ALTITUDE / WAX / WARNING";
  position: absolute;
  left: min(100%, 40rem);
  top: 0.6rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  color: rgba(30, 58, 138, 0.34);
  pointer-events: none;
}

.hero-badge {
  background:
    linear-gradient(120deg, rgba(255, 253, 248, 0.96), rgba(255, 244, 216, 0.84)),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(180, 83, 9, 0.055) 12px 13px);
  border-color: rgba(244, 185, 66, 0.34);
  box-shadow:
    0 12px 28px rgba(180, 83, 9, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

@media (min-width: 768px) {
  .hero-badge {
    margin-left: clamp(4.5rem, 10vw, 8.5rem);
    margin-bottom: 0.75rem;
  }
}

.hero-badge-dot {
  background: conic-gradient(from 0deg, var(--primary-dark), var(--gild), var(--wine), var(--primary-dark));
  animation: sun-token 9s linear infinite;
}

@keyframes sun-token {
  to { transform: rotate(360deg); }
}

.hero-title {
  font-size: clamp(76px, 14vw, 148px);
  text-shadow:
    0 2px 0 rgba(255, 253, 248, 0.75),
    0 20px 48px rgba(120, 53, 15, 0.18);
}

.hero-title .outline {
  animation: outline-ignite 5.6s ease-in-out infinite;
}

@keyframes outline-ignite {
  0%, 100% {
    -webkit-text-stroke-color: var(--primary-dark);
    filter: drop-shadow(0 0 0 rgba(244, 185, 66, 0));
  }
  50% {
    -webkit-text-stroke-color: var(--wine);
    filter: drop-shadow(0 0 18px rgba(244, 185, 66, 0.34));
  }
}

.hero-subtitle {
  position: relative;
  max-width: 31rem;
  padding: 1rem 1.1rem 1rem 1.25rem;
  border-left: 3px solid var(--gild);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.7), rgba(255, 253, 248, 0.18)),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(26, 20, 16, 0.035) 13px 14px);
  color: rgba(26, 20, 16, 0.68);
  box-shadow: 0 12px 32px rgba(26, 20, 16, 0.06);
}

.hero-subtitle::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -11px;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--wine), transparent);
}

.hero-detail-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-width: 36rem;
  margin-top: 1rem;
}

.hero-detail-rail span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.84), rgba(255, 241, 214, 0.55)),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(15, 118, 110, 0.04) 8px 9px);
  box-shadow:
    0 8px 22px rgba(26, 20, 16, 0.055),
    inset 0 0 0 1px rgba(255, 255, 255, 0.56);
  font-size: 0.78rem;
  color: rgba(26, 20, 16, 0.7);
}

.hero-detail-rail span::before {
  content: "";
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--card-accent, var(--primary));
  box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.14);
}

.hero-detail-rail span:nth-child(1) { --card-accent: var(--wine); }
.hero-detail-rail span:nth-child(2) { --card-accent: var(--aegean); }
.hero-detail-rail span:nth-child(3) { --card-accent: var(--lapis); }

.hero-detail-rail b {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.hero-actions {
  align-items: center;
  margin-top: 1.45rem;
}

.js .hero .hero-badge[data-reveal],
.js .hero .hero-subtitle[data-reveal],
.js .hero .hero-detail-rail[data-reveal],
.js .hero .hero-actions[data-reveal] {
  opacity: 1;
  transform: none;
}

.hero-figure::before,
.hero-figure::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.hero-figure::before {
  width: min(92vw, 680px);
  aspect-ratio: 1;
  z-index: 0;
  background:
    repeating-conic-gradient(from 12deg, rgba(244, 185, 66, 0.36) 0 2deg, transparent 2deg 10deg),
    radial-gradient(circle, transparent 0 42%, rgba(15, 118, 110, 0.24) 42.4% 43%, transparent 43.4% 58%, rgba(143, 29, 44, 0.18) 58.3% 59%, transparent 59.4%);
  -webkit-mask-image: radial-gradient(circle, transparent 0 35%, #000 36% 63%, transparent 64%);
  mask-image: radial-gradient(circle, transparent 0 35%, #000 36% 63%, transparent 64%);
  animation: halo-turn 50s linear infinite reverse;
}

.hero-figure::after {
  width: min(72vw, 500px);
  height: min(48vw, 330px);
  z-index: 1;
  background:
    repeating-linear-gradient(100deg, transparent 0 14px, rgba(255, 255, 255, 0.4) 14px 15px),
    linear-gradient(135deg, rgba(244, 185, 66, 0.18), rgba(15, 118, 110, 0.08));
  filter: blur(10px);
  opacity: 0.42;
  transform: rotate(-18deg);
}

.hero-figure img {
  filter:
    drop-shadow(0 28px 44px rgba(26, 20, 16, 0.18))
    drop-shadow(0 0 22px rgba(244, 185, 66, 0.18))
    saturate(1.08)
    contrast(1.04);
}

.section {
  position: relative;
  isolation: isolate;
}

.section > .container,
.section > .container-narrow,
.gallery > .container,
.gallery-rail {
  position: relative;
  z-index: 1;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.38;
  background:
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(15, 118, 110, 0.035) 38px 39px),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(143, 29, 44, 0.025) 38px 39px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.section-alt {
  background:
    linear-gradient(180deg, transparent, rgba(15, 118, 110, 0.045) 32%, rgba(143, 29, 44, 0.035) 67%, transparent),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(244, 185, 66, 0.04) 18px 19px);
}

.section-title {
  text-shadow: 0 2px 0 rgba(255, 253, 248, 0.72);
}

.section-eyebrow {
  border: 1px solid rgba(180, 83, 9, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.story-beat {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(255, 246, 226, 0.82)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(15, 118, 110, 0.04) 18px 19px);
}

.story-beat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--wine), var(--gild), var(--aegean));
}

.story.is-enhanced .story-beat {
  border-color: rgba(244, 185, 66, 0.24);
  box-shadow:
    0 22px 70px rgba(26, 20, 16, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.story.is-enhanced .story-laby {
  filter:
    drop-shadow(0 0 18px rgba(244, 185, 66, 0.26))
    drop-shadow(0 10px 28px rgba(26, 20, 16, 0.12));
}

.scene-cloud {
  filter: drop-shadow(0 10px 18px rgba(120, 80, 30, 0.12));
}

.bento {
  perspective: 1000px;
}

.bento-card {
  --card-accent: var(--primary);
  min-height: 230px;
  border-radius: 16px;
  border-color: rgba(180, 83, 9, 0.13);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(255, 247, 231, 0.82)),
    repeating-linear-gradient(90deg, transparent 0 16px, color-mix(in srgb, var(--card-accent), transparent 92%) 16px 17px),
    repeating-linear-gradient(0deg, transparent 0 16px, rgba(26, 20, 16, 0.025) 16px 17px);
  box-shadow:
    0 10px 28px rgba(26, 20, 16, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.66);
}

.bento-card:nth-child(1) { --card-accent: var(--wine); }
.bento-card:nth-child(2) { --card-accent: var(--aegean); }
.bento-card:nth-child(3) { --card-accent: var(--lapis); }
.bento-card:nth-child(4) { --card-accent: var(--olive); }

.bento-card::before,
.figure-card::before {
  opacity: 1;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent, var(--primary-dark)), var(--gild), var(--primary-light));
}

.bento-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--card-accent), transparent 72%);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--card-accent), transparent 82%) 0 1px, transparent 1px calc(100% - 1px), color-mix(in srgb, var(--card-accent), transparent 82%) calc(100% - 1px)),
    linear-gradient(0deg, color-mix(in srgb, var(--card-accent), transparent 82%) 0 1px, transparent 1px calc(100% - 1px), color-mix(in srgb, var(--card-accent), transparent 82%) calc(100% - 1px));
  transform: scale(0.98);
  transition: opacity 0.35s, transform 0.35s;
}

.bento-card:hover {
  transform: translateY(-8px) rotateX(2deg) scale(1.015);
  box-shadow:
    0 22px 54px rgba(26, 20, 16, 0.14),
    0 0 0 1px color-mix(in srgb, var(--card-accent), transparent 70%);
}

.bento-card:hover::after {
  opacity: 0.55;
  transform: scale(1);
}

.bento-icon {
  background: color-mix(in srgb, var(--card-accent), white 88%);
  color: var(--card-accent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--card-accent), transparent 72%),
    0 10px 22px color-mix(in srgb, var(--card-accent), transparent 86%);
}

.bento-card:hover .bento-icon {
  background: var(--card-accent);
}

.bento-card h3 {
  position: relative;
  padding-bottom: 0.75rem;
}

.bento-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--card-accent), transparent);
}

.bento-blob {
  width: 132px;
  height: 132px;
  border-radius: 0;
  right: -48px;
  bottom: -48px;
  background:
    repeating-conic-gradient(from 45deg, color-mix(in srgb, var(--card-accent), transparent 72%) 0 7deg, transparent 7deg 16deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 32%, #000 33% 58%, transparent 59%);
  mask-image: radial-gradient(circle, transparent 0 32%, #000 33% 58%, transparent 59%);
}

.figures-grid {
  perspective: 1200px;
}

.figure-card {
  --card-accent: var(--primary);
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(255, 245, 224, 0.82)),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(15, 118, 110, 0.04) 14px 15px);
  box-shadow:
    0 12px 30px rgba(26, 20, 16, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.figure-card:nth-child(1) { --card-accent: var(--wine); }
.figure-card:nth-child(2) { --card-accent: var(--aegean); }
.figure-card:nth-child(3) { --card-accent: var(--lapis); }
.figure-card:nth-child(4) { --card-accent: var(--olive); }

.figure-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 116px;
  aspect-ratio: 1;
  background:
    repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--card-accent), transparent 65%) 0 5deg, transparent 5deg 14deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 36%, #000 37% 60%, transparent 61%);
  mask-image: radial-gradient(circle, transparent 0 36%, #000 37% 60%, transparent 61%);
  opacity: 0.42;
  transition: transform 0.45s var(--ease-out), opacity 0.3s;
}

.figure-card:hover {
  transform: translateY(-10px) rotateX(3deg);
  box-shadow: 0 20px 48px rgba(26, 20, 16, 0.13);
}

.figure-card:hover::after {
  opacity: 0.7;
  transform: rotate(22deg) scale(1.12);
}

.figure-ring {
  background: conic-gradient(from 180deg, var(--card-accent), var(--gild), var(--primary-light), var(--card-accent));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--card-accent), transparent 78%);
  animation: ring-turn 12s linear infinite;
}

@keyframes ring-turn {
  to { transform: rotate(360deg); }
}

.figure-ring-inner {
  background:
    linear-gradient(145deg, var(--surface), #fff3d7),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(26, 20, 16, 0.04) 7px 8px);
  color: var(--card-accent);
}

.flight-map {
  isolation: isolate;
  border-radius: 18px;
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow:
    0 24px 60px rgba(26, 20, 16, 0.14),
    0 0 0 8px rgba(255, 253, 248, 0.72),
    0 0 0 9px rgba(180, 83, 9, 0.12);
}

.flight-map::before {
  content: "";
  position: absolute;
  inset: 13px;
  z-index: 5;
  border: 1px solid rgba(120, 53, 15, 0.22);
  border-radius: 11px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.55);
}

.flight-map::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 5;
  width: 86px;
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.42;
  background:
    conic-gradient(from 0deg, var(--wine) 0 10deg, transparent 10deg 35deg, var(--aegean) 35deg 45deg, transparent 45deg 80deg),
    radial-gradient(circle, transparent 0 42%, var(--primary-dark) 43% 45%, transparent 46%);
  -webkit-mask-image: radial-gradient(circle, #000 0 64%, transparent 65%);
  mask-image: radial-gradient(circle, #000 0 64%, transparent 65%);
  animation: compass-breathe 6s ease-in-out infinite;
}

@keyframes compass-breathe {
  0%, 100% { transform: scale(1); opacity: 0.34; }
  50% { transform: scale(1.08); opacity: 0.55; }
}

.flight-svg {
  filter: saturate(1.07) contrast(1.02);
}

.flight-grid {
  animation: grid-glow 8s ease-in-out infinite;
}

@keyframes grid-glow {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.flight-route {
  filter:
    drop-shadow(0 0 4px rgba(244, 185, 66, 0.55))
    drop-shadow(0 6px 8px rgba(120, 53, 15, 0.16));
}

.flight.in-view .flight-route {
  animation: route-heat 2.8s ease-in-out infinite alternate;
}

@keyframes route-heat {
  from { filter: drop-shadow(0 0 3px rgba(244, 185, 66, 0.45)); }
  to { filter: drop-shadow(0 0 12px rgba(244, 185, 66, 0.85)) drop-shadow(0 8px 12px rgba(120, 53, 15, 0.22)); }
}

.flight-label .flight-label-main {
  fill: var(--wine);
}

.flight-label:nth-of-type(2) .flight-label-main {
  fill: var(--primary-dark);
}

.flight-label:nth-of-type(3) .flight-label-main {
  fill: var(--aegean-dark);
}

.gallery {
  overflow: hidden;
}

.gallery-rail {
  perspective: 1400px;
  padding-top: 1.3rem;
  padding-bottom: 2rem;
}

.gallery-item {
  transition: transform 0.45s var(--ease-out), filter 0.45s var(--ease-out);
  transform-origin: center bottom;
}

.gallery-item:nth-child(odd) { transform: rotate(-1.7deg); }
.gallery-item:nth-child(even) { transform: rotate(1.4deg) translateY(10px); }
.gallery-item:nth-child(3n) { transform: rotate(0.6deg) translateY(-6px); }

.gallery-item:hover {
  z-index: 3;
  filter: saturate(1.08);
  transform: translateY(-16px) rotate(0deg) scale(1.035);
}

.gallery-frame {
  border-radius: 10px;
  border: 9px solid var(--marble);
  outline: 1px solid rgba(120, 53, 15, 0.22);
  box-shadow:
    0 20px 42px rgba(26, 20, 16, 0.16),
    inset 0 0 0 1px rgba(244, 185, 66, 0.32);
}

.gallery-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 2;
  border: 1px solid rgba(244, 185, 66, 0.38);
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(26, 20, 16, 0.08),
    inset 0 0 28px rgba(120, 53, 15, 0.16);
}

.gallery-frame::after {
  z-index: 3;
  opacity: 0.32;
  background:
    linear-gradient(180deg, transparent 40%, rgba(26, 20, 16, 0.26)),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(255, 255, 255, 0.06) 11px 12px);
}

.gallery-frame img {
  filter: saturate(1.05) contrast(1.04);
}

.gallery-item:hover .gallery-frame::after {
  opacity: 0.72;
}

.gallery-item figcaption {
  padding: 0.9rem 0.4rem 0;
}

.gallery-title {
  color: var(--foreground);
}

.gallery-meta {
  color: color-mix(in srgb, var(--aegean-dark), var(--muted-light) 45%);
}

.quote-block {
  isolation: isolate;
  border: 1px solid rgba(244, 185, 66, 0.28);
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.94), rgba(143, 29, 44, 0.94) 46%, rgba(120, 53, 15, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(255, 255, 255, 0.06) 16px 17px);
  box-shadow:
    0 22px 60px rgba(30, 58, 138, 0.22),
    0 18px 54px rgba(143, 29, 44, 0.16);
}

.quote-block::before {
  inset: -45%;
  width: auto;
  height: auto;
  border-radius: 0;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 230, 173, 0.32) 0 2deg, transparent 2deg 11deg);
  opacity: 0.38;
  animation: quote-radiate 34s linear infinite;
}

.quote-block::after {
  inset: 16px;
  width: auto;
  height: auto;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 230, 173, 0.32), transparent 18%, transparent 82%, rgba(255, 230, 173, 0.32)),
    linear-gradient(0deg, rgba(255, 230, 173, 0.24), transparent 18%, transparent 82%, rgba(255, 230, 173, 0.24));
  opacity: 0.55;
}

@keyframes quote-radiate {
  to { transform: rotate(360deg); }
}

.quote-text {
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.26);
}

.faq-item {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(255, 247, 231, 0.86)),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(15, 118, 110, 0.035) 16px 17px);
}

.faq-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--wine), var(--gild), var(--aegean));
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 0.32s var(--ease-out);
}

.faq-item.open::before,
.faq-item:hover::before {
  transform: scaleY(1);
}

.faq-question,
.faq-answer {
  position: relative;
  z-index: 1;
}

.faq-num {
  border: 1px solid rgba(180, 83, 9, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.footer {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 118, 110, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(255, 246, 226, 0.86)),
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(143, 29, 44, 0.04) 20px 21px);
}

.footer::before {
  content: "";
  position: absolute;
  inset: -35% -10% auto auto;
  width: 420px;
  aspect-ratio: 1;
  background:
    repeating-conic-gradient(from 0deg, rgba(15, 118, 110, 0.18) 0 4deg, transparent 4deg 12deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 36%, #000 37% 62%, transparent 63%);
  mask-image: radial-gradient(circle, transparent 0 36%, #000 37% 62%, transparent 63%);
  opacity: 0.4;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
}

.footer-links a {
  position: relative;
  width: fit-content;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--aegean), var(--gild));
  transition: right 0.25s var(--ease-out);
}

.footer-links a:hover::after {
  right: 0;
}

@media (max-width: 900px) {
  .hero-main::before {
    display: none;
  }

  .commission-inner {
    grid-template-columns: 1fr;
  }

  .commission-ledger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .commission-link {
    width: fit-content;
  }

  .hero-detail-rail {
    max-width: 100%;
  }

  .gallery-item:nth-child(n) {
    transform: none;
  }

  .gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
  }
}

@media (max-width: 640px) {
  .commission {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.85rem 0.75rem;
  }

  .commission-inner {
    padding: 0;
  }

  .commission-ledger {
    grid-template-columns: 1fr;
  }

  .commission-link {
    width: fit-content;
  }

  .hero {
    display: block;
    overflow: hidden;
    padding-top: 1.5rem;
  }

  .hero-main {
    position: relative;
    z-index: 10;
    padding-top: 0.7rem;
  }

  .hero-badge {
    display: none;
  }

  .hero-title {
    font-size: clamp(66px, 23vw, 92px);
  }

  .hero-subtitle {
    margin-top: 0.8rem;
    padding: 0.9rem 1rem;
    font-size: 0.96rem;
    line-height: 1.58;
  }

  .hero-detail-rail span {
    flex: 1 1 100%;
  }

  .hero-actions {
    gap: 0.65rem;
    margin-top: 1rem;
  }

  .hero-actions .btn {
    width: min(100%, 174px);
    min-height: 48px;
  }

  .hero-figure {
    position: absolute;
    right: -4.8rem;
    bottom: -4.8rem;
    width: min(86vw, 340px);
    opacity: 0.72;
    z-index: 2;
  }

  .hero-figure img {
    width: 100%;
    max-height: none;
  }

  .hero::after,
  .hero-figure::before {
    opacity: 0.1;
  }

  .flight-map::after {
    width: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-inner::after,
  .hero::before,
  .hero::after,
  .hero-badge-dot,
  .hero-title .outline,
  .hero-figure::before,
  .figure-ring,
  .flight-grid,
  .flight.in-view .flight-route,
  .flight-map::after,
  .quote-block::before {
    animation: none !important;
  }

  .bento-card:hover,
  .figure-card:hover,
  .gallery-item:hover,
  .btn-tertiary:hover {
    transform: none !important;
  }
}
