/* ==========================================================================
   Alcachofa — 2026
   Paleta tomada de la planta: hojas, brácteas moradas, corazón crema,
   y el dorado del aceite para cuando la freímos.
   ========================================================================== */

:root {
  --ink: #0f1a14;
  --ink-2: #16261d;
  --paper: #f2ede1;
  --paper-2: #e8e1d0;
  --leaf: #157e3a;          /* verde del logo */
  --leaf-deep: #0d4a25;
  --sage: #9db58a;
  --bract: #7a3b6e;         /* puntas moradas de la alcachofa */
  --bract-soft: #c58fb5;
  --oil: #e9a83a;           /* frita */
  --oil-deep: #b9661b;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--oil); color: var(--ink); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--oil); color: var(--ink); padding: 10px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--oil); outline-offset: 4px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Grain — una textura de papel muy sutil sobre todo */
.grain {
  pointer-events: none;
  position: fixed; inset: 0;
  z-index: 90;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav__logo { width: 132px; }
.nav__logo svg { width: 100%; height: auto; }
.nav__links { display: flex; gap: 34px; }
.nav__links a {
  position: relative;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__burger { display: none; width: 40px; height: 40px; position: relative; }
.nav__burger span {
  position: absolute; left: 8px; right: 8px; height: 1.5px; background: currentColor;
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 24px; }
.menu-open .nav__burger span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.menu-open .nav__burger span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 40;
  background: var(--leaf-deep);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter);
  clip-path: circle(0 at calc(100% - 36px) 38px);
  transition: clip-path .8s var(--ease-in-out);
  visibility: hidden;
}
.menu-open .drawer { clip-path: circle(150% at calc(100% - 36px) 38px); visibility: visible; }
.drawer a {
  font-family: var(--serif); font-size: clamp(44px, 12vw, 80px); line-height: 1.05;
  font-variation-settings: "SOFT" 100, "WONK" 1; font-style: italic;
}
.drawer .label { margin-top: 40px; color: var(--sage); }

@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__logo { width: 112px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 80% at 75% 45%, #18301f 0%, var(--ink) 60%);
  transition: background 1.2s var(--ease);
}
.is-fried .hero {
  background: radial-gradient(120% 80% at 75% 45%, #3a210c 0%, #140b05 62%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(15,26,20,.85) 0%, rgba(15,26,20,.35) 34%, rgba(15,26,20,0) 52%);
  transition: opacity 1s;
}
.is-fried .hero::before { background: linear-gradient(90deg, rgba(20,11,5,.85) 0%, rgba(20,11,5,.35) 34%, rgba(20,11,5,0) 52%); }
@media (max-width: 820px) {
  .hero::before, .is-fried .hero::before {
    background: linear-gradient(180deg, rgba(15,26,20,.7) 0%, rgba(15,26,20,0) 38%, rgba(15,26,20,0) 55%, rgba(15,26,20,.94) 82%);
  }
}
.hero__canvas {
  position: absolute; left: 0; top: 0; z-index: -2;
  max-width: none;
  touch-action: pan-y;
  will-change: transform;
}
.hero__inner {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 110px; padding-bottom: 40px;
  pointer-events: none;
}
.hero__kicker { color: var(--sage); margin-bottom: 28px; display: flex; gap: 14px; align-items: center; }
.hero__kicker::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.is-fried .hero__kicker { color: var(--oil); }

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 11.2vw, 196px);
  line-height: .86;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  max-width: 11ch;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.3s var(--ease); }
.is-ready .hero__title .line > span { transform: none; }
.is-ready .hero__title .line:nth-child(2) > span { transition-delay: .09s; }
.is-ready .hero__title .line:nth-child(3) > span { transition-delay: .18s; }
.hero__title em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--sage);
  transition: color 1s var(--ease);
}
.is-fried .hero__title em { color: var(--oil); }

.hero__foot {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end;
  padding-bottom: 34px;
}
.hero__lede {
  max-width: 440px; margin: 0;
  color: rgba(242, 237, 225, .74);
  font-size: 16px;
}
.hero__lede strong { color: var(--paper); font-weight: 500; }

