/* Layout: one wooden-framed chalkboard per screen-section; type is the board's handwriting. */
:root {
  --slate: #1b231f;
  --slate-2: #232d28;
  --slate-3: #2d3832;
  --chalk: #eceae1;
  --chalk-dim: #b8bcb1;
  --yellow: #f1d26a;
  --pink: #ee958e;
  --blue: #93c6d8;
  --wood: #6e4b31;
  --wood-dark: #46301f;

  --f-display: "Cabin Sketch", "Kalam", "Comic Sans MS", cursive;
  --f-hand: "Kalam", "Segoe Print", "Comic Sans MS", cursive;
  --f-body: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--slate);
  color: var(--chalk);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* chalk grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.22;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--yellow); color: var(--slate); }
:focus-visible { outline: 2px dashed var(--yellow); outline-offset: 4px; border-radius: 4px; }
html { scrollbar-color: var(--wood) var(--slate); }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--yellow) 70%, transparent); text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }

/* language toggle */
html[data-lang="es"] [data-l="en"],
html[data-lang="en"] [data-l="es"],
html:not([data-lang]) [data-l="en"] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: color-mix(in srgb, var(--slate) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px dashed color-mix(in srgb, var(--chalk) 18%, transparent);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--slate);
}
.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 12px;
}
.brand {
  font-family: var(--f-display);
  font-size: 1.45rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.brand small { color: var(--yellow); font-size: 0.8em; }
.nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-family: var(--f-hand); font-size: 1.1rem; }
.nav a { text-decoration: none; position: relative; padding-block: 4px; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--yellow); border-radius: 2px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 260ms var(--ease-out);
}
.nav a[aria-current="page"]::after { clip-path: inset(0 0 0 0); }
@media (hover: hover) and (pointer: fine) { .nav a:hover::after { clip-path: inset(0 0 0 0); } }

.lang {
  display: inline-flex; border: 1.5px solid color-mix(in srgb, var(--chalk) 40%, transparent);
  border-radius: 999px; padding: 2px; font-family: var(--f-body); font-size: 0.78rem; letter-spacing: 0.06em;
}
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--chalk-dim);
  padding: 4px 9px; border-radius: 999px; cursor: pointer; font: inherit;
  transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out);
}
.lang button[aria-pressed="true"] { background: var(--chalk); color: var(--slate); }
.lang button:active { transform: scale(0.95); }

@media (max-width: 640px) {
  .brand { font-size: 1.2rem; }
  .brand small { display: none; }
  .nav { font-size: 1rem; gap: 12px; }
}

