/* SAVIA — editorial layer over the WebGL growth world.
   Inverted brightness arc: humus dark below ground → paper light above.
   body.below = dark chrome on dark world · body.above = dark ink on paper world. */
:root {
  --humus: #12100c;
  --root: #d8cfb8;
  --leaf: #5a7d3a;
  --paper: #f2efe6;
  --ink: #1d1a12;
  --body: "Inter Tight", system-ui, sans-serif;
  --serif: "Marcellus", Georgia, serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--root) var(--humus); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--humus); }
::-webkit-scrollbar-thumb { background: var(--root); border-radius: 5px; }
html, body { background: var(--humus); color: var(--root); }
body { font-family: var(--serif); overflow-x: hidden; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#track { position: relative; z-index: 1; pointer-events: none; }
#hud { display: none; position: fixed; bottom: 12px; left: 12px; z-index: 90;
  color: var(--leaf); font: 11px var(--body); white-space: pre; pointer-events: none;
  text-shadow: 0 0 6px var(--paper); }
body.debug #hud { display: block; }

.mono { font-family: var(--body); font-weight: 500; letter-spacing: 0.16em; font-size: 11px; }

/* prologue veil — the line speaks first, the world fades in beneath */
#veil { position: fixed; inset: 0; z-index: 10; background: var(--humus);
  opacity: 1; transition: opacity 2.4s ease; pointer-events: none; }
body.world-in #veil { opacity: 0; }

/* chrome — colors flip with the brightness arc */
.chrome { position: fixed; left: 0; right: 0; z-index: 40; display: flex;
  align-items: center; justify-content: space-between; padding: 28px 40px; }
.chrome-top { top: 0; opacity: 0; transition: opacity 1.6s ease .4s; }
body.world-in .chrome-top { opacity: 1; }        /* brand small, after (A-4) */
.chrome-bottom { bottom: 0; pointer-events: none; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--root);
  text-decoration: none; transition: color .8s; }
.wm-glyph { width: 21px; height: 21px; color: var(--leaf); }
.wm-text { font-family: var(--serif); font-size: 19px; letter-spacing: 0.44em; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--root); text-decoration: none; opacity: 0.75;
  transition: opacity .3s, color .8s; }
.nav a:hover { opacity: 1; }
body.above .wordmark, body.above .nav a { color: var(--ink); }

/* growth-stage gauge — the progress UI IS a stem that fills (SEMILLA→JARDÍN) */
.gauge { position: fixed; left: 38px; top: 50%; transform: translateY(-50%);
  z-index: 40; height: 46vh; min-height: 300px; width: 20px; }
.gauge-stem { position: absolute; left: 9px; top: 0; bottom: 0; width: 2px;
  border-radius: 1px; background: color-mix(in srgb, currentColor 18%, transparent);
  color: var(--root); transition: color .8s; overflow: hidden; }
.gauge-fill { position: absolute; left: 0; bottom: 0; width: 100%; height: 0;
  background: var(--leaf); box-shadow: 0 0 8px rgba(90,125,58,.8); }
.gauge-node { position: absolute; left: 0; display: flex; align-items: center; gap: 12px;
  background: none; border: 0; cursor: pointer; color: var(--root); padding: 0;
  transform: translateY(50%); transition: color .8s; }
.gauge-node i { width: 9px; height: 9px; margin-left: 5.5px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  background: transparent; transition: background .4s, border-color .4s, box-shadow .4s; }
.gauge-node span { opacity: 0; transform: translateX(-4px);
  transition: opacity .4s, transform .4s; letter-spacing: .2em; }
.gauge-node.active i { background: var(--leaf); border-color: var(--leaf);
  box-shadow: 0 0 10px rgba(90,125,58,.8); }
.gauge-node.active span { opacity: .95; transform: none; }
.gauge-node:hover span { opacity: .7; transform: none; }
body.above .gauge-node, body.above .gauge-stem { color: var(--ink); }

/* skip */
.skip { pointer-events: auto; background: none;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  color: var(--root); padding: 10px 18px; cursor: pointer; letter-spacing: .18em;
  font-family: var(--body); font-weight: 500; font-size: 11px;
  transition: border-color .3s, color .8s; border-radius: 2px; }
.skip:hover { border-color: var(--leaf); color: var(--leaf); }
body.above .skip { color: var(--ink); }

