/* ==================================
   public/css/experience.css
   Dark cinematic 3D scroll experience (home page)
   ================================== */

:root {
  --bg: #05080f;
  --bg-soft: #0b1220;
  --ink: #f2f5fb;
  --ink-dim: #bcc6da;
  --navy: #1b2a49;
  --orange: #f57c00;
  --amber: #ffb25e;
  --line: rgba(238, 241, 248, 0.1);
  --glass: rgba(10, 16, 30, 0.6);
  --radius: 18px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, "Roboto Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--orange); color: #fff; }

/* ---------- 3D canvas + vignette ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(3, 5, 10, 0.6) 100%),
    linear-gradient(to bottom, rgba(3, 5, 10, 0.4), transparent 16%, transparent 84%, rgba(3, 5, 10, 0.55));
}

/* Fallback background when WebGL is unavailable */
body.no-webgl #scene { display: none; }
body.no-webgl .vignette {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(27, 42, 73, 0.9), transparent),
    radial-gradient(ellipse 60% 45% at 85% 100%, rgba(245, 124, 0, 0.14), transparent),
    var(--bg);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

.site-header.scrolled {
  background: rgba(5, 8, 15, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(2, 4, 8, 0.5));
}

.brand .brand-accent {
  background: linear-gradient(100deg, var(--amber), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.25s;
}

.site-nav a:hover { color: var(--ink); }

.site-nav .nav-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #d96c00);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(245, 124, 0, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}

.site-nav .nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(245, 124, 0, 0.5);
}

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- Progress dots ---------- */
.dots {
  position: fixed;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dots a {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(238, 241, 248, 0.25);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.dots a:hover { background: rgba(238, 241, 248, 0.6); }

.dots a.active {
  background: var(--orange);
  transform: scale(1.35);
  box-shadow: 0 0 12px rgba(245, 124, 0, 0.8);
}

@media (max-width: 720px) {
  .dots { display: none; }
}

/* ---------- Panels ---------- */
main { position: relative; z-index: 10; }

.panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 12vh, 8rem) clamp(1.25rem, 6vw, 5rem);
}

.panel.chapter { min-height: 125vh; }

.panel-inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

.panel-inner.narrow { max-width: 820px; }

/* Chapters alternate sides so the scene plays through on the other half */
/* Sections whose copy floats directly over the scene get a glass scrim */
#scale .panel-inner,
#contact .panel-inner {
  background: linear-gradient(165deg, rgba(8, 13, 24, 0.82), rgba(8, 13, 24, 0.64));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.8rem, 4vw, 3.2rem);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(2, 4, 8, 0.45);
}

.copy-card {
  max-width: 560px;
  background: linear-gradient(160deg, rgba(9, 14, 26, 0.88), rgba(9, 14, 26, 0.72));
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(2, 4, 8, 0.5);
}

.side-right { display: flex; justify-content: flex-end; }
.side-right .copy-card {
  border-left: 1px solid var(--line);
  border-right: 3px solid var(--orange);
}

/* Reveal animation */
.reveal > *, .reveal .copy-card > * {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.65, 0.25, 1), transform 0.9s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.reveal.in > *, .reveal.in .copy-card > * { opacity: 1; transform: none; }

.reveal.in > *:nth-child(1), .reveal.in .copy-card > *:nth-child(1) { transition-delay: 0s; }
.reveal.in > *:nth-child(2), .reveal.in .copy-card > *:nth-child(2) { transition-delay: 0.1s; }
.reveal.in > *:nth-child(3), .reveal.in .copy-card > *:nth-child(3) { transition-delay: 0.2s; }
.reveal.in > *:nth-child(4), .reveal.in .copy-card > *:nth-child(4) { transition-delay: 0.3s; }
.reveal.in > *:nth-child(5), .reveal.in .copy-card > *:nth-child(5) { transition-delay: 0.4s; }
.reveal.in > *:nth-child(6), .reveal.in .copy-card > *:nth-child(6) { transition-delay: 0.5s; }

/* ---------- Type ---------- */
.eyebrow {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.chapter-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(245, 124, 0, 0.45);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.2rem;
  background: rgba(245, 124, 0, 0.08);
}

.grad {
  background: linear-gradient(100deg, var(--amber), var(--orange) 55%, #ff9330);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title {
  font-size: clamp(2.6rem, 8.6vw, 6.6rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 6px rgba(3, 5, 10, 0.85), 0 8px 40px rgba(3, 5, 10, 0.7);
}

.hero-title .outline {
  color: rgba(10, 14, 24, 0.55);
  -webkit-text-stroke: 2.5px var(--orange);
  text-stroke: 2.5px var(--orange);
  text-shadow: none;
  filter: drop-shadow(0 3px 14px rgba(3, 5, 10, 0.9));
}

.section-title {
  font-size: clamp(1.8rem, 4.2vw, 3.1rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.3rem;
  text-shadow: 0 2px 6px rgba(3, 5, 10, 0.8), 0 6px 30px rgba(3, 5, 10, 0.6);
}

.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--ink);
  max-width: 38rem;
  margin-bottom: 2.2rem;
  text-shadow: 0 1px 4px rgba(3, 5, 10, 0.9), 0 4px 22px rgba(3, 5, 10, 0.75);
}

.eyebrow {
  text-shadow: 0 1px 4px rgba(3, 5, 10, 0.9);
}

.body-copy {
  color: var(--ink-dim);
  font-size: 1.06rem;
  max-width: 46rem;
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 3px rgba(3, 5, 10, 0.7);
}

.body-copy.footnote { margin-top: 2rem; font-size: 0.95rem; }

.inline-link { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(245, 124, 0, 0.5); }
.inline-link:hover { color: var(--orange); }

/* Process highlights */
.ticks {
  list-style: none;
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ticks li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.ticks li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--orange);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #d96c00);
  box-shadow: 0 6px 24px rgba(245, 124, 0, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(245, 124, 0, 0.5);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(238, 241, 248, 0.06);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(238, 241, 248, 0.12);
  border-color: rgba(238, 241, 248, 0.25);
}

.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 44px;
  margin: 0 auto 0.6rem;
  background: linear-gradient(to bottom, transparent, var(--orange));
  animation: hint 2s ease-in-out infinite;
}

@keyframes hint {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}

.stat {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat h3 {
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #fff, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat p { color: var(--ink-dim); font-size: 0.92rem; margin-top: 0.35rem; }

/* ---------- Network / locations ---------- */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 1.4rem;
}

.loc {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.loc-pin {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(245, 124, 0, 0.18), 0 0 18px rgba(245, 124, 0, 0.7);
  margin-bottom: 1rem;
}

.loc h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.35rem; }
.loc p { color: var(--ink-dim); font-size: 0.92rem; }

/* ---------- Contact form ---------- */
.contact-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 640px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.contact-form label { display: flex; flex-direction: column; gap: 0.45rem; }

.contact-form label span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.contact-form input,
.contact-form textarea {
  background: rgba(238, 241, 248, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.25s, background 0.25s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(238, 241, 248, 0.08);
}

.contact-form button { align-self: flex-start; }

#contactStatus { margin-top: 1rem; font-weight: 600; }
#contactStatus .ok { color: #5ad18a; }
#contactStatus .err { color: #ff7b7b; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1160px;
  margin: 5rem auto 0;
  width: 100%;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-dim);
  font-size: 0.88rem;
}

.site-footer nav { display: flex; gap: 1.2rem; }

.site-footer a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.25s;
}

.site-footer a:hover { color: var(--ink); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal > *, .reveal .copy-card > * { opacity: 1; transform: none; transition: none; }
  .scroll-hint span { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
