/* Eruption Digital */
:root {
  color-scheme: dark;
  --bg: #120b18;
  --surface: #1a1121;
  --surface-2: #22172b;
  --line: rgba(255, 240, 230, 0.09);
  --line-strong: rgba(255, 240, 230, 0.16);
  --text: #f4ece5;
  --muted: #b6a8b3;
  --faint: #8b7d8a;

  --lava: #ff5b24;
  --magma: #ffb833;
  --huipil: #e0307a;
  --quetzal: #12a37f;
  --jade: #5fd4b0;
  --atitlan: #2e7bc4;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-sm: 0.875rem;
  --t-base: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  --t-md: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
  --t-lg: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --t-xl: clamp(2rem, 1.55rem + 2vw, 3.1rem);
  --t-hero: clamp(2.9rem, 1.6rem + 5.6vw, 6.4rem);

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--t-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
::selection { background: var(--lava); color: #1a0c08; }
:focus-visible { outline: 2px solid var(--magma); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 10px; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 40; transition: background-color .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-header.scrolled { background: rgba(18, 11, 24, 0.78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: clamp(18px, 3vw, 34px); font-size: var(--t-sm); }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 12px 20px; border-radius: 999px; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.btn-primary { background: var(--text); color: #1a1016; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-quiet { color: var(--text); border: 1px solid var(--line-strong); }
.btn-quiet:hover { border-color: rgba(255, 240, 230, 0.4); }
.btn svg { width: 16px; height: 16px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; color: var(--text); }
.link-arrow svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Hero scene ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; max-height: 1180px; overflow: hidden; isolation: isolate;
  background-color: #0a0611;
  background-image:
    radial-gradient(1px 1px at 8% 12%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 23% 31%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 41% 8%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 57% 22%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 5%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 17%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 15% 44%, rgba(255,255,255,.25) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 38%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 33%, rgba(255,255,255,.25) 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 19%, rgba(255,255,255,.4) 50%, transparent 51%); }
.stage { position: absolute; }
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-far { z-index: 1; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-back { z-index: 2; }
.stage-near { z-index: 3; }
.fx-front { z-index: 4; }
.hero-fade { position: absolute; inset: auto 0 0 0; height: 26%; z-index: 5; background: linear-gradient(180deg, rgba(18, 11, 24, 0) 0%, rgba(18, 11, 24, .75) 60%, var(--bg) 100%); pointer-events: none; }
.hero .stage, .hero .fx { opacity: 0; transition: opacity 1.8s ease; }
.hero.scene-ready .stage, .hero.scene-ready .fx { opacity: 1; }
.hero.scene-ready .fx-front { transition-delay: .3s; }

.hero-copy { position: relative; z-index: 6; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-bottom: 18vh; }
.hero h1 { font-size: var(--t-hero); font-weight: 600; letter-spacing: -0.045em; line-height: 1.02; padding-bottom: 0.08em; color: #fbf4ee; text-shadow: 0 2px 40px rgba(11, 6, 18, .55); max-width: 10ch; }
.hero-lede { margin: 18px 0 0; font-size: var(--t-md); color: rgba(244, 236, 229, .82); max-width: 32ch; line-height: 1.5; text-shadow: 0 1px 24px rgba(11, 6, 18, .7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero h1, .hero-lede, .hero-actions { opacity: 0; transform: translateY(14px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.hero.scene-ready h1 { opacity: 1; transform: none; transition-delay: .5s; }
.hero.scene-ready .hero-lede { opacity: 1; transform: none; transition-delay: .7s; }
.hero.scene-ready .hero-actions { opacity: 1; transform: none; transition-delay: .9s; }

/* svg scene details */
.tw { animation: twinkle 7s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .1; } }
.crater-glow { opacity: calc(0.45 + var(--glow, 1) * 0.35); }
.flash-sky { opacity: calc(var(--flash, 0) * 0.6); }
.flash-rim { opacity: calc(var(--flash, 0) * 0.7); }
.wash { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: screen; }
.wash-lava { background: radial-gradient(42% 34% at var(--crater-x, 78%) calc(var(--crater-y, 38%) + 34%), rgba(255, 104, 46, .34), transparent 72%); opacity: calc(0.55 + (var(--glow, 1) - 1) * 1.1); }
.wash-flash { background: radial-gradient(70% 60% at var(--crater-x, 78%) calc(var(--crater-y, 38%) - 8%), rgba(196, 186, 255, .5), transparent 72%); opacity: calc(var(--flash, 0) * 0.5); }
.flow-halo { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .5; } 50% { opacity: .78; } }
.flow-pulse { stroke-dasharray: 8 62; animation: lavaflow var(--d, 3.4s) linear infinite; }
@keyframes lavaflow { to { stroke-dashoffset: -70; } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: var(--t-xl); max-width: 16ch; }
.section-head p { color: var(--muted); max-width: 40ch; margin: 0; }

/* project features */
.feature { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.feature:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .feature { grid-template-columns: 1.25fr 1fr; } .feature.reverse .feature-media { order: 2; } }
.feature-media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); aspect-ratio: 16 / 10; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
a.feature-media:hover img { transform: scale(1.025); }
.feature-body h3 { font-size: var(--t-lg); margin-bottom: 14px; }
.feature-body > p { color: var(--muted); max-width: 46ch; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; margin: 22px 0 28px; font-size: var(--t-sm); }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--jade)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--jade)) 22%, transparent); }
.status.live { --dot: var(--jade); }
.status.dev { --dot: var(--magma); }
.feature-links { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }

/* companion visual */
.aura { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 120%, #0b2a22 0%, #0d1714 60%, #0b0f10 100%); }
.aura::before, .aura::after { content: ""; position: absolute; border-radius: 50%; filter: blur(40px); }
.aura::before { width: 46%; aspect-ratio: 1; left: 27%; top: 22%; background: radial-gradient(circle, rgba(95, 212, 176, .75), rgba(18, 163, 127, .15) 60%, transparent 70%); animation: drift 14s ease-in-out infinite; }
.aura::after { width: 30%; aspect-ratio: 1; left: 48%; top: 38%; background: radial-gradient(circle, rgba(46, 123, 196, .55), transparent 70%); animation: drift 18s ease-in-out infinite reverse; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6%, 4%) scale(1.08); } }
.aura-core { position: absolute; left: 50%; top: 50%; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e9fff7, #8fe8cb 45%, rgba(95, 212, 176, 0) 72%); filter: blur(1px); }
.aura-label { position: absolute; left: 20px; bottom: 18px; font-size: var(--t-sm); color: rgba(233, 255, 247, .7); }

/* about teaser */
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.2fr; gap: 80px; } }
.split h2 { font-size: var(--t-xl); }
.split .body { color: var(--muted); font-size: var(--t-md); line-height: 1.6; }
.split .body p { max-width: 52ch; }
.split .body strong { color: var(--text); font-weight: 500; }