.fry {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px 14px 16px;
  border: 1px solid rgba(242, 237, 225, .25);
  border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  transition: border-color .4s, background .4s, color .4s;
  background: rgba(15, 26, 20, .55);
}
.fry:hover { border-color: var(--oil); color: var(--oil); }
.fry__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(157, 181, 138, .18);
  transition: background .4s, box-shadow .4s;
}
.is-fried .fry__dot { background: var(--oil); box-shadow: 0 0 0 4px rgba(233, 168, 58, .25), 0 0 18px var(--oil); }
.is-fried .fry { border-color: var(--oil); color: var(--oil); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  width: 1px; height: 54px; background: rgba(242, 237, 225, .2); overflow: hidden;
}
.hero__scroll::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: var(--paper);
  animation: drip 2.2s var(--ease-in-out) infinite;
}
@keyframes drip { to { top: 100%; } }


@media (max-width: 820px) {
  .hero__inner { justify-content: flex-start; padding-top: 120px; }
  .hero__title { font-size: clamp(58px, 17vw, 120px); }
  .hero__foot { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
}

/* ==========================================================================
   Manifiesto — palabras que se encienden al hacer scroll
   ========================================================================== */
.manifesto {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(110px, 16vw, 220px) 0 clamp(90px, 12vw, 170px);
  position: relative;
}
.manifesto .label { color: var(--leaf); margin-bottom: 40px; display: block; }
.manifesto__text {
  margin: 0;
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(30px, 4.6vw, 70px);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 20ch;
  font-variation-settings: "opsz" 120;
}
.manifesto__text .w { color: rgba(15, 26, 20, .14); transition: color .5s var(--ease); }
.manifesto__text .w.on { color: var(--ink); }
.manifesto__text em { font-style: italic; font-variation-settings: "opsz" 120, "SOFT" 100, "WONK" 1; }
.manifesto__text em .w.on { color: var(--leaf); }

.manifesto__cols {
  margin-top: clamp(70px, 9vw, 130px);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
}
.manifesto__cols p { margin: 0; font-size: 17px; color: rgba(15, 26, 20, .78); }
.manifesto__cols p:nth-child(1) { grid-column: 5 / span 4; }
.manifesto__cols p:nth-child(2) { grid-column: 9 / span 4; }
@media (max-width: 900px) {
  .manifesto__cols { grid-template-columns: 1fr; }
  .manifesto__cols p:nth-child(n) { grid-column: auto; }
}

/* ==========================================================================
   Capas (servicios)
   ========================================================================== */
.layers {
  background: var(--paper);
  color: var(--ink);
  padding-bottom: clamp(100px, 12vw, 180px);
}
.section-head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
  align-items: end;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(15, 26, 20, .9);
}
.section-head h2 {
  grid-column: 1 / span 7;
  margin: 0;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(46px, 7.4vw, 124px);
  line-height: .9; letter-spacing: -.035em;
  font-variation-settings: "opsz" 144;
}
.section-head h2 em { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.section-head p { grid-column: 9 / span 4; margin: 0; font-size: 16px; opacity: .72; }
.section-head .label { grid-column: 1 / -1; opacity: .6; margin-bottom: 8px; }
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head h2, .section-head p { grid-column: auto; }
}

