/* Lenù: one-page site.
   Layout: magazine spreads on a phone. Each section is an "article": a huge headline,
   a big typewriter standfirst and a small credit line, with art that breaks the grid.
   No rules, no numbers: white space and alternating placement separate the sections.
   Mobile-first; larger screens become two-page spreads at 900px. */

:root {
  /* Palette: pink paper, black ink, red and yellow accents.
     Yellow never carries text (1.1:1 on pink); it is a fill with black on top (13:1).
     Red is for big headlines, the logo and the menu (3.5:1 on pink), not small text. */
  --paper: #F1D1CB;     /* pink background */
  --ink: #000000;       /* text and drawings */
  --mid: #7d5a54;       /* placeholder copy */
  --accent: #C94037;    /* red: logo, menu, some headlines */
  --accent-2: #F5C723;  /* yellow: sticker, drawing spots */
  --art: var(--accent-2);
  --art-2: var(--accent);

  --head: "Poppins", "Arial Black", system-ui, sans-serif;
  --mono: "Courier New", Courier, monospace;
  --gut: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: clip;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- Type roles ---------- */
.hl {
  font-family: var(--head);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.deck { font-size: 17px; line-height: 1.5; letter-spacing: .05em; max-width: 34ch; }
.deck.ph { color: var(--mid); } /* placeholder copy, to be replaced */
.credit { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.credit b { font-weight: 700; }
.nobreak { white-space: nowrap; }

/* ---------- Logo (inline SVG, follows the ink colour) ---------- */
.logo { display: block; width: 100%; height: auto; aspect-ratio: 5816 / 2713; overflow: visible; fill: currentColor; }
/* Die-cut outline: a thick paper-coloured stroke drawn behind the letters.
   The stroke width is in the logo's own units (about 7px at the header size). */
.logo .halo { fill: var(--paper); stroke: var(--paper); stroke-width: 9700; stroke-linejoin: round; }

/* ---------- Top bar: die-cut logo + MENÚ pill, both fixed, no bar behind ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(var(--gut) + env(safe-area-inset-right, 0px)) 14px calc(var(--gut) + env(safe-area-inset-left, 0px));
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar .home { display: block; width: 84px; }
.home { color: var(--accent); } /* red logo everywhere it links home */

.pill {
  font: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink); background: var(--paper);
  border: 1.5px solid currentColor; border-radius: 99px;
  padding: 0 18px; min-height: 44px; cursor: pointer;
  display: inline-flex; align-items: center; text-decoration: none;
}

/* ---------- Desktop pill nav (hidden on phones) ---------- */
.pillnav { display: none; }

/* ---------- Full-screen menu ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: var(--paper);
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(var(--gut) + env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) calc(var(--gut) + env(safe-area-inset-left, 0px));
  transform: translateY(-100%); visibility: hidden;
  transition: transform .45s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .45s;
}
.overlay.open { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.7, 0, .2, 1); }
.overlay .top { display: flex; justify-content: space-between; align-items: center; }
.overlay .home { display: block; width: 84px; }
.overlay nav { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 4px; }
#openMenu, #closeMenu { color: var(--accent); }
.overlay nav a {
  color: var(--accent);
  font-family: var(--head); font-weight: 900; text-transform: uppercase; text-decoration: none;
  font-size: clamp(48px, 15vw, 150px); line-height: 1; letter-spacing: -.015em; text-align: right;
}
.overlay .foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.overlay .foot span { white-space: nowrap; } /* each half stays whole; they stack on narrow phones */

/* ---------- Floating blob sticker ---------- */
.blob {
  position: fixed; z-index: 40;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 96px; height: 96px;
  display: grid; place-items: center; text-align: center; text-decoration: none;
  background: var(--accent-2); color: var(--ink);
  border-radius: 52% 48% 45% 55% / 55% 45% 55% 45%;
  font-size: 11px; line-height: 1.3; text-transform: uppercase; letter-spacing: .08em;
  transform: rotate(-6deg);
}

/* ---------- Art placeholders (organic spots where the drawings will go) ---------- */
.art {
  position: relative; display: grid; place-items: center;
  background: var(--art); color: var(--mid); max-width: 100%;
  border-radius: 58% 42% 55% 45% / 46% 58% 42% 54%;
}
.art.b { border-radius: 40% 60% 38% 62% / 60% 40% 60% 40%; background: var(--art-2); }
.art span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; text-align: center; padding: 0 12px; }
/* Drawings sit on their spot and spill a little past it, like a collage */
.art svg { position: absolute; left: -7%; top: -7%; width: 114%; height: 114%; overflow: visible; color: var(--ink); }
.art svg path { vector-effect: non-scaling-stroke; stroke-width: 2.2px; }
/* Parallax layers: page colour < drawings (move slower, set by the script) < text */
.article > *:not(.art), .contacto, footer { position: relative; z-index: 1; }
.article > .art { z-index: 0; }
.art.parallax { will-change: transform; }

/* ---------- Hero: art on top, headline at the foot ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
  padding: 84px var(--gut) 56px;
  position: relative; overflow-x: clip;
}
.hero .art { position: absolute; top: 70px; right: -18%; width: 105%; aspect-ratio: 1.15; z-index: 0; }
.hero > *:not(.art) { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(46px, 14vw, 168px); }

/* ---------- Articles ---------- */
main { display: grid; gap: 120px; padding-top: 72px; }
.article { padding: 0 var(--gut); display: grid; gap: 16px; position: relative; overflow-x: clip; }
.article h2 { font-size: clamp(46px, 14vw, 150px); }
.vino h2, .donde h2, .contacto a.hl { color: var(--accent); } /* red and black headlines alternate */

.vino .art { width: 78%; aspect-ratio: 1; justify-self: end; margin-right: -12%; margin-top: 8px; }
.cocina .art { width: 112%; aspect-ratio: 1.6; margin-left: -6%; margin-bottom: 4px; }
/* Vino ends with a drawing and Platitos starts with one: pull them together so the two
   drawings read as one collage instead of leaving a double gap. */
.cocina { margin-top: -70px; }
.donde h2 { font-size: clamp(42px, 12.5vw, 140px); }
.donde address { font-style: normal; }
.donde .art { position: absolute; width: 150px; aspect-ratio: .8; right: -22px; bottom: -70px; z-index: -1; }
.donde .pill { justify-self: start; margin-top: 6px; }

.contacto { padding: 0 var(--gut); text-align: center; }
.contacto a { display: block; text-decoration: none; font-size: clamp(40px, 13.5vw, 72px); margin-top: 6px; overflow-wrap: anywhere; }

/* ---------- Footer: a small folio line, kept clear of the blob sticker ---------- */
footer { margin-top: 120px; padding: 0 var(--gut) calc(130px + env(safe-area-inset-bottom, 0px)); }
footer .folio { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- Larger screens: two-page spreads ---------- */
@media (min-width: 900px) {
  :root { --gut: 48px; }
  /* The phone header and full-screen menu give way to one fixed pill */
  .bar, .overlay { display: none; }
  .pillnav {
    position: fixed; z-index: 50; left: 50%; top: calc(24px + env(safe-area-inset-top, 0px)); transform: translateX(-50%);
    display: flex; align-items: center; gap: 4px;
    padding: 9px 14px 9px 28px;
    background: var(--paper); color: var(--accent);
    border: 1.5px solid var(--accent); border-radius: 99px;
  }
  /* The accent takes the top 27.6% of the logo, so the letters sit low in their box.
     Lift the logo by half that (13.8% of its height) to centre the letters on the links. */
  .pillnav .home { width: 88px; margin-right: 14px; position: relative; top: calc(88px * 2713 / 5816 * -.138); }
  .pillnav a:not(.home) {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    font-size: 13px; text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
  }
  .pillnav a:not(.home):hover { text-decoration: underline; text-underline-offset: 4px; }
  .deck { font-size: 22px; }
  .art svg path { stroke-width: 2.6px; }
  .blob {
    width: 120px; height: 120px; font-size: 12px;
    right: calc(32px + env(safe-area-inset-right, 0px));
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .hero { padding: 132px var(--gut) 72px; }
  .hero .art { top: 40px; right: -4%; width: 62%; aspect-ratio: 1.5; }
  .hero h1 { font-size: clamp(64px, 8.4vw, 136px); max-width: 15ch; }

  main { gap: 180px; padding-top: 120px; }
  .article { grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: center; }
  .vino h2, .vino .deck, .vino .credit { grid-column: 1; }
  .vino .art { grid-column: 2; grid-row: 1 / span 3; width: 100%; margin: 0 -10% 0 0; }
  .cocina .art { grid-column: 1 / -1; width: 100%; aspect-ratio: 2.6; margin: 0; }
  .cocina { margin-top: -100px; }
  .cocina h2 { grid-column: 1; }
  .cocina .deck { grid-column: 2; align-self: end; }
  .donde { grid-template-columns: 1.4fr 1fr; }
  .donde h2 { grid-column: 1 / -1; max-width: 12ch; line-height: 1.1; } /* room for the accent in SÁBADO */
  .donde address, .donde .pill { grid-column: 1; }
  .donde .art { width: 260px; right: 8%; bottom: -40px; }
  .contacto a { font-size: 88px; }
  footer { padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .overlay, .overlay.open { transition: none; }
}