/* contact */
.contact-card { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); padding: clamp(36px, 6vw, 80px); background:
  radial-gradient(70% 120% at 100% 100%, rgba(255, 91, 36, .22), transparent 60%),
  radial-gradient(50% 90% at 85% 110%, rgba(255, 184, 51, .14), transparent 60%),
  var(--surface); }
.contact-card h2 { font-size: var(--t-xl); max-width: 15ch; margin-bottom: 16px; }
.contact-card p { color: var(--muted); max-width: 44ch; }
.contact-card .hero-actions { opacity: 1; transform: none; margin-top: 28px; }

/* footer */
.site-footer { padding: 36px 0 44px; font-size: var(--t-sm); color: var(--faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Inner pages ---------- */
.page-hero { position: relative; padding: 168px 0 clamp(56px, 7vw, 90px); overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 80% at 85% -10%, var(--tint, rgba(255, 91, 36, .22)), transparent 70%),
  radial-gradient(40% 60% at 10% 0%, rgba(46, 123, 196, .10), transparent 70%); }
.crumb { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; margin-bottom: 28px; }
.crumb:hover { color: var(--text); }
.crumb svg { width: 14px; height: 14px; }
.page-hero h1 { font-size: var(--t-hero); letter-spacing: -0.045em; padding-bottom: .06em; }
.page-hero .lede { font-size: var(--t-md); color: var(--muted); margin-top: 18px; max-width: 46ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 36px; font-size: var(--t-sm); }
.meta-row div { display: grid; gap: 2px; }
.meta-row span { color: var(--faint); }

.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.shot img { width: 100%; height: auto; }
.shot-caption { font-size: var(--t-sm); color: var(--faint); margin-top: 14px; }

.prose-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .prose-grid { grid-template-columns: 1fr 1.5fr; gap: 80px; } }
.prose-grid h2 { font-size: var(--t-lg); }
.prose { color: var(--muted); font-size: var(--t-md); line-height: 1.65; }
.prose p { max-width: 58ch; }
.prose strong { color: var(--text); font-weight: 500; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.list li { display: grid; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); }
.list li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .list li { grid-template-columns: 220px 1fr; gap: 24px; } }
.list b { font-weight: 500; color: var(--text); }
.list span { color: var(--muted); }
.list .tag { justify-self: start; font-size: 0.78rem; color: var(--faint); }

.palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 700px) { .palette { grid-template-columns: repeat(3, 1fr); } }
.swatch { background: var(--bg); padding: 16px; display: grid; gap: 8px; align-content: start; }
.swatch i { display: block; height: 72px; border-radius: 8px; background: var(--c); }
.swatch b { font-weight: 500; }
.swatch span { font-size: var(--t-sm); color: var(--faint); }

/* scroll reveal (single, subtle) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .nav { gap: 18px; }
  .brand span { display: none; }
  .hero-copy { justify-content: flex-start; padding-top: 26vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .hero h1, .hero-lede, .hero-actions { opacity: 1 !important; transform: none !important; }
}
