/* Vanimechi · página «en construcción». Autónoma: no depende de main.css. */
:root {
  --bg: #120F0C; --bg-2: #1C1814; --paper: #F2EDE3; --muted: #B9AFA1;
  /* hero-three.js lee estos colores para las partículas */
  --ink: #F2EDE3; --accent: #FF5A3C;
  --c-red: #E94F37; --c-teal: #2EC4B6; --c-amber: #F2A93B; --c-pink: #FF6F91; --c-violet: #B8A1FF; --c-lime: #9BE564;
  --tape: #F7C548;
  --f-sans: "Bricolage Grotesque", system-ui, sans-serif;
  --f-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-jp: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--paper);
  font: 400 1.05rem/1.55 var(--f-serif); font-variation-settings: "SOFT" 100; overflow-x: clip; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: .6rem 1rem; background: var(--tape); color: #111; font: 700 .9rem var(--f-sans); border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Fondo ---------- */
.cc-collage { position: fixed; inset: -30% -15%; z-index: 0; pointer-events: none; display: grid; align-content: center; gap: 12px;
  transform: rotate(-6deg); opacity: .3; isolation: isolate; }
.cc-collage::after { content: ""; position: absolute; inset: 0; mix-blend-mode: color;
  background: linear-gradient(100deg, var(--c-red), var(--c-violet) 45%, var(--c-teal)); }
.cc-row { display: flex; gap: 12px; width: max-content; }
.cc-row img { display: block; width: clamp(300px, 34vw, 560px); height: auto; aspect-ratio: 12 / 5; object-fit: cover; border-radius: 6px;
  filter: grayscale(1) contrast(1.2) blur(1.2px); }
.motion .cc-row { animation: cc-pan 100s linear infinite; }
.motion .cc-row:nth-child(2) { animation-direction: reverse; animation-duration: 120s; }
.motion .cc-row:nth-child(3) { animation-duration: 140s; }
@keyframes cc-pan { to { transform: translateX(-50%); } }
/* Linterna: el cursor revela el collage a color */
.cc-collage.is-lit { opacity: .9; -webkit-mask-image: radial-gradient(circle 190px at var(--mx, -999px) var(--my, -999px), #000 30%, transparent 100%);
  mask-image: radial-gradient(circle 190px at var(--mx, -999px) var(--my, -999px), #000 30%, transparent 100%); transition: opacity .35s; }
.cc-collage.is-lit::after { display: none; }
.cc-collage.is-lit img { filter: saturate(1.15); }

/* Plano azul de obra que se desvanece hacia abajo */
.cc-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(143,211,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(143,211,255,.09) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 20%, transparent 75%); }
.cc-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; filter: blur(80px); opacity: .45; }
.cc-glow span { position: absolute; width: 42vmax; height: 42vmax; border-radius: 50%; background: var(--c-red); left: -10%; top: -15%; }
.cc-glow span:nth-child(2) { background: var(--c-teal); left: 55%; top: 5%; width: 34vmax; height: 34vmax; }
.cc-glow span:nth-child(3) { background: var(--c-violet); left: 25%; top: 60%; width: 30vmax; height: 30vmax; }
.motion .cc-glow span { animation: cc-drift 22s ease-in-out infinite alternate; }
.motion .cc-glow span:nth-child(2) { animation-duration: 28s; }
.motion .cc-glow span:nth-child(3) { animation-duration: 34s; }
@keyframes cc-drift { to { transform: translate(8vw, 6vh) scale(1.15); } }
/* Velo para que el texto siempre se lea sobre el collage */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(18,15,12,.35), rgba(18,15,12,.88)); }

/* ---------- Cabecera ---------- */
.top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 800 1.15rem/1 var(--f-sans); text-decoration: none; letter-spacing: -.02em; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 1.05rem; }
.top__status { margin: 0; display: inline-flex; align-items: center; gap: .5rem; font: 600 .82rem/1 var(--f-sans);
  padding: .5rem .8rem; border-radius: 999px; background: rgba(242,237,227,.08); border: 1px solid rgba(242,237,227,.18); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tape); box-shadow: 0 0 0 0 rgba(247,197,72,.7); }
.motion .dot { animation: cc-ping 1.6s ease-out infinite; }
@keyframes cc-ping { to { box-shadow: 0 0 0 10px rgba(247,197,72,0); } }

