/* Café El Portón — one motif: the arched portón of Calle Real #6-14 */
:root {
  --bg: #cbe4f2;
  --surface: #bcdcee;
  --ink: #0a0a0a;
  --muted: #44606e;
  --accent: #b0298f;
  --accent-strong: #921f76;
  --accent-ink: #ffffff;
  --sand: #f1e3b5;
  --sand-deep: #e9d79c;
  --yellow: #ffc013;
  --night: #0a0a0a;
  --night-ink: #f2f2f2;
  --night-soft: #b9c6cc;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step-small: clamp(0.875rem, 0.84rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.3rem + 3.4vw, 4.25rem);
  --step-sub: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --step-display: clamp(3.25rem, 1.2rem + 6.4vw, 6.75rem);

  --m: clamp(16px, 4vw, 64px);
  --gap-section: clamp(80px, 9vw, 150px);
  --arch: 100vmax 100vmax 0 0;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -100px; z-index: 10; background: var(--ink); color: var(--night-ink); padding: 12px 16px; }
.skip:focus { top: 12px; }
.wrap { padding-inline: var(--m); }

/* The motif */
.arch { border-radius: var(--arch); overflow: hidden; }
.arch img, .arch video { width: 100%; height: 100%; object-fit: cover; }

/* Controls */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 14px 32px 12px;
  border-radius: var(--arch);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: var(--step-body); text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.button:active { transform: scale(0.97); }
.button-small { min-height: 44px; padding: 10px 22px 8px; font-size: var(--step-small); }
.link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 500;
  text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color 200ms ease, color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); transform: translateY(-2px); }
  .link:hover { text-decoration-color: currentColor; }
  .nav a:hover, .foot a:hover { text-decoration-color: currentColor; }
}

/* Notice and header */
.notice {
  background: var(--night); color: var(--night-ink);
  font-size: var(--step-small); padding: 10px var(--m);
}
.notice a { color: var(--night-ink); font-weight: 600; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--m);
  position: relative; z-index: 3;
}
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.04em; line-height: 1; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 28px; }
.nav a, .foot a {
  text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em;
  text-decoration-color: transparent; transition: text-decoration-color 200ms ease;
}
.nav-links a { font-weight: 500; }
.nav-action { font-weight: 600; }
.nav-phone { display: none; position: relative; }
.nav-phone summary { cursor: pointer; font-weight: 600; list-style: none; padding: 10px 0; }
.nav-phone summary::-webkit-details-marker { display: none; }
.nav-phone ul {
  position: absolute; right: 0; top: 100%; min-width: 200px;
  background: var(--night); color: var(--night-ink); padding: 12px 0;
}
.nav-phone li a { display: block; padding: 12px 20px; font-size: 1.125rem; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 120px);
  display: grid; align-items: center;
  padding: 24px var(--m) clamp(64px, 8vw, 120px);
}
.hero-text { position: relative; z-index: 2; max-width: min(44vw, 640px); }
.hero h1 {
  font-size: var(--step-display); font-weight: 600; letter-spacing: -0.04em; line-height: 0.92;
}
.hero h1 span { display: block; white-space: nowrap; }
.hero-lead { margin-top: 36px; font-size: var(--step-lead); line-height: 1.4; max-width: 30ch; }
.status { display: flex; align-items: center; gap: 12px; margin-top: 28px; font-weight: 500; }
.status-dot {
  flex: none; width: 14px; height: 18px; border-radius: var(--arch);
  background: var(--muted);
}
.is-open .status-dot { background: var(--accent); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; margin-top: 32px; }

.porton {
  position: absolute; z-index: 1;
  width: min(56vw, 118vh); aspect-ratio: 1 / 1.25;
  right: -4vw; top: 6vh;
  background: var(--accent);
  border-radius: var(--arch);
}
.porton-view {
  position: absolute; inset: clamp(20px, 3.4vw, 56px) clamp(20px, 3.4vw, 56px) 0;
  border-radius: var(--arch); overflow: hidden;
}
.porton-view img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

/* Section headings */
.h-section { font-size: var(--step-head); font-weight: 600; letter-spacing: -0.035em; line-height: 0.95; }