/* editorial overlays */
.overlays { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.ov { position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; padding: 0 8vw 0 13vw; opacity: 0; visibility: hidden; }
.ov > * { transform: translateY(24px); transition: transform 1s cubic-bezier(.16,1,.3,1); }
.ov.on > * { transform: none; }
.ov.on { visibility: visible; }
.ov-right { align-items: flex-end; text-align: right; padding-right: 10vw; }
.ov-low { justify-content: flex-end; padding-bottom: 14vh; }
.ov-center { align-items: center; text-align: center; padding: 0 6vw; }
.ov-dark { color: var(--ink); }
.ov-dark .chapnum { color: #3f5a28; }

.kicker { color: var(--root); margin-top: 34px; opacity: .8; }
.chapnum { color: var(--leaf); margin-bottom: 20px;
  filter: brightness(1.35); }
.ov-dark .chapnum { filter: none; }
.display { font-size: clamp(46px, 7.6vw, 116px); line-height: 1.06; font-weight: 400;
  text-shadow: 0 2px 44px rgba(6,5,3,.9); }
.display em { font-style: normal; color: #b7ab8a; }
.display-sm { font-size: clamp(34px, 4.6vw, 66px); line-height: 1.1; font-weight: 400;
  text-shadow: 0 2px 30px rgba(6,5,3,.55); }
.ov-dark .display-sm { text-shadow: 0 2px 30px rgba(242,239,230,.5); }
.sub { margin-top: 30px; opacity: .6; }
.body-line { margin-top: 20px; opacity: .8; }
/* prologue: the line arrives first, brand + hint after (Getty pattern) */
#ov-prologue .delayed { opacity: 0; transition: opacity 1.8s ease 2.2s; }
body.world-in #ov-prologue.on .delayed { opacity: .7; }

/* quiet-card finale (E-4) — a calm paper card, no spectacle */
.quiet-card { background: rgba(242,239,230,.82); backdrop-filter: blur(10px);
  color: var(--ink); padding: 56px 64px 60px; border: 1px solid rgba(29,26,18,.14);
  border-radius: 3px; box-shadow: 0 30px 80px rgba(29,26,18,.18); }
.quiet-card .chapnum { color: var(--leaf); filter: none; letter-spacing: .5em; }
.quiet-card .display-sm { text-shadow: none; }

.cta { pointer-events: auto; margin-top: 40px; display: inline-block;
  font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: .2em;
  color: var(--paper); background: var(--leaf); padding: 17px 36px;
  text-decoration: none; border-radius: 2px; transition: background .3s, transform .3s;
  text-transform: uppercase; }
.cta:hover { background: var(--ink); transform: translateY(-2px); }
.foot { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  color: var(--ink); opacity: .5; letter-spacing: .2em; }

/* contacto overlay — pure :target */
.contacto { display: none; position: fixed; inset: 0; z-index: 60;
  background: rgba(242,239,230,.94); backdrop-filter: blur(6px); color: var(--ink);
  align-items: center; justify-content: center; text-align: center; }
.contacto:target { display: flex; }
.contacto-card { padding: 60px 8vw; }
.contacto-card .display-sm { text-shadow: none; }
.contacto-card .chapnum { color: var(--leaf); filter: none; }
.contacto-line { margin-top: 22px; opacity: .65; }
.contacto-close { display: block; margin-top: 46px; color: var(--ink);
  text-decoration: none; opacity: .6; transition: opacity .3s, color .3s; }
.contacto-close:hover { opacity: 1; color: var(--leaf); }

/* custom cursor: a small seed that sprouts on hover (Menu G) */
@media (pointer: fine) {
  body.seed-cursor, body.seed-cursor a, body.seed-cursor button { cursor: none; }
  #cursor { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none;
    width: 26px; height: 34px; }
  #cursor .seed { position: absolute; left: 9px; bottom: 4px; width: 8px; height: 10px;
    border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
    background: var(--root); transition: background .6s; }
  body.above #cursor .seed { background: var(--ink); }
  #cursor .sprout { position: absolute; left: 0; bottom: 11px; width: 26px; height: 22px;
    color: var(--leaf); opacity: 0; transform: scale(0.2) translateY(8px);
    transform-origin: 50% 100%; transition: opacity .25s, transform .35s cubic-bezier(.2,1.4,.4,1); }
  #cursor.sprout-on .sprout { opacity: 1; transform: none; }
}
@media (pointer: coarse) { #cursor { display: none; } }

/* reduced motion: native scroll + poster world (full garden + bench) */
@media (prefers-reduced-motion: reduce) {
  .ov > * { transition: none; transform: none; }
  #veil { transition: none; }
  #ov-prologue .delayed { transition: none; }
}
body.reduced .overlays { position: static; pointer-events: auto; }
body.reduced .ov { position: relative; inset: auto; min-height: 100vh;
  opacity: 1; visibility: visible; color: var(--ink);
  background: linear-gradient(rgba(242,239,230,0), rgba(242,239,230,.72) 18%,
    rgba(242,239,230,.72) 82%, rgba(242,239,230,0)); }
body.reduced .ov .display, body.reduced .ov .display-sm { text-shadow: none; }
body.reduced .ov .display em { color: var(--leaf); }
body.reduced .kicker, body.reduced .sub { color: var(--ink); }
body.reduced #ov-final .foot { color: var(--ink); }
body.reduced #track, body.reduced .skip, body.reduced .gauge,
body.reduced #cursor { display: none; }
body.reduced #veil { opacity: 0; }
body.reduced .chrome-top { opacity: 1; }

@media (max-width: 768px) {
  .chrome { padding: 18px 16px; gap: 10px; }
  .nav { gap: 10px; flex: none; }
  .nav a { font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
  .wm-glyph { width: 16px; height: 16px; }
  .wm-text { font-size: 13px; letter-spacing: .3em; }
  .gauge { left: 12px; height: 38vh; min-height: 220px; }
  .gauge-node span { display: none; }
  .ov { padding: 0 8vw; }
  .ov-right { padding-right: 8vw; }
  .quiet-card { padding: 36px 26px 40px; }
  .skip { padding: 8px 12px; font-size: 10px; }
}
