/* =========================================================
   ilo club — base: tokens, tipografía, utilidades, navbar
   ========================================================= */
:root {
  --red: #980e1b;
  --red-deep: #6d0912;
  --red-ink: #8c0d19;
  --cream: #fffaf4;
  --cream-2: #f6ede2;
  --mural: #7e1f2c;
  --members: #2b3f9e;
  --ink: #1c0909;
  --line: color-mix(in srgb, var(--red) 26%, transparent);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --script: 'Pinyon Script', cursive;
  --mono: 'DM Mono', ui-monospace, monospace;
  --wide: 'Archivo', system-ui, sans-serif;

  --gutter: clamp(16px, 4.5vw, 72px);
  --section: clamp(88px, 12vw, 180px);
  --nav-h: 66px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--red);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--red); color: var(--cream); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; background: var(--cream); transform: translateY(-160%); transition: transform .3s var(--ease); }
.skip:focus { transform: none; }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

/* ---------- tipografía ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 6.2vw, 6rem);
  line-height: .94;
  letter-spacing: -.012em;
  color: var(--red);
}
.display > span { display: block; }
.display em, .menu__title em { font-style: italic; }
.mono { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; letter-spacing: .005em; }
.mono em { font-family: var(--serif); font-size: 1.2em; }
.caps { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }
.script {
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  font-size: 1.6em;
  line-height: .5;
  letter-spacing: 0;
  display: inline-block;
  padding: .3em .18em .25em .05em;
  margin: -.3em 0 -.25em;
  vertical-align: -.08em;
}
[data-lines] > span { overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
[data-lines] > span > .ln { display: block; }

/* ---------- piezas comunes ---------- */
.frame { border: 1px solid var(--red); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--red); color: var(--cream);
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; text-decoration: none;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.pill:hover { background: var(--red-deep); transform: translateY(-2px); }
.pill:active { transform: translateY(0) scale(.98); }
.pill--light { background: var(--cream); color: var(--red); }
.pill--light:hover { background: var(--cream-2); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .7em;
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; text-decoration: none;
}
.link-arrow span { display: inline-block; transition: transform .45s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }

/* ---------- navbar fija (L'Essence) ---------- */
.navbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  background: var(--cream); /* sin backdrop-filter: difuminar lo que hay detrás cuesta mucho al hacer scroll */
  border-bottom: 1px solid var(--line);
  transform: translateY(-101%);
  transition: transform .7s var(--ease);
}
.navbar.is-visible, .navbar.is-open { transform: none; }
.navbar__burger {
  justify-self: start;
  width: 34px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; align-content: center; gap: 5px; color: var(--red);
}
.navbar__burger span { display: block; height: 1px; width: 22px; background: currentColor; transition: transform .45s var(--ease), opacity .3s; }
.navbar__burger span:nth-child(2) { width: 15px; }
.navbar.is-open .navbar__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navbar.is-open .navbar__burger span:nth-child(2) { opacity: 0; }
.navbar.is-open .navbar__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.navbar__logo { display: block; height: 44px; color: var(--red); }
.navbar__logo svg { height: 100%; width: auto; aspect-ratio: 719 / 704; fill: currentColor; }
.navbar__meta {
  justify-self: end;
  display: flex; flex-direction: column; align-items: flex-end;
  font-size: 10.5px; line-height: 1.55; text-transform: uppercase; letter-spacing: .07em;
}
.navbar__meta a { text-decoration: none; }
.navbar__meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.navbar__meta .arrow { display: inline-block; transition: transform .4s var(--ease); }
.navbar__meta a:hover .arrow { transform: translateX(4px); }

.drawer {
  position: fixed; inset: 0; z-index: 40;
  background: var(--red); color: var(--cream);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .8s var(--ease-io), visibility 0s .8s;
}
.drawer.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease-io); }
.drawer nav { display: grid; gap: .1em; }
.drawer nav a {
  font-family: var(--serif); font-size: clamp(3rem, 9vw, 6.5rem); line-height: 1; text-decoration: none;
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.drawer.is-open nav a { opacity: 1; transform: none; }
.drawer.is-open nav a:nth-child(2) { transition-delay: .06s; }
.drawer.is-open nav a:nth-child(3) { transition-delay: .12s; }
.drawer.is-open nav a:nth-child(4) { transition-delay: .18s; }
.drawer.is-open nav a:nth-child(5) { transition-delay: .24s; }
.drawer nav a:hover em { font-family: var(--script); font-style: normal; }
.drawer__foot { margin-top: auto; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.navbar.is-open { background: var(--cream); }

@media (max-width: 640px) {
  :root { --nav-h: 58px; }
  .navbar__logo { height: 38px; }
  .navbar__meta span { display: none; }
}


/* paso suave entre portada, carta y bodega (navegadores con View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .45s var(--ease-io) both page-out; }
::view-transition-new(root) { animation: .7s var(--ease) both page-in; }
@keyframes page-out { to { opacity: 0; transform: translateY(-24px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(32px); } }

html.menu-open { overflow: hidden; }

/* Sello de autoría, abajo a la derecha */
.made-by {
  position: fixed; z-index: 60; right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px));
  margin: 0; padding: 7px 13px; max-width: calc(100vw - 24px);
  background: var(--red); color: var(--cream); border: 1px solid rgb(255 250 244 / .28); border-radius: 40px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  pointer-events: none; opacity: .95; box-shadow: 0 6px 18px rgb(20 4 3 / .28);
}
.made-by b { font-weight: 500; color: #fff; }
@media (max-width: 560px) { .made-by { font-size: 9px; padding: 6px 11px; } }
.footer { padding-bottom: 56px; }

/* Los contadores cambian de número en cada fotograma: se aíslan para que no recalculen el diseño de toda la página */
[data-count] { display: inline-block; contain: layout style; font-variant-numeric: tabular-nums; }