/* ---------- the board ---------- */
.board {
  position: relative;
  background:
    radial-gradient(120% 80% at 30% 20%, var(--slate-3), transparent 60%),
    radial-gradient(90% 70% at 80% 90%, #202a25, transparent 70%),
    var(--slate-2);
  border: clamp(10px, 1.6vw, 18px) solid var(--wood);
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 2px var(--wood-dark),
    inset 0 0 60px rgba(0,0,0,.45),
    0 24px 50px -20px rgba(0,0,0,.6);
}
/* wood grain hint */
.board::before {
  content: ""; position: absolute; inset: calc(-1 * clamp(10px, 1.6vw, 18px));
  border-radius: 6px; pointer-events: none;
  background: repeating-linear-gradient(92deg, transparent 0 7px, rgba(0,0,0,.12) 7px 9px);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: clamp(10px, 1.6vw, 18px);
}
/* smudge where someone wiped */
.smudge::after {
  content: ""; position: absolute; width: 46%; height: 30%; right: 6%; top: 8%;
  background: radial-gradient(closest-side, rgba(236,234,225,.06), transparent);
  filter: blur(8px); transform: rotate(-8deg); pointer-events: none;
}

.chalk { filter: url(#chalky); }
.display {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
.hand { font-family: var(--f-hand); }
.yellow { color: var(--yellow); }
.pink { color: var(--pink); }
.blue { color: var(--blue); }

/* ---------- hero (home) ---------- */
.hero { padding-block: clamp(20px, 4vw, 44px) clamp(40px, 6vw, 72px); }
.hero .board {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 5vw, 64px);
  min-height: min(78vh, 720px);
}
.hero h1 { font-size: clamp(3.2rem, 9.2vw, 6rem); }
.hero h1 .line { display: block; }
.hero .lede { max-width: 34ch; margin: 22px 0 0; color: var(--chalk-dim); font-size: 1.12rem; }
.hero .lede strong { color: var(--chalk); font-weight: 600; }
.hero-left { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-width: 0; }

.today {
  position: relative; align-self: center; min-width: 0;
  border-left: 1.5px dashed color-mix(in srgb, var(--chalk) 30%, transparent);
  padding-left: clamp(20px, 3vw, 40px);
}
.today h2 { font-family: var(--f-hand); font-weight: 700; font-size: 1.6rem; margin: 0 0 14px; color: var(--yellow); transform: rotate(-2deg); }
.today ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.today li { font-family: var(--f-hand); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.2; display: flex; gap: 12px; align-items: baseline; }
.today li::before { content: ""; width: 10px; height: 10px; flex: none; border: 1.6px solid var(--pink); border-radius: 50%; transform: translateY(-2px); }
.today .note { margin-top: 18px; font-family: var(--f-hand); color: var(--chalk-dim); font-size: 1.05rem; }
.write { display: inline-block; }

.prawn { position: absolute; right: -6px; bottom: -34px; width: clamp(110px, 14vw, 170px); transform: rotate(-12deg); }
.drawn path, .drawn circle, .drawn line, .drawn ellipse, .drawn polyline { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px;
  font-family: var(--f-body); font-weight: 600; font-size: 1rem; text-decoration: none;
  background: var(--chalk); color: var(--slate);
  border: 1.5px solid var(--chalk);
  transition: transform 140ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--chalk); border-color: color-mix(in srgb, var(--chalk) 50%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--slate); }
  .btn.ghost:hover { background: transparent; color: var(--yellow); border-color: var(--yellow); }
}
.phone-text { font-family: var(--f-hand); font-size: 1.2rem; color: var(--chalk-dim); user-select: all; }

@media (max-width: 860px) {
  .hero .board { grid-template-columns: 1fr; min-height: 0; }
  .today { border-left: 0; padding-left: 0; border-top: 1.5px dashed color-mix(in srgb, var(--chalk) 30%, transparent); padding-top: 24px; }
  .prawn { bottom: -20px; right: 0; }
}

/* ---------- horizontal board run (home) ---------- */
.run-head { padding-block: clamp(56px, 8vw, 110px) 24px; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: end; justify-content: space-between; }
.run-head h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 14ch; }
.run-head p { max-width: 40ch; margin: 0; color: var(--chalk-dim); }

.run { overflow: hidden; }
.run-track { display: flex; gap: clamp(20px, 3vw, 40px); padding-left: var(--gutter); padding-right: var(--gutter-r); padding-block: 20px 60px; width: max-content; }
.panel {
  width: min(78vw, 720px); flex: none;
  padding: clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start;
}
.panel h3 { font-family: var(--f-display); font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 0 0 16px; line-height: 1; }
.panel ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.panel li { display: grid; gap: 2px; }
.panel li b { font-family: var(--f-hand); font-weight: 700; font-size: 1.4rem; line-height: 1.2; }
.panel li span { color: var(--chalk-dim); font-size: 0.98rem; }
.panel .sketch { width: clamp(90px, 12vw, 150px); }
.panel:nth-child(2) { transform: rotate(0.6deg); }
.panel:nth-child(3) { transform: rotate(-0.5deg); }

@media (max-width: 760px) {
  .run-track { flex-direction: column; width: auto; }
  .panel { width: 100%; grid-template-columns: 1fr; }
  .panel .sketch { order: -1; width: 96px; }
  .panel:nth-child(n) { transform: none; }
}

/* ---------- tally / proof ---------- */
.proof { padding-block: clamp(40px, 7vw, 90px); }
.proof .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.tally { width: clamp(180px, 26vw, 300px); color: var(--chalk); }
.proof .score { font-family: var(--f-display); font-size: clamp(3.4rem, 9vw, 6rem); line-height: 0.9; margin: 0; }
.proof p { margin: 14px 0 0; max-width: 46ch; color: var(--chalk-dim); }
.proof p strong { color: var(--chalk); font-weight: 600; }
@media (max-width: 680px) { .proof .wrap { grid-template-columns: 1fr; } }

/* ---------- visit strip (home) ---------- */
.visit { padding-block: 0 clamp(60px, 8vw, 110px); }
.visit .board { padding: clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.visit h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
.visit address { font-style: normal; color: var(--chalk-dim); margin-top: 8px; }

/* ---------- carta ---------- */
.page-head { padding-block: clamp(36px, 6vw, 80px) clamp(20px, 3vw, 32px); }
.page-head h1 { font-size: clamp(3rem, 9vw, 6rem); }
.page-head h1 .line { display: block; }
.page-head p { max-width: 52ch; color: var(--chalk-dim); margin: 18px 0 0; }

.tabs { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 61px); z-index: 20; background: var(--slate); padding-block: 10px; }
.tabs .wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a {
  font-family: var(--f-hand); font-size: 1.1rem; text-decoration: none;
  padding: 6px 16px; border-radius: 999px;
  border: 1.5px dashed color-mix(in srgb, var(--chalk) 40%, transparent);
  transition: border-color 200ms ease, color 200ms ease, transform 140ms var(--ease-out);
}
.tabs a.is-active { border-style: solid; border-color: var(--yellow); color: var(--yellow); }
.tabs a:active { transform: scale(0.97); }