.layer {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 5fr) minmax(0, 6fr);
  gap: 16px 32px;
  padding: 40px 0;
  border-bottom: 1px solid rgba(15, 26, 20, .18);
}
.layer > :not(.layer__fill) { position: relative; z-index: 1; }
.layer__n { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; opacity: .5; padding-top: .9em; }
.layer__name {
  margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 3.6vw, 54px); line-height: 1;
  letter-spacing: -.025em;
  transition: transform .7s var(--ease), font-variation-settings .7s var(--ease);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
}
.layer:hover .layer__name {
  transform: translateX(14px);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.layer__swatch {
  display: inline-block; vertical-align: middle;
  width: 10px; height: 10px; border-radius: 50%;
  margin: 0 14px 0 -24px;
  transform: scale(0);
  transition: transform .5s var(--ease);
}
.layer:hover .layer__swatch { transform: scale(1); }
.layer__body p {
  margin: 0;
  max-width: 560px;
  font-size: 18px; line-height: 1.55; color: rgba(15, 26, 20, .8);
}
.layer__do {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.layer__do li {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 12px; border: 1px solid rgba(15, 26, 20, .2); border-radius: 999px;
  transition: border-color .4s, background .4s;
}
.layer:hover .layer__do li { border-color: rgba(15, 26, 20, .45); }
.layer__fill {
  position: absolute; inset: 0; z-index: 0;
  background: var(--paper-2);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .6s var(--ease);
}
.layer:hover .layer__fill { transform: scaleY(1); }

@media (max-width: 900px) {
  .layer { grid-template-columns: 40px minmax(0, 1fr); padding: 30px 0; }
  .layer__body { grid-column: 2; }
  .layer__body p { font-size: 16px; }
  .layer__swatch { display: none; }
  .layer:hover .layer__name { transform: none; }
}

/* ==========================================================================
   Go
   ========================================================================== */
.go {
  background: var(--ink);
  padding: clamp(110px, 14vw, 200px) 0;
  position: relative;
  overflow: hidden;
}
.go__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: center; }
.go__copy { grid-column: 1 / span 5; }
.go__copy .label { color: var(--sage); display: block; margin-bottom: 30px; }
.go__copy h2 {
  margin: 0 0 30px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(42px, 5.6vw, 92px); line-height: .94; letter-spacing: -.03em;
  font-variation-settings: "opsz" 144;
}
.go__copy h2 em { font-style: italic; color: var(--sage); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.go__copy p { color: rgba(242, 237, 225, .72); max-width: 440px; margin: 0 0 18px; }

.term {
  grid-column: 7 / span 6;
  border-radius: 14px;
  background: #0a120d;
  border: 1px solid rgba(157, 181, 138, .18);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
}
.term__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(157, 181, 138, .12);
  color: rgba(242, 237, 225, .45);
}
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(242, 237, 225, .14); }
.term__bar .label { margin-left: auto; font-size: 10.5px; }
.term pre {
  margin: 0; padding: 26px 22px 10px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
  color: #cfd8c6;
  overflow-x: auto;
  white-space: pre;
}
.term .k { color: var(--bract-soft); }
.term .s { color: var(--oil); }
.term .c { color: rgba(207, 216, 198, .38); font-style: italic; }
.term .f { color: #9fd3b0; }
.term__lanes {
  position: relative;
  height: 128px;
  margin: 4px 22px 22px;
  border-top: 1px dashed rgba(157, 181, 138, .16);
}
.term__lanes canvas { width: 100%; height: 100%; }
.term__stat {
  display: flex; justify-content: space-between;
  padding: 0 22px 18px;
  color: rgba(242, 237, 225, .45);
}
.term__stat b { color: var(--sage); font-weight: 400; }

@media (max-width: 960px) {
  .go__copy, .term { grid-column: 1 / -1; }
  .term { margin-top: 40px; }
}

/* ==========================================================================
   Proyectos
   ========================================================================== */
.work {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(110px, 14vw, 200px) 0 clamp(80px, 10vw, 140px);
  position: relative;
}
.work__list { list-style: none; margin: 0; padding: 0; }
.proj { border-bottom: 1px solid rgba(15, 26, 20, .18); }
.proj a {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 34px 0;
  position: relative;
}
.proj__n { font-family: var(--mono); font-size: 12px; opacity: .5; }
.proj__name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1; letter-spacing: -.03em;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  transition: font-variation-settings .6s var(--ease), color .4s;
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.proj a:hover .proj__name { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.proj__desc { font-size: 15.5px; color: rgba(15, 26, 20, .68); margin: 0; }
.proj__go {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
}
.proj__go svg { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.proj a:hover .proj__go svg { transform: rotate(-45deg); }
.tag {
  font-family: var(--mono); font-style: normal; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px 5px; border-radius: 999px;
  background: var(--oil); color: var(--ink);
  transform: translateY(-.6em);
  font-variation-settings: normal;
}

.proj__logo {
  width: 88px; height: 88px; border-radius: 18px; overflow: hidden; display: block;
  box-shadow: 0 1px 0 rgba(15, 26, 20, .08), 0 12px 30px -18px rgba(15, 26, 20, .5);
  transition: transform .7s var(--ease), border-radius .7s var(--ease), box-shadow .7s var(--ease);
}
.proj__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj a:hover .proj__logo { transform: rotate(-8deg) scale(1.08); border-radius: 50%; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--accent), 0 20px 40px -18px var(--accent); }
.proj__domain { opacity: .55; text-transform: none; letter-spacing: .02em; transition: opacity .4s; }
.proj a:hover .proj__domain { opacity: 1; }

@media (max-width: 900px) {
  .proj a { grid-template-columns: 56px 1fr; gap: 6px 18px; padding: 24px 0; }
  .proj__logo { width: 56px; height: 56px; border-radius: 13px; grid-row: span 3; align-self: start; }
  .proj__desc { grid-column: 2; }
  .proj__go { grid-column: 2; justify-self: start; margin-top: 6px; }
}

/* ==========================================================================
   Las Canteras
   ========================================================================== */
.place {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}
.place__media {
  position: relative;
  height: clamp(520px, 92vh, 900px);
  overflow: hidden;
}
.place__media img {
  position: absolute; inset: -10% 0;
  width: 100%; height: 120%;
  object-fit: cover;
  filter: saturate(.75) contrast(1.05);
  will-change: transform;
}
.place__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 26, 20, .55) 0%, rgba(15, 26, 20, 0) 30%, rgba(15, 26, 20, 0) 55%, rgba(15, 26, 20, .92) 100%),
    linear-gradient(90deg, rgba(13, 74, 37, .35), rgba(122, 59, 110, .18));
  mix-blend-mode: normal;
}
.place__overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: 110px; padding-bottom: 50px;
}
.place__top { display: flex; justify-content: space-between; gap: 20px; color: rgba(242, 237, 225, .85); }
.place__clock { text-align: right; }
.place__clock b {
  display: block;
  font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 144;
  margin-top: 8px;
}
.place h2 {
  margin: 0;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(48px, 9vw, 160px); line-height: .88; letter-spacing: -.04em;
  font-variation-settings: "opsz" 144;
  max-width: 12ch;
}
.place h2 em { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; color: var(--oil); }
.place__bottom { display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 30px; align-items: end; }
.place__bottom p { margin: 0; color: rgba(242, 237, 225, .8); }
@media (max-width: 820px) {
  .place__bottom { grid-template-columns: 1fr; }
  .place__top { flex-direction: column; }
  .place__clock { text-align: left; }
}