/* ---------- Cintas de obra ---------- */
.tapes { position: relative; z-index: 0; height: 0; pointer-events: none; }
.tape { position: absolute; left: 50%; top: clamp(4px, 2vh, 24px); width: 140vw; translate: -50% 0; overflow: hidden; display: flex;
  background: repeating-linear-gradient(135deg, var(--tape) 0 22px, #141210 22px 44px); padding: 5px 0; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.tape--a { rotate: -3.5deg; }
.tape--b { rotate: 3deg; opacity: .85; filter: brightness(.82); }
.tape span { flex: none; white-space: nowrap; padding: .35rem 0; background: var(--tape); color: #141210;
  font: 800 .95rem/1 var(--f-sans); letter-spacing: .12em; }
.motion .tape span { animation: cc-tape 40s linear infinite; }
.motion .tape--b span { animation-direction: reverse; animation-duration: 48s; }
@keyframes cc-tape { to { transform: translateX(-100%); } }

/* ---------- Hero ---------- */
main { position: relative; z-index: 3; width: min(1120px, 100% - clamp(32px, 8vw, 96px)); margin: 0 auto;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2.4vw, 28px); padding-bottom: 48px; }
.hero { grid-column: 1 / -1; text-align: center; }
.stage { position: relative; height: clamp(200px, 34vh, 330px); margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage__word { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; font: 800 clamp(3rem, 13vw, 10rem)/1 var(--f-sans);
  letter-spacing: -.04em; color: var(--paper); }
.has-webgl .stage__word { visibility: hidden; }
.stage__jp { position: absolute; right: clamp(4px, 1.5vw, 20px); top: 4%; writing-mode: vertical-rl; font: 600 clamp(1rem, 2.2vw, 1.6rem)/1 var(--f-jp);
  color: var(--accent); letter-spacing: .3em; opacity: .9; }
.title { position: relative; z-index: 1; margin: clamp(84px, 12vh, 130px) auto 0; max-width: 16ch; font: 400 clamp(2.4rem, 6.4vw, 5.2rem)/.98 var(--f-serif);
  font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -.03em; text-wrap: balance; }
.title__line { display: inline-block; }
.title__em { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--accent);
  background: linear-gradient(transparent 62%, rgba(247,197,72,.28) 62% 90%, transparent 90%); padding: 0 .08em; }
.lede { max-width: 58ch; margin: 1.4rem auto 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); text-wrap: pretty; }
.lede strong { color: var(--paper); font-weight: 600; }