.menu { padding-block: 24px clamp(60px, 8vw, 110px); display: grid; gap: clamp(36px, 6vw, 72px); }
.menu-sec { padding: clamp(24px, 5vw, 60px); scroll-margin-top: 140px; }
.menu-sec header { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: clamp(20px, 3vw, 36px); }
.menu-sec h2 { font-size: clamp(2.4rem, 6vw, 4rem); }
.menu-sec header .sketch { width: clamp(80px, 10vw, 130px); flex: none; }
.dishes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px clamp(28px, 5vw, 64px); }
.dish { min-width: 0; }
.dish h3 { margin: 0; font-family: var(--f-hand); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.15; position: relative; display: inline-block; }
.dish h3::after {
  content: ""; position: absolute; left: 0; right: -6px; bottom: -3px; height: 6px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M2 5 C 40 1, 80 7, 120 3 S 180 6, 198 3' fill='none' stroke='%23f1d26a' stroke-width='2.2' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 420ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .dish:hover h3::after { clip-path: inset(0 0 0 0); } }
.dish p { margin: 6px 0 0; color: var(--chalk-dim); max-width: 44ch; }
.dish .tag { display: inline-block; margin-top: 8px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink); }
.menu-note { font-family: var(--f-hand); font-size: 1.2rem; color: var(--chalk-dim); transform: rotate(-1deg); max-width: 40ch; }
@media (max-width: 700px) { .dishes { grid-template-columns: 1fr; } }

/* ---------- contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 48px); padding-block: 12px clamp(60px, 8vw, 110px); align-items: start; }
.contact-grid > * { min-width: 0; }
.week { padding: clamp(22px, 4vw, 44px); }
.week h2, .reach h2 { font-family: var(--f-hand); font-size: 1.7rem; margin: 0 0 18px; color: var(--yellow); }
.days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  border: 1.5px dashed color-mix(in srgb, var(--chalk) 28%, transparent);
  border-radius: 10px; padding: 12px 4px 14px; text-align: center;
  display: grid; gap: 8px; align-content: start;
}
.day b { font-family: var(--f-hand); font-size: 1.25rem; }
.day span { font-size: 0.78rem; color: var(--chalk-dim); line-height: 1.3; font-variant-numeric: tabular-nums; }
.day.off span { color: var(--pink); }
.day.is-today { border-style: solid; border-color: var(--yellow); position: relative; }
.day.is-today::after {
  content: ""; position: absolute; inset: -9px -7px; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'><path d='M50 4 C 86 2, 97 30, 96 70 C 95 112, 80 136, 48 136 C 14 136, 3 110, 4 70 C 5 26, 20 6, 56 7' fill='none' stroke='%23f1d26a' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}
.week .summary { margin: 20px 0 0; font-family: var(--f-hand); font-size: 1.2rem; }
@media (max-width: 520px) {
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.reach { padding: clamp(22px, 4vw, 44px); display: grid; gap: 18px; }
.reach dl { margin: 0; display: grid; gap: 14px; }
.reach dt { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chalk-dim); }
.reach dd { margin: 2px 0 0; font-size: 1.1rem; }
.copy { appearance: none; background: none; border: 0; color: var(--yellow); font: inherit; font-size: 0.85rem; cursor: pointer; padding: 0 0 0 8px; text-decoration: underline; text-underline-offset: 3px; }

.map { margin-top: 0; padding: clamp(18px, 3vw, 32px); }
.map > svg { width: 100%; height: auto; display: block; color: var(--chalk); }
.map .label { font-family: var(--f-hand); fill: var(--chalk); stroke: none; font-size: 15px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { border-top: 1px dashed color-mix(in srgb, var(--chalk) 18%, transparent); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--chalk-dim); font-size: 0.92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
.foot a { color: var(--chalk); }

/* ---------- eraser transition ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: var(--slate-2);
  clip-path: inset(0 0 0 100%);
}
.wipe::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(100deg, rgba(236,234,225,.05) 0 30px, transparent 30px 70px);
}

@media (prefers-reduced-motion: reduce) {
  .wipe { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