/* ==========================================================================
   Carrera
   ========================================================================== */
.join {
  background: var(--leaf-deep);
  padding: clamp(110px, 14vw, 200px) 0;
  position: relative;
  overflow: hidden;
}
.join__marquee {
  display: flex;
  white-space: nowrap;
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(80px, 15vw, 260px); line-height: 1;
  letter-spacing: -.04em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 237, 225, .35);
  user-select: none;
}
.join__marquee span { padding-right: .3em; animation: marquee 38s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .join__marquee span { animation: none; } }

.join__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: clamp(50px, 6vw, 90px); align-items: end; }
.join__grid p { grid-column: 1 / span 6; margin: 0; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: rgba(242, 237, 225, .86); }
.join__cta { grid-column: 9 / span 4; justify-self: end; }
@media (max-width: 900px) {
  .join__grid { grid-template-columns: 1fr; }
  .join__grid p, .join__cta { grid-column: auto; justify-self: start; }
}

.btn {
  --size: 176px;
  position: relative;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--oil); color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  text-align: center; line-height: 1.5;
  transition: transform .6s var(--ease), background .4s;
  will-change: transform;
}
.btn:hover { background: var(--paper); }
.btn svg { width: 22px; height: 22px; margin: 6px auto 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot {
  background: var(--ink);
  padding: 90px 0 30px;
  overflow: hidden;
}
.foot__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.foot__col { grid-column: span 3; }
.foot__col .label { display: block; color: var(--sage); margin-bottom: 18px; }
.foot__col a, .foot__col span { display: block; font-size: 16px; line-height: 2; color: rgba(242, 237, 225, .82); }
.foot__col a:hover { color: var(--oil); }
.foot__big {
  margin-top: 90px;
  color: var(--paper);
}
.foot__big svg { width: 100%; height: auto; }
.foot__base {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 26px;
  color: rgba(242, 237, 225, .45);
}
@media (max-width: 820px) {
  .foot__col { grid-column: span 6; }
}
@media (max-width: 480px) {
  .foot__col { grid-column: 1 / -1; }
}

/* ==========================================================================
   Reveal util
   ========================================================================== */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero__title .line > span { transform: none; transition: none; }
}

/* ==========================================================================
   Idioma, legal, borradores
   ========================================================================== */