/* ---------- Paneles ---------- */
.panel { grid-column: span 6; position: relative; padding: clamp(18px, 2.4vw, 28px); border-radius: 18px;
  background: rgba(28,24,20,.78); border: 1px solid rgba(242,237,227,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.panel:first-of-type { margin-top: 0; }
.panel--build { margin-top: 32px; }
.panel--days { margin-top: 32px; }
.panel__t { margin: 0 0 1rem; display: flex; align-items: baseline; gap: .6rem; font: 700 1.05rem/1.2 var(--f-sans); letter-spacing: -.01em; }
.panel__t span { font: 600 .75rem var(--f-mono); color: var(--accent); }
.panel__d { margin: .6rem 0 0; color: var(--muted); font-size: .95rem; }

.meter { position: relative; height: 30px; border-radius: 8px; overflow: hidden; background: rgba(242,237,227,.08); border: 1px solid rgba(242,237,227,.16); }
.meter__fill { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 7px;
  background: repeating-linear-gradient(135deg, var(--tape) 0 12px, #E9B032 12px 24px); }
.motion .meter__fill { background-size: 34px 34px; animation: cc-stripes 1.2s linear infinite; }
@keyframes cc-stripes { to { background-position: 34px 0; } }
.meter__n { position: absolute; right: 10px; top: 50%; translate: 0 -50%; font: 700 .85rem var(--f-mono); color: var(--paper); }
.log { list-style: none; margin: 1rem 0 0; padding: 0; font: 500 .88rem/1.5 var(--f-mono); color: var(--muted); }
.log li { display: flex; gap: .55rem; padding: .28rem 0; border-bottom: 1px dashed rgba(242,237,227,.1); }
.log li::before { content: "○"; color: rgba(242,237,227,.4); }
.log li.is-ok { color: var(--paper); }
.log li.is-ok::before { content: "✓"; color: var(--c-lime); }
.log li.is-now { color: var(--tape); }
.log li.is-now::before { content: "◐"; color: var(--tape); }
.motion .log li.is-now::before { animation: cc-spin 1.4s linear infinite; display: inline-block; }
@keyframes cc-spin { to { transform: rotate(360deg); } }

/* Contador estilo odómetro, como los de visitas de 2003 */
.odo { margin: 0; }
.odo__digits { display: inline-flex; gap: 4px; padding: 6px; border-radius: 8px; background: #000; border: 2px solid #3C3A36;
  box-shadow: inset 0 0 0 1px #000, 0 0 24px rgba(155,229,100,.15); }
.odo__d { position: relative; display: block; width: clamp(26px, 3.4vw, 36px); height: clamp(40px, 5vw, 54px); overflow: hidden; border-radius: 4px;
  background: linear-gradient(#1b1b1b, #050505 50%, #1b1b1b); }
.odo__d::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.8); }
.odo__reel { display: block; font: 700 clamp(1.6rem, 3.2vw, 2.3rem)/clamp(40px, 5vw, 54px) var(--f-mono); color: var(--c-lime); text-align: center;
  text-shadow: 0 0 8px rgba(155,229,100,.6); }
.odo__reel span { display: block; }
.odo__sep { align-self: flex-end; color: var(--c-lime); font: 700 1.4rem var(--f-mono); }
.retro { margin: 1.2rem 0 0; }
.retro__btn { font: 700 .85rem var(--f-sans); padding: .6rem .9rem; border-radius: 10px; min-height: 44px; cursor: pointer;
  background: transparent; color: var(--paper); border: 1px dashed rgba(242,237,227,.5); }
.retro__btn:hover { border-style: solid; border-color: var(--tape); color: var(--tape); }

.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .85rem; border-radius: 999px; text-decoration: none;
  font: 700 .82rem var(--f-sans); border: 1px solid rgba(242,237,227,.25); transition: background-color .2s, color .2s; }
.social a:hover { background: var(--paper); color: var(--bg); }

.foot { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  width: min(1120px, 100% - clamp(32px, 8vw, 96px)); margin: 0 auto; padding: 20px 0 max(28px, env(safe-area-inset-bottom));
  align-items: center; border-top: 1px solid rgba(242,237,227,.14); font: 500 .85rem var(--f-sans); color: var(--muted); }
.foot p { margin: 0; }
.foot a:hover { color: var(--tape); }


@media (max-width: 960px) {
  .panel { grid-column: 1 / -1; }
  .panel--days { margin-top: 0; }
}
@media (max-width: 560px) {
  .top__status { font-size: .72rem; padding: .45rem .65rem; }
  .stage__jp { display: none; }
  .tape span { font-size: .8rem; }
}

/* ---------- Modo 2003: el guiño ---------- */
.y2003 body { background: #000033 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ctext x='8' y='26' font-size='16' fill='%23ffffff' opacity='.5'%3E*%3C/text%3E%3C/svg%3E");
  font-family: Verdana, Tahoma, sans-serif; }
.y2003 body::before, .y2003 .cc-collage, .y2003 .cc-glow, .y2003 .cc-grid { display: none; }
.y2003 .title, .y2003 .title__em { font-family: "Comic Sans MS", "Trebuchet MS", cursive; color: #FFFF00; background: none;
  text-shadow: 3px 3px 0 #FF00FF; font-style: normal; }
.y2003 .lede { color: #00FF00; font-family: "Times New Roman", serif; }
.y2003 .panel { background: #C0C0C0; color: #000; border: 3px outset #fff; border-radius: 0; backdrop-filter: none; box-shadow: none; }
.y2003 .panel__t { background: linear-gradient(90deg, #000080, #1084D0); color: #fff; margin: -10px -10px 1rem; padding: 4px 8px; font-family: Tahoma, sans-serif; }
.y2003 .panel__t span { color: #fff; }
.y2003 .log, .y2003 .log li.is-ok, .y2003 .panel__d { color: #000; font-family: "Courier New", monospace; }
.y2003 .retro__btn { background: #C0C0C0; color: #000; border: 2px outset #fff; border-radius: 0; font-family: Tahoma, sans-serif; }
.y2003 .social a { color: #00FFFF; border: 0; text-decoration: underline; border-radius: 0; }
.y2003 .brand, .y2003 .top__status { font-family: "Comic Sans MS", cursive; }
.y2003 .tape { filter: saturate(2); }
.y2003 .log li.is-now, .y2003 .log li.is-now::before { color: #800000; }
.y2003 .meter__n { color: #000; }
.y2003 .foot { color: #fff; }
.y2003 .foot a { color: #00FFFF; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .meter__fill { background: Highlight; }
  .cc-collage, .cc-glow, .cc-grid, .tape { display: none; }
}
