:root {
  --cream: #FFFCEE;
  --lime: #C2CE24;
  --green: #01BC8F;
  --ink: #413C36;
  --pink: #F28BE8;
  --soft: #F4F0DC;
  --sans: "Outfit", system-ui, sans-serif;
  --dotf: "Doto", ui-monospace, monospace;
  --pad: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
.dot { font-family: var(--dotf); font-weight: 900; letter-spacing: 0.02em; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
}
/* El fondo va en una capa aparte: si el blur estuviera en .nav, el menú del celular quedaría encerrado en la barra. */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--cream) 82%, transparent); backdrop-filter: blur(10px); }
.brand { position: relative; z-index: 2; }
.brand { font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: clamp(6px, 1.4vw, 14px); }
.nl { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: .95rem; font-weight: 500; padding: 9px 14px; border-radius: 999px; transition: background .25s, color .25s; }
.nl::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--green); transform: translateX(-50%) scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.nl:hover { background: color-mix(in srgb, var(--lime) 28%, transparent); }
.nl.on::after { transform: translateX(-50%) scale(1); }
.caret { width: 10px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
.cta-nav { background: var(--ink); color: var(--cream); margin-left: 6px; }
.cta-nav:hover { background: var(--green); color: var(--cream); }
.cta-nav::after { background: var(--lime); }
.drop { position: relative; }
.sub { position: absolute; top: calc(100% + 10px); left: 50%; min-width: 250px; padding: 8px; border-radius: 20px; background: var(--cream); box-shadow: 0 24px 50px -24px rgba(65,60,54,.45), 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); opacity: 0; visibility: hidden; transform: translate(-50%, -6px); transition: opacity .25s, transform .3s cubic-bezier(.2,.8,.2,1), visibility .25s; }
.sub::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.drop:hover .sub, .drop:focus-within .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.drop:hover .caret, .drop:focus-within .caret { transform: rotate(180deg); }
.sub a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; text-decoration: none; transition: background .2s; }
.sub a:hover { background: color-mix(in srgb, var(--lime) 26%, transparent); }
.sub b { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sub b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.sub a + a b::before { background: var(--green); }
.sub span { font-size: .82rem; opacity: .6; padding-left: 15px; }
.burger { display: none; }
@media (max-width: 720px) {
  .burger { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); cursor: pointer; z-index: 2; }
  .burger i { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--cream); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
  .nav.open .burger i:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.open .burger i:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav nav { position: fixed; inset: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 90px 28px 40px; background: var(--cream); clip-path: circle(0 at calc(100% - 38px) 40px); transition: clip-path .55s cubic-bezier(.6,0,.2,1); }
  .nav.open nav { clip-path: circle(150% at calc(100% - 38px) 40px); }
  .nl { font-size: 2rem; font-weight: 600; padding: 6px 0; background: none !important; }
  .nl::after { display: none; }
  .caret { display: none; }
  .cta-nav { margin: 18px 0 0; padding: 12px 26px; font-size: 1.2rem; background: var(--ink) !important; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: none; padding: 0 0 6px; min-width: 0; }
  .sub a { padding: 6px 0 6px 4px; }
  .sub b { font-size: 1.15rem; font-weight: 500; }
}

/* hero */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  padding: 120px var(--pad) 80px;
}
#mycelium { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-text { position: relative; z-index: 2; max-width: 620px; margin-left: auto; pointer-events: none; }
.hero h1 { font-size: clamp(4rem, 13vw, 10rem); }
.hero .dot { font-size: clamp(1.6rem, 4.5vw, 3rem); margin: 4px 0 0; }
.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 34ch; margin-bottom: 32px; }
@media (max-width: 720px) {
  .hero { align-items: start; padding-top: 96px; }
  .hero-text { margin-left: 0; }
}
.cta {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  background: var(--ink); color: var(--cream); text-decoration: none; font-weight: 600;
  transition: transform .2s, background .2s;
}
.cta:hover { transform: translateY(-2px); background: var(--green); }
.cta.light { background: var(--cream); color: var(--ink); }
.cta.light:hover { background: var(--lime); }