.lang { display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; }
.lang i { font-style: normal; opacity: .4; }
.lang a { opacity: .5; transition: opacity .3s; }
.lang a:hover { opacity: 1; }
.nav__links .lang { margin-left: 8px; padding-left: 26px; border-left: 1px solid currentColor; }
.nav__links .lang a::after { display: none; }
.drawer .lang { font-size: 14px; gap: 12px; }
.drawer .lang a { font-family: var(--mono); font-style: normal; font-size: 14px; }

.foot__legal { display: inline-flex; gap: 22px; flex-wrap: wrap; }
.foot__legal a:hover { color: var(--oil); }

mark.todo {
  background: #ffe066; color: #3a2a00;
  font-family: var(--mono); font-size: .78em; font-style: normal; letter-spacing: 0;
  padding: .1em .4em; border-radius: 4px;
  font-variation-settings: normal;
}
mark.todo::before { content: "TODO · "; opacity: .6; }
.draft-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 95;
  width: min(92vw, 720px);
  background: #ffe066; color: #3a2a00;
  padding: 12px 16px; border-radius: 10px; text-align: center;
  font-size: 10.5px; line-height: 1.6;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5);
}

/* ==========================================================================
   Documentos (legal)
   ========================================================================== */
.page-doc { background: var(--paper); color: var(--ink); }
.page-doc .foot { color: var(--paper); }
.doc { padding: 150px 0 120px; }
.doc__wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.doc__head { grid-column: 1 / span 4; align-self: start; position: sticky; top: 120px; }
.doc__head .label { color: var(--leaf); }
.doc__head h1 {
  margin: 18px 0 18px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(42px, 5vw, 76px); line-height: .95; letter-spacing: -.03em;
  font-variation-settings: "opsz" 144;
}
.doc__updated { color: rgba(15, 26, 20, .5) !important; }
.doc__body { grid-column: 6 / span 7; max-width: 680px; font-size: 17px; }
.doc__body h2 {
  font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -.01em;
  margin: 56px 0 14px; font-variation-settings: "opsz" 72;
}
.doc__body h2:first-child, .doc__note + h2 { margin-top: 0; }
.doc__body h3 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); margin: 30px 0 8px; }
.doc__body p, .doc__body li { color: rgba(15, 26, 20, .82); }
.doc__body ul { padding-left: 20px; }
.doc__body li { margin: 6px 0; }
.doc__body a { color: var(--leaf); text-decoration: underline; text-underline-offset: 3px; }
.doc__note { font-size: 14px; padding: 12px 16px; border-left: 2px solid var(--bract); background: var(--paper-2); margin: 0 0 40px; }
@media (max-width: 900px) {
  .doc { padding-top: 120px; }
  .doc__head, .doc__body { grid-column: 1 / -1; position: static; }
}

/* 404 */
.nf { min-height: 100svh; display: grid; align-items: center; padding: 140px 0 80px; }
.nf h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(54px, 9vw, 150px); line-height: .9; letter-spacing: -.04em; margin: 20px 0; font-variation-settings: "opsz" 144; }
.nf h1 em { font-style: italic; color: var(--oil); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.nf p { color: rgba(242, 237, 225, .7); max-width: 420px; margin: 0 0 40px; }
.nf .label { color: var(--sage); }

/* ==========================================================================
   Navegación — lee el fondo (ver site.js). Sin mix-blend: el logo
   mantiene siempre su alcachofa verde.
   ========================================================================== */
.nav { color: var(--paper); }
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--ink);
  border-bottom: 1px solid rgba(242, 237, 225, .08);
  transform: translateY(-100%);
  transition: transform .45s var(--ease);
}
.nav.is-scrolled::before { transform: none; }
.nav__logo { color: inherit; transition: transform .6s var(--ease); }
.nav__logo:hover { transform: rotate(-3deg) scale(1.03); }
.menu-open .nav::before { transform: translateY(-100%); }

/* ==========================================================================
   Titulares línea a línea
   ========================================================================== */
.split .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.split .line > span { display: inline-block; transform: translateY(108%) rotate(2deg); transform-origin: left bottom; transition: transform 1.25s var(--ease); }
.split.in .line > span { transform: none; }
.split.in .line:nth-child(2) > span { transition-delay: .1s; }
.split.in .line:nth-child(3) > span { transition-delay: .2s; }