/* La casa: inset dark panel */
.casa { padding: 20px; }
.casa-panel {
  background: var(--night); color: var(--night-ink);
  min-height: 108svh; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  padding: clamp(32px, 4vw, 64px);
}
.casa-left { display: flex; flex-direction: column; gap: 56px; }
.casa-statement {
  font-size: var(--step-head); font-weight: 600; letter-spacing: -0.035em; line-height: 0.98;
}
.casa-sub { font-size: var(--step-lead); line-height: 1.35; max-width: 26ch; margin-top: -32px; }
.casa-photo {
  width: min(36vw, 560px); aspect-ratio: 4 / 5; margin-top: auto; margin-bottom: -18%;
}
.casa-right {
  display: flex; flex-direction: column; align-items: flex-start; gap: 48px;
  padding-left: 12%;
}
.casa-block { max-width: 34ch; }
.casa-block h3 { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; line-height: 1.15; }
.casa-block p { color: var(--night-ink); }

/* La carta */
.carta { background: var(--sand); margin-top: 20px; padding-block: var(--gap-section); }
.carta-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.carta-note { max-width: 40ch; justify-self: end; }
.carta-jump { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.carta-jump a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 4px 22px 2px; border-radius: var(--arch); background: var(--yellow);
  font-weight: 600; text-decoration: none; transition: background-color 200ms ease, transform 160ms var(--ease-out);
}
.carta-jump a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .carta-jump a:hover { background: var(--ink); color: var(--night-ink); } }
.cat { margin-top: 96px; scroll-margin-top: 80px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.cat-head h3 { font-size: var(--step-sub); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.cat-head span { font-weight: 500; }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 64px; }
.item { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; }
.bullet { width: 64px; height: 80px; object-fit: cover; border-radius: var(--arch); }
span.bullet { display: grid; place-items: end center; padding-bottom: 14px; color: var(--ink); }
.glyph { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bullet-sky { background: var(--bg); }
.bullet-sand { background: var(--sand-deep); }
.bullet-yellow { background: var(--yellow); }
.bullet-ink, span.bullet-ink { background: var(--ink); color: var(--night-ink); }
.item-name { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; }
.item-name span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-desc { margin-top: 6px; max-width: 42ch; }
.item-tag { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Salento: one frame, contents change */
.salento { padding-block: var(--gap-section); }
.salento-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.salento-text { display: grid; gap: 24px; max-width: 40ch; }
.salento-text .h-section { margin-bottom: 8px; }
.frame { justify-self: center; width: min(36vw, 520px); }
.frame-stage {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5;
  padding: 0; border: 0; cursor: pointer; background: var(--surface);
}
.frame-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 700ms ease;
}
.frame-stage img.is-on { opacity: 1; }
.frame-hint { margin-top: 16px; font-size: var(--step-small); color: var(--muted); }
.frame-caption { margin-top: 4px; font-size: var(--step-small); font-weight: 500; min-height: 3em; }

/* Del árbol a la taza: tiles that grow */
.grano { background: var(--yellow); padding-block: var(--gap-section); }
.tiles {
  display: grid; grid-template-columns: 2fr 3fr 3fr 4fr; gap: 10px;
  align-items: end; position: relative;
}
.grano-title { grid-column: 1 / 3; grid-row: 1; align-self: start; max-width: 9ch; }
.stage { grid-row: 2; }
.stage h3 { margin-top: 20px; font-size: var(--step-lead); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.stage p { margin-top: 6px; max-width: 30ch; padding-right: 12px; }
.tile { display: grid; place-items: end center; padding: 24px 24px 0; overflow: hidden; }
.tile .arch { width: 74%; aspect-ratio: 4 / 5; }
.stage:nth-of-type(1) .tile { height: 30vh; min-height: 200px; }
.stage:nth-of-type(2) .tile { height: 40vh; min-height: 260px; }
.stage:nth-of-type(3) .tile { height: 50vh; min-height: 330px; }
.stage:nth-of-type(4) .tile { height: 62vh; min-height: 400px; }
.tiles .stage:nth-of-type(4) { grid-row: 1 / 3; }
.tile-sky { background: var(--bg); }
.tile-sand { background: var(--sand); }
.tile-ink { background: var(--night); }
.tile-accent { background: var(--accent); }

/* Horarios y ubicación */
.visita { padding-block: var(--gap-section); }
.visita-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.horarios, .ubicacion { scroll-margin-top: 24px; }
.status-big { font-size: var(--step-lead); margin-top: 28px; }
.status-big .status-dot { width: 20px; height: 26px; }
.hours { width: 100%; margin-top: 32px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: 14px 16px; font-weight: 400; vertical-align: top; }
.hours th { font-weight: 600; }
.hours tr:nth-child(odd) { background: var(--surface); }
.hours tr.is-today { background: var(--ink); color: var(--night-ink); }
.hours tr.is-today th::after { content: " · hoy"; font-weight: 400; }
.fine { margin-top: 20px; font-size: var(--step-small); color: var(--muted); }
.map { margin-top: 32px; }
.map svg { display: block; width: 100%; height: auto; }
.address { margin-top: 24px; font-size: var(--step-lead); line-height: 1.35; }
.map-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 20px; }

/* Reservar: the coupon */
.reservar { background: var(--sand); padding-block: var(--gap-section); }
.coupon {
  --notch: 28px;
  position: relative;
  display: grid; grid-template-columns: 46fr 54fr;
  background: var(--accent); color: var(--accent-ink);
  margin-inline: auto; max-width: 1200px;
}
/* the two notches sit at the ends of the perforation */
.coupon-left::before, .coupon-left::after {
  content: ""; position: absolute; right: calc(var(--notch) / -2 - 2.5px); width: var(--notch); height: var(--notch);
  border-radius: 50%; background: var(--sand);
}
.coupon-left::before { top: calc(var(--notch) / -2); }
.coupon-left::after { bottom: calc(var(--notch) / -2); }
.coupon-left {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 48px; border-right: 5px dotted var(--sand); position: relative;
}
.coupon-title { font-size: var(--step-sub); font-weight: 600; letter-spacing: -0.03em; line-height: 1; max-width: 13ch; }
.coupon-left p { max-width: 36ch; }
.coupon-right { display: grid; gap: 6px; padding: 48px; align-content: center; }
.field-label { font-size: var(--step-small); font-weight: 600; color: var(--accent-ink); margin-top: 8px; }
.field-label:first-child { margin-top: 0; }
.coupon input, .coupon select {
  width: 100%; height: 54px; padding: 0 18px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #f3d5ea; border: 0; border-radius: 0;
  appearance: none; -webkit-appearance: none;
}
.coupon select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230a0a0a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.coupon input::placeholder { color: #5b3a50; opacity: 1; }
.coupon input:focus-visible, .coupon select:focus-visible { outline: 3px solid var(--ink); outline-offset: 0; }
.coupon select:disabled { color: #5b3a50; cursor: not-allowed; }
.coupon .submit:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.submit {
  height: 58px; margin-top: 14px; border: 0; cursor: pointer; border-radius: var(--arch);
  background: var(--ink); color: var(--night-ink); font: inherit; font-weight: 600;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.submit:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .submit:hover { background: #2a2a2a; } }
.form-error { font-weight: 600; color: var(--accent-ink); margin-top: 8px; }
.reservar-alt { text-align: center; margin-top: 40px; }

/* Footer */
.foot { background: var(--night); color: var(--night-ink); padding-block: clamp(48px, 5vw, 72px) 32px; }
.blocks { display: block; width: 100%; height: auto; font-family: var(--font); letter-spacing: -0.04em; }
.foot-grid { display: grid; grid-template-columns: repeat(3, 1fr) 2fr; gap: 32px; margin-top: 56px; }
.foot-col { display: grid; align-content: start; }
.foot-col a, .foot-contact a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-contact { display: grid; gap: 4px; align-content: start; }
.foot-contact p:first-child { padding-top: 10px; }
.author { margin-top: 72px; max-width: 52ch; display: grid; gap: 10px; }
.author-name { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; }
.author p:not(.author-name) { color: var(--night-soft); }
.credits { margin-top: 40px; font-size: var(--step-small); color: var(--night-soft); }
.credits summary { cursor: pointer; font-weight: 600; color: var(--night-ink); display: list-item; padding-block: 12px; }
.credits ul { display: grid; gap: 6px; margin-top: 12px; columns: 2; }
.credits li { break-inside: avoid; }
.foot-last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; font-size: var(--step-small); }

/* Tablet */
@media (max-width: 960px) {
  .hero { display: block; min-height: 0; padding: 24px var(--m) 0; }
  .hero-text { max-width: 34rem; }
  .porton {
    position: relative; right: auto; top: auto;
    width: 128vw; margin: 48px 0 0 calc(-14vw - var(--m));
    aspect-ratio: 1 / 0.82;
  }
  .casa-panel { grid-template-columns: 1fr; min-height: 0; }
  .casa-right { padding-left: 0; order: 1; }
  .casa-left { display: contents; }
  .casa-statement { order: 0; }
  .casa-photo { order: 2; width: 78%; margin: 0 auto -22%; }
  .items { grid-template-columns: 1fr; }
  .salento-grid { grid-template-columns: 1fr; }
  .frame { width: min(72vw, 460px); }
  .visita-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; row-gap: 40px; }
  .grano-title { grid-column: 1 / -1; grid-row: auto; max-width: none; }
  .stage, .tiles .stage:nth-of-type(4) { grid-row: auto; }
  .stage:nth-of-type(n) .tile { height: auto; min-height: 0; aspect-ratio: 1 / 1; }
  .stage:nth-of-type(1) .tile, .stage:nth-of-type(2) .tile { aspect-ratio: 4 / 3; }
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-contact { grid-column: 1 / -1; }
  .casa-sub { margin-top: -24px; }
}

/* Phone: its own composition */
@media (max-width: 720px) {
  .nav-links, .nav-action { display: none; }
  .nav-phone { display: block; }
  .wordmark { font-size: 1.75rem; }
  .hero h1 { font-size: 13vw; }
  .hero-lead { margin-top: 28px; font-size: 1.125rem; }
  .casa { padding: 10px; }
  .casa-panel { padding: 32px 20px; gap: 40px; }
  .casa-photo { width: 86%; }
  .carta-head { grid-template-columns: 1fr; }
  .carta-note { justify-self: start; }
  .carta-jump {
    position: sticky; top: 0; z-index: 4; background: var(--sand);
    margin-inline: calc(var(--m) * -1); padding: 12px var(--m);
  }
  .cat { margin-top: 64px; }
  .item { grid-template-columns: 52px 1fr; gap: 16px; }
  .bullet { width: 52px; height: 66px; }
  .tiles { grid-template-columns: 1fr; }
  .stage:nth-of-type(1) .tile { aspect-ratio: auto; height: 46vw; }
  .stage:nth-of-type(2) .tile { aspect-ratio: auto; height: 62vw; }
  .stage:nth-of-type(3) .tile { aspect-ratio: auto; height: 78vw; }
  .stage:nth-of-type(4) .tile { aspect-ratio: auto; height: 94vw; }
  .tile .arch { width: 56%; }
  .stage:nth-of-type(1) .tile .arch { width: 30%; }
  .stage:nth-of-type(2) .tile .arch { width: 40%; }
  .stage:nth-of-type(3) .tile .arch { width: 48%; }
  .hours th, .hours td { padding: 12px; }
  .coupon { grid-template-columns: 1fr; }
  .coupon-left::before, .coupon-left::after { top: auto; bottom: calc(var(--notch) / -2 - 2.5px); }
  .coupon-left::before { left: calc(var(--notch) / -2); right: auto; }
  .coupon-left::after { right: calc(var(--notch) / -2); }
  .coupon-left { padding: 32px 24px; border-right: 0; border-bottom: 5px dotted var(--sand); }
  .coupon-right { padding: 32px 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-contact { grid-column: auto; }
  .credits ul { columns: 1; }
  .foot-last { flex-wrap: wrap; }
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .js .shutter { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-in-out) 200ms; }
  .js .shutter img { transform: scale(1.12); transition: transform 1600ms var(--ease-soft) 200ms; }
  .js .shutter.is-in { clip-path: inset(0); }
  .js .shutter.is-in img { transform: none; }

  .js .porton { transform: translateX(8%); transition: transform 1300ms var(--ease-out); }
  .js .porton.is-in { transform: none; }

  .is-open .status-dot { animation: breathe 2.4s ease-in-out infinite; }
  @keyframes breathe { 50% { transform: scale(0.82); opacity: 0.7; } }

  .frame-stage img.is-on { animation: drift 4s linear both; }
  @keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
}