/* section motion */
.sec { opacity: 0; transform: translateY(60px); filter: blur(6px); transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1), filter 1.1s ease; }
.sec.in { opacity: 1; transform: none; filter: none; }
.kicker { display: flex; align-items: flex-end; gap: 8px; }
.sprout { width: 54px; height: 54px; flex: none; margin-bottom: -6px; }
.gallery img, .gallery .tile { clip-path: inset(100% 0 0 0 round 24px); transition: clip-path 1.2s cubic-bezier(.7,0,.2,1), transform .8s ease; }
.gallery.in img, .gallery.in .tile { clip-path: inset(0 0 0 0 round 24px); }
.gallery.in > :nth-child(2) { transition-delay: .15s; } .gallery.in > :nth-child(3) { transition-delay: .3s; }
.case-text > * { opacity: 0; transform: translateX(-24px); transition: opacity .8s ease, transform .8s ease; }
.case.in .case-text > * { opacity: 1; transform: none; }
.case.in .case-text > :nth-child(2) { transition-delay: .1s; } .case.in .case-text > :nth-child(3) { transition-delay: .2s; } .case.in .case-text > :nth-child(4) { transition-delay: .3s; }

/* sections */
section { padding: clamp(80px, 12vw, 160px) var(--pad); }
.kicker { color: var(--green); font-size: 1.3rem; margin-bottom: 16px; }
section > h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); max-width: 16ch; }
.intro { font-size: 1.2rem; max-width: 52ch; margin-top: 24px; opacity: 0.85; }

.manifesto .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); margin-top: 64px; }
@media (max-width: 860px) { .manifesto .cols { grid-template-columns: 1fr; } }
.manifesto article { background: var(--soft); border-radius: 28px; padding: 32px; }
.num { color: var(--lime); font-size: 2.6rem; display: block; margin-bottom: 18px; -webkit-text-stroke: 0.5px var(--ink); }
.manifesto h3 { font-size: 1.6rem; margin-bottom: 12px; }

/* projects */
.thread { max-width: 38ch; font-size: clamp(1.15rem, 2.1vw, 1.45rem); margin-top: 10px; opacity: .88; }
.stitch { display: grid; justify-items: center; gap: 6px; margin: clamp(36px, 6vw, 64px) 0 0; }
.stitch::before, .stitch::after { content: ""; width: 1.5px; height: clamp(24px, 4vw, 40px); background: linear-gradient(var(--lime), var(--green)); opacity: .75; }
.stitch .dot { color: var(--green); font-size: 1.2rem; }
.stitch .sprout { width: 64px; height: 64px; }
.stitch + .case { margin-top: clamp(28px, 5vw, 48px); }
.case { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; margin-top: clamp(56px, 8vw, 110px); }
.case.reverse .case-art { order: 2; }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; } .case.reverse .case-art { order: 0; } }
.case-art { aspect-ratio: 4 / 3; border-radius: 32px; overflow: hidden; background: var(--soft); box-shadow: 0 30px 60px -40px rgba(65,60,54,.45); }
.case-art canvas { width: 100%; height: 100%; display: block; }
.art-mcs { background: var(--ink); }
.art-suteki { background: #F7E9F4; }
.tag { color: var(--pink); font-size: 1.2rem; margin-bottom: 8px; }
.case h3 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 20px; }
.case-text p + p { margin-top: 14px; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 14px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.facts b { min-width: 90px; font-weight: 600; color: var(--green); }

/* galleries */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 4 / 3; }
.gallery > * { border-radius: 24px; overflow: hidden; width: 100%; height: 100%; object-fit: cover; display: block; box-shadow: 0 30px 60px -40px rgba(65,60,54,.45); }
.gallery .big { grid-row: 1 / 3; }
.gallery img { transition: transform .8s ease; }
.gallery img:hover { transform: scale(1.03); }
.gallery .tile { background: #F7E9F4; }
.gallery .tile canvas { width: 100%; height: 100%; display: block; }
.case.reverse .gallery { order: 2; }
@media (max-width: 860px) { .case.reverse .gallery { order: 0; } }
.one { font-size: clamp(1.25rem, 2.2vw, 1.6rem); max-width: 22ch; }
.link { display: inline-block; margin-top: 22px; color: var(--green); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--lime); }

.links { display: flex; flex-wrap: wrap; gap: 18px; }