/* ==========================================================================
   Cascadas: capas y proyectos entran uno tras otro
   ========================================================================== */
[data-reveal] { transition-delay: calc(var(--i, 0) * 70ms); }
.layer[data-reveal] { transform: translateY(24px); border-bottom-color: transparent; }
.layer::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; z-index: 2;
  background: rgba(15, 26, 20, .18); transform: scaleX(0); transform-origin: left;
  transition: transform 1.3s var(--ease), background .4s; transition-delay: calc(var(--i, 0) * 70ms + .2s);
}
.layer.in::after { transform: scaleX(1); }
.layer:hover::after { background: var(--ink); }

/* proyectos: el color de cada marca al pasar */
.proj a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent, var(--ink));
  transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease);
}
.proj a:hover::after { transform: scaleX(1); transform-origin: left; }
.proj__name { transition: color .4s var(--ease), font-variation-settings .6s var(--ease); }
.proj a:hover .proj__name { color: var(--accent, var(--ink)); }
.proj__name { transform: translateX(0); transition: color .4s var(--ease), transform .7s var(--ease), font-variation-settings .6s var(--ease); }
.proj a:hover .proj__name { transform: translateX(14px); }
@media (max-width: 900px) { .proj a:hover .proj__name { transform: none; } }

/* ==========================================================================
   El código se escribe solo
   ========================================================================== */
.term pre .ln { display: inline-block; min-width: 1px; opacity: 0; transform: translateX(-8px); clip-path: inset(0 100% 0 0); }
.term pre.in .ln {
  opacity: 1; transform: none; clip-path: inset(0 0 0 0);
  transition: opacity .2s, transform .5s var(--ease), clip-path .55s steps(18, end);
  transition-delay: calc(var(--i) * 95ms);
}
.term pre.in::after {
  content: ""; display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -2px;
  background: var(--sage); animation: blink 1s steps(1) infinite; animation-delay: 1.6s; opacity: 0;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ==========================================================================
   Pie: el logotipo sube desde el horizonte
   ========================================================================== */
.foot__big { overflow: hidden; }
.foot__big svg { transform: translateY(102%); transition: transform 1.6s var(--ease); }
.foot__big.in svg { transform: none; }

/* botón: halo que respira */
.btn::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid var(--oil); opacity: .5;
  animation: halo 2.8s var(--ease-in-out) infinite;
}
@keyframes halo { 0% { transform: scale(.92); opacity: .6; } 100% { transform: scale(1.25); opacity: 0; } }

/* ==========================================================================
   Transiciones entre páginas (Chrome, Edge, Safari 18+)
   ========================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .45s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.98); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: reduce) {
  .split .line > span, .term pre .ln, .foot__big svg { transform: none !important; opacity: 1 !important; clip-path: none !important; transition: none !important; }
  .btn::after { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ==========================================================================
   Aviso de cookies
   ========================================================================== */
.consent {
  position: fixed; z-index: 80; left: 16px; bottom: 16px;
  width: min(440px, calc(100% - 32px));
  padding: 20px 22px;
  background: var(--ink); color: var(--paper);
  border: 1px solid rgba(242, 237, 225, .14); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  font-size: 15px; line-height: 1.5;
  opacity: 0; transform: translateY(16px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.consent.is-in { opacity: 1; transform: none; }
.consent p { margin: 0; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.consent a:hover { color: var(--oil); }
.consent__actions { display: flex; gap: 10px; margin-top: 16px; }
.consent__btn {
  flex: 1; padding: 11px 14px; border-radius: 999px;
  border: 1px solid rgba(242, 237, 225, .35);
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.consent__btn:hover { border-color: var(--paper); }
.consent__btn--yes { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.consent__btn--yes:hover { background: var(--oil); border-color: var(--oil); }
.consent__btn:focus-visible { outline: 2px solid var(--oil); outline-offset: 2px; }
.foot__legal button { font: inherit; color: inherit; opacity: inherit; letter-spacing: inherit; text-transform: inherit; line-height: inherit; }
.foot__legal button:hover { color: var(--oil); }
.consent-reopen {
  font: inherit; text-decoration: underline; text-underline-offset: 3px; color: inherit;
}
.consent-reopen:hover { color: var(--leaf); }
@media (prefers-reduced-motion: reduce) { .consent { transition: none; } }