/* past projects carousel */
.past { padding-right: 0; }
.past-head { display: flex; justify-content: space-between; align-items: center; padding-right: var(--pad); }
.past-nav { display: flex; gap: 10px; }
.arrow { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-size: 1.2rem; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.arrow:hover { background: var(--ink); color: var(--cream); transform: scale(1.06); }
.carousel { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-top: 28px; cursor: grab; -webkit-overflow-scrolling: touch; }
.carousel::-webkit-scrollbar { display: none; }
.carousel.dragging { cursor: grabbing; scroll-snap-type: none; }
.track-cards { display: flex; gap: 20px; padding: 6px var(--pad) 30px 0; width: max-content; }
.card { scroll-snap-align: start; width: clamp(240px, 30vw, 380px); text-decoration: none; color: inherit; opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.past.in .card { opacity: 1; transform: none; }
.card-img { aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--soft); box-shadow: 0 24px 50px -36px rgba(65,60,54,.55); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s cubic-bezier(.2,.8,.2,1), filter .5s; filter: saturate(.92); }
.card:hover .card-img img { transform: scale(1.07); filter: saturate(1.1); }
.card:hover { transform: translateY(-6px); }
.card-text { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.card-text .dot { color: var(--green); font-size: .95rem; }
.card-text b { font-size: 1.25rem; font-weight: 600; }
.behance { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) {
  .sec, .case-text > * { opacity: 1; transform: none; filter: none; transition: none; }
  .gallery img, .gallery .tile { clip-path: none; }
  .wave span, .dots i { animation: none; } .card { opacity: 1; transform: none; } }

.chips { list-style: none; padding: 0; margin: 18px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 999px; padding: 5px 14px; font-size: .95rem; }

/* interactive textures */
.play { cursor: crosshair; touch-action: pan-y; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* contact form */
.write { display: grid; justify-items: center; }
.form { width: min(560px, calc(100vw - 32px)); text-align: left; display: grid; gap: 12px; margin-top: 4px; background: color-mix(in srgb, var(--cream) 14%, transparent); border: 1px solid color-mix(in srgb, var(--cream) 40%, transparent); border-radius: 26px; padding: 22px; backdrop-filter: blur(6px); animation: unfold .6s cubic-bezier(.2,.8,.2,1); }
@keyframes unfold { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
.form label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; font-weight: 600; font-size: .95rem; }
.form label input, .form label textarea { flex-basis: 100%; }
button.cta { font: inherit; font-weight: 600; cursor: pointer; border: 0; }
.form small { font-weight: 400; opacity: .75; }
.form input, .form textarea { font: inherit; color: var(--ink); background: var(--cream); border: 0; border-radius: 14px; padding: 11px 14px; outline: 2px solid transparent; transition: outline-color .2s; }
.form input:focus, .form textarea:focus { outline-color: var(--lime); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.send { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cta.ghost { background: transparent; color: var(--cream); border: 1.5px solid var(--cream); }
.cta.ghost:hover { background: var(--cream); color: var(--ink); }
.form .err { color: var(--ink); background: var(--lime); border-radius: 10px; padding: 6px 10px; font-weight: 600; }
.write.open .open-form { animation: none; }
.form-wrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease, margin .5s ease; margin-top: 0; }
.form-wrap > .form { overflow: hidden; min-height: 0; animation: none; }
.write.open .form-wrap { grid-template-rows: 1fr; opacity: 1; margin-top: 18px; }
.write:not(.open) .form { padding-block: 0; border-width: 0; }
.open-form { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 34px; position: relative; animation: nudge 3.2s ease-in-out infinite; }
.open-form .b1 { font-size: 1.15rem; }
.open-form .b2 { font-size: .85rem; font-weight: 400; opacity: .7; }
.open-form::after { content: ""; position: absolute; inset: -2px; border-radius: 999px; border: 2px solid var(--lime); opacity: 0; animation: ring 3.2s ease-out infinite; pointer-events: none; }
.write.open .open-form::after { animation: none; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 76% { transform: translateY(-4px) rotate(-2deg); } 82% { transform: translateY(0) rotate(2deg); } 88% { transform: translateY(-2px) rotate(-1deg); } }
@keyframes ring { 0%, 60% { opacity: 0; transform: scale(1); } 70% { opacity: .9; } 100% { opacity: 0; transform: scale(1.35, 1.6); } }

/* neon: titles light up as people grow connections */
.play { --glow: 0; --neon: #F28BE8; }
/* letters stay black; only their outline lights up like neon */
.hero h1, .hero .dot { color: var(--ink);
  text-shadow: 0 0 calc(var(--glow) * 1px) #fff, 0 0 calc(var(--glow) * 3px) #fff, 0 0 calc(var(--glow) * 7px) #fff,
    0 0 calc(var(--glow) * 16px) rgba(255,255,255,.95), 0 0 calc(var(--glow) * 32px) rgba(255,255,255,.8); }
.hero h1, .hero .dot { pointer-events: auto; cursor: default; white-space: nowrap; }
.hero h1 .ch, .hero .dot .ch { display: inline-block; will-change: transform; }
.contact h2 { color: #fff; text-shadow: 0 0 calc(var(--glow) * 4px) #fff, 0 0 calc(var(--glow) * 14px) #fff, 0 0 calc(var(--glow) * 34px) rgba(255,255,255,.9), 0 0 calc(var(--glow) * 80px) rgba(255,255,255,.7); }

/* Suteki: videos first */
.case.reverse .videos { order: 2; }
@media (max-width: 860px) { .case.reverse .videos { order: 0; } }
.videos { display: grid; gap: 12px; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer; border-radius: 24px; overflow: hidden;
  background: #000 center / cover no-repeat; box-shadow: 0 30px 60px -40px rgba(65,60,54,.45); transition: transform .4s ease; }
.yt:hover { transform: translateY(-3px); }
.yt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); }
.yt .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: var(--cream); z-index: 1;
  box-shadow: 0 0 0 0 rgba(255,252,238,.6); animation: ring-yt 2.6s ease-out infinite; transition: transform .3s; }
.yt:hover .play { transform: scale(1.08); }
.yt .play::before { content: ""; position: absolute; left: 27px; top: 21px; border-left: 20px solid var(--ink); border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
@keyframes ring-yt { 0% { box-shadow: 0 0 0 0 rgba(255,252,238,.55); } 80%,100% { box-shadow: 0 0 0 22px rgba(255,252,238,0); } }
.yt .cap { position: absolute; left: 18px; bottom: 14px; z-index: 1; color: #fff; font-weight: 600; font-size: .95rem; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.more { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; align-items: start; }
.more .yt { border-radius: 18px; }
.more .yt .play { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.more .yt .play::before { left: 19px; top: 14px; border-left-width: 14px; border-top-width: 10px; border-bottom-width: 10px; }
.more .igv { aspect-ratio: 4 / 5; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(20,18,16,.78); backdrop-filter: blur(6px); padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(420px, 100%); height: min(760px, 86vh); background: #fff; border-radius: 18px; animation: unfold .4s ease; }
.modal-body { border-radius: 18px; overflow: hidden; }
.modal-body, .modal-body iframe { width: 100%; height: 100%; border: 0; }
.modal-x { position: absolute; top: -14px; right: -14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: var(--cream); font-size: 22px; cursor: pointer; }
@media (max-width: 560px) { .more { grid-template-columns: 1fr 1fr; } .more .yt:not(.igv) { grid-column: 1 / -1; } }

.gallery.g-mcs { grid-template-columns: 2fr 1fr 1fr; }

/* journal */
.journal { background: var(--ink); color: var(--cream); }
.journal .kicker { color: var(--lime); }
.timeline { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }
.timeline li { border-top: 2px solid var(--lime); padding-top: 20px; }
.timeline .when { color: var(--lime); font-size: 1.2rem; }
.timeline h3 { font-size: 1.4rem; margin: 10px 0; }
.timeline p { opacity: 0.8; }
.timeline .pending { border-top-style: dashed; opacity: 0.6; }

/* team */
.people { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 64px); margin-top: 56px; }
.person { text-align: center; }
.avatar { width: clamp(140px, 22vw, 200px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--soft); }
.avatar canvas { width: 100%; height: 100%; display: block; }
.person p { margin-top: 14px; font-weight: 600; font-size: 1.2rem; }

/* contact */
.contact { position: relative; overflow: hidden; background: var(--green); color: var(--cream); text-align: center; min-height: 70vh; display: grid; place-items: center; }
.contact-art { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 70vh; opacity: .45; }
.contact .fx { bottom: auto; height: 70vh; }
.contact-art.mirror { top: 70vh; transform: scaleY(-1); opacity: 0; transition: opacity 1s ease .2s; }
.contact:has(.write.open) .contact-art.mirror { opacity: .45; }
.contact-inner { position: relative; }
.contact h2 { font-size: clamp(3rem, 10vw, 8rem); max-width: none; }
.wave span { display: inline-block; animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.dots { display: flex; gap: 10px; justify-content: center; margin: 18px 0 30px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); animation: pulse 1.4s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%,100% { transform: scale(.6); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }

.foot { position: relative; overflow: hidden; padding: 64px var(--pad) 40px; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.foot-art { position: absolute; right: -40px; bottom: -40px; width: 320px; height: 320px; opacity: .5; pointer-events: none; }
.foot-grid { position: relative; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid > div { display: flex; flex-direction: column; gap: 8px; }
.foot-grid p.dot { color: var(--green); margin-bottom: 4px; }
.foot-grid a { text-decoration: none; opacity: .8; transition: opacity .2s, color .2s; }
.foot-grid a:hover { opacity: 1; color: var(--green); }
.foot-brand b { font-size: 1.4rem; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.hero .fx { z-index: 1; }

/* "Limpiar" button: slides in from the side when the drawing gets busy */
.clean { position: absolute; right: clamp(12px, 3vw, 28px); bottom: 28px; z-index: 5; display: flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink); background: var(--cream);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 10px 16px; cursor: pointer;
  opacity: 0; transform: translateX(40px); pointer-events: none; transition: opacity .4s ease, transform .5s cubic-bezier(.2,.8,.2,1), background .2s, color .2s; }
.clean.show { opacity: 1; transform: none; pointer-events: auto; }
.clean:hover { background: var(--ink); color: var(--cream); }
.clean:hover svg { animation: scrub .5s ease-in-out infinite; }
@keyframes scrub { 0%,100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(-3px) rotate(-12deg); } }
@media (max-width: 720px) { .clean span { display: none; } .clean { padding: 10px; } }

/* net */
.net-bar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 34px; }
.net-nav { display: flex; gap: 10px; }
.net-bar:has(+ .net-grid.all) .net-nav { visibility: hidden; }
.net-grid { display: grid; align-items: start; grid-auto-flow: column; grid-auto-columns: clamp(250px, 27vw, 330px); gap: 20px; margin: 22px calc(var(--pad) * -1) 0 0; padding: 6px var(--pad) 30px 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.net-grid::-webkit-scrollbar { display: none; }
.net-grid.dragging { cursor: grabbing; scroll-snap-type: none; }
.net-grid.dragging * { user-select: none; pointer-events: none; }
.net-grid.all { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); grid-auto-columns: auto; overflow: visible; margin-right: 0; padding-right: 0; cursor: auto; }
.np { scroll-snap-align: start; display: flex; flex-direction: column; background: var(--soft); border-radius: 26px; overflow: hidden; opacity: 0; transform: translateY(30px) scale(.97); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); box-shadow: 0 24px 50px -40px rgba(65,60,54,.55); }
.network.in .np { opacity: 1; transform: none; }
.network.in .np:hover { transform: translateY(-6px); transition-delay: 0s !important; }
.np-art { aspect-ratio: 4 / 3; overflow: hidden; }
.np-art canvas, .np-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.np-text { padding: 18px 20px 18px; text-align: left; flex: 1; display: flex; flex-direction: column; }
.np-text h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.15; }
.np-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.np-links a { color: var(--green); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--lime); }
.np .chips { margin: 12px 0 14px; }
.np .chips li { font-size: .88rem; padding: 4px 12px; }
/* Seis pieles, cada una con su fondo y su trama. */
.np-0 .np-art { background: var(--ink); }
.np-1 .np-art { background: var(--green); }
.np-2 .np-art { background: var(--lime); }
.np-3 .np-art { background: #2b2724; }
.np-4 .np-art { background: var(--pink); }
.np-5 .np-art { background: var(--cream); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
.np-1 { background: color-mix(in srgb, var(--green) 12%, var(--cream)); }
.np-2 { background: color-mix(in srgb, var(--lime) 16%, var(--cream)); }
.np-4 { background: color-mix(in srgb, var(--pink) 14%, var(--cream)); }
.np-3 { background: var(--ink); color: var(--cream); }
.np-3 .chips li { border-color: color-mix(in srgb, var(--cream) 30%, transparent); }
.np-3 .shared summary, .np-3 .shared a { color: var(--lime); }
/* proyectos en común */
.shared { margin-top: auto; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); padding-top: 10px; }
.shared summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--green); }
.shared summary::-webkit-details-marker { display: none; }
.shared summary span { font-family: var(--dotf); font-weight: 900; font-size: .8rem; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: color-mix(in srgb, var(--lime) 45%, transparent); color: var(--ink); }
.shared summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .3s; }
.shared[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.shared ul { list-style: none; padding: 10px 0 2px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; animation: shared-in .35s ease; }
.shared li { font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, currentColor 7%, transparent); }
.shared a { color: inherit; text-decoration: none; }
.shared a:hover { color: var(--green); }
@keyframes shared-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .np { opacity: 1; transform: none; } }

.quote { position: relative; max-width: 760px; margin: 22px 0 0; padding: 4px 0 4px clamp(18px, 3vw, 30px); border-left: 3px solid var(--lime); }
.quote p { max-width: 46ch; font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 400; line-height: 1.45; }
.quote em { font-style: normal; color: var(--green); }
.quote footer { margin-top: 14px; max-width: 56ch; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.5; opacity: .8; }

html { overflow-x: clip; }
section[id] { scroll-margin-top: 70px; }
.np-3 .shared summary span { background: var(--lime); }
.shared li.found { background: var(--ink); color: var(--cream); }
.np-3 .shared li.found { background: var(--lime); color: var(--ink); }
.net-more { display: flex; align-items: center; gap: 10px; margin: 8px auto 0; padding: 12px 26px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 600 1rem var(--sans); cursor: pointer; transition: background .25s, color .25s; }
.net-more:hover { background: var(--ink); color: var(--cream); }
.net-more .caret { width: 12px; height: 8px; }
.net-more[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* idioma y tema */
.prefs { display: flex; gap: 6px; margin-left: 10px; }
.pref { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font: 900 .8rem var(--dotf); letter-spacing: .04em; cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .25s, color .25s; }
.pref:hover { background: var(--ink); color: var(--cream); }
.pref svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pref .moon { fill: currentColor; stroke: none; }
.theme-btn .sun, [data-theme="dark"] .theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
@media (max-width: 720px) { .prefs { margin: 22px 0 0; } .pref { width: 48px; height: 48px; font-size: .95rem; } }

/* modo oscuro: se invierten crema y tinta; el resto de la paleta queda igual */
[data-theme="dark"] {
  --cream: #1A1815;
  --ink: #F1ECDC;
  --soft: #25221D;
  color-scheme: dark;
}
[data-theme="dark"] .contact { color: #FFFCEE; }
[data-theme="dark"] .contact .cta.light { background: #FFFCEE; color: #413C36; }
[data-theme="dark"] .cta.ghost { color: #FFFCEE; border-color: #FFFCEE; }
[data-theme="dark"] .cta.ghost:hover { background: #FFFCEE; color: #413C36; }
[data-theme="dark"] .form input, [data-theme="dark"] .form textarea { background: #FFFCEE; color: #413C36; }
[data-theme="dark"] .form .err { color: #413C36; }
[data-theme="dark"] .num { -webkit-text-stroke: 0.5px transparent; }
[data-theme="dark"] .hero h1, [data-theme="dark"] .hero .dot { text-shadow: none; }
[data-theme="dark"] .np-2 .np-art, [data-theme="dark"] .np-4 .np-art { filter: saturate(.9); }
[data-theme="dark"] .card-img, [data-theme="dark"] .np, [data-theme="dark"] .yt { box-shadow: 0 24px 50px -36px rgba(0,0,0,.8); }
html { transition: background-color .3s; }
[data-theme="dark"] .np-3 { background: #2E2A25; color: #F1ECDC; }
[data-theme="dark"] .np-3 .np-art { background: #12100E; }
[data-theme="dark"] .np-3 .chips li { border-color: rgba(241,236,220,.3); }
[data-theme="dark"] .np-3 .shared li.found { background: var(--lime); color: #413C36; }
