/* =====================================================================
   Xurrería Laietana · Option B "Modern"
   One stylesheet for the whole site. Change colours, fonts and spacing
   in the settings block right below; everything else follows.
   ===================================================================== */

:root {
  /* ---- Brand colours (official) ---- */
  --brown: #402022;
  --red: #a4343a;
  --crema: #efe0cd;

  /* ---- Derived tints (same hues, no new colours) ---- */
  --paper: #f8f1e7;          /* light page background */
  --brown-soft: #6b4a4b;     /* secondary text on light backgrounds */
  --crema-soft: #d9c7b1;     /* secondary text on brown */
  --red-tint: #e3a19c;       /* red accent that stays readable on brown */
  --rule: rgba(64, 32, 34, .2);
  --rule-light: rgba(239, 224, 205, .26);

  /* ---- Hero photo shade: brown over the photo so the text stays readable ---- */
  --shade-head: rgba(64, 32, 34, .72);  /* behind the menu at the top */
  --shade-top: rgba(64, 32, 34, .1);     /* light, so the photo shows */
  --shade-bottom: rgba(64, 32, 34, .82); /* behind the logo and the hero line */
  --shade-left: rgba(64, 32, 34, .65);   /* extra on the left, where the text sits */
  --shade-mid: rgba(64, 32, 34, .4);

  /* ---- Type ---- */
  --font: Georgia, "Times New Roman", serif;
  --body: clamp(1.125rem, 1.06rem + .25vw, 1.25rem);   /* 18px to 20px */
  /* scale 1.333 */
  --s-1: .75em;
  --s1: 1.333rem;
  --s2: 1.777rem;
  --s3: 2.369rem;
  --s4: 3.157rem;
  --s5: 4.209rem;

  /* ---- Spacing (8px rhythm) ---- */
  --sp1: .5rem;   /*  8 */
  --sp2: 1rem;    /* 16 */
  --sp3: 1.5rem;  /* 24 */
  --sp4: 2rem;    /* 32 */
  --sp6: 3rem;    /* 48 */
  --sp8: 4rem;    /* 64 */
  --sp12: 6rem;   /* 96 */
  --sp16: 8rem;   /* 128 */
  --section: clamp(5rem, 3rem + 7vw, 10rem);
  --gutter: clamp(1.25rem, .5rem + 3.5vw, 4rem);
  --gap: 1.5rem;
  --max: 1280px;
  --measure: 34em;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--sp4); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--brown);
  font-family: var(--font);
  font-size: var(--body);
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: normal; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0 0 var(--sp2); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
figure { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- Links and focus ---------- */
a { color: inherit; }
.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: var(--red);
  transition: color .2s, text-decoration-thickness .2s;
}
.link:hover { color: var(--red); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 1px; }
.hero :focus-visible, .site-header :focus-visible, .section--brown :focus-visible, .site-footer :focus-visible { outline-color: var(--crema); }

.skip { position: absolute; left: var(--sp2); top: -4rem; background: var(--crema); color: var(--brown); padding: var(--sp1) var(--sp2); z-index: 10; }
.skip:focus { top: var(--sp2); }

/* Small-caps label */
.label, .nav a, .lang a, .visit-side h3 {
  font-size: var(--s-1);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-variant-numeric: lining-nums;
}
.label { color: var(--red); margin-bottom: var(--sp3); }

/* ---------- Header (on top of the hero) ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 2; color: var(--crema); }
.header-row { display: flex; align-items: center; gap: var(--sp4); min-height: 5.5rem; border-bottom: 1px solid var(--rule-light); }
.mark img { width: 24px; height: auto; transition: transform .25s; }
.mark:hover img { transform: translateY(-2px); }
.nav { margin-left: auto; }
.nav ul, .lang ul { display: flex; gap: var(--sp4); }
.nav a, .lang a {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .45em;
  text-decoration-color: transparent;
  padding-block: var(--sp1);
  transition: text-decoration-color .2s, color .2s;
}
.nav a:hover, .lang a:hover { text-decoration-color: currentColor; }
.lang { padding-left: var(--sp4); border-left: 1px solid var(--rule-light); }
.lang ul { gap: var(--sp2); }
.lang a { color: var(--crema-soft); }
.lang a[aria-current="page"] { color: var(--crema); text-decoration-color: var(--red-tint); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 56rem); display: flex; align-items: flex-end; background: var(--brown); color: var(--crema); overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The only gradient on the site: brown over the photo, light over the upper right so the photo shows, darker behind the menu (top) and behind the title (bottom left) so text stays readable */
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(to right, var(--shade-left) 0, var(--shade-mid) 45%, transparent 80%),
  linear-gradient(to bottom, var(--shade-head) 0, var(--shade-head) 7rem, var(--shade-top) 16rem, var(--shade-top) 28%, var(--shade-bottom) 100%); }
.hero-content { position: relative; padding-top: 9rem; padding-bottom: clamp(3.5rem, 2rem + 6vw, 7rem); }
.label--hero { color: var(--crema); display: flex; align-items: center; gap: var(--sp2); }
.label--hero::before { content: ""; width: 3rem; height: 1px; background: var(--red-tint); }
.hero-logo img { width: min(100%, 56rem); }
.tagline { font-style: italic; font-size: var(--s2); line-height: 1.3; max-width: 22em; margin-top: var(--sp4); color: var(--crema); }
.hero-intro { font-size: clamp(1rem, .92rem + .25vw, 1.2rem); line-height: 1.5; max-width: 30em; margin-top: var(--sp2); color: var(--crema); text-wrap: pretty; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }
.section--crema { background: var(--crema); }
.section--brown { background: var(--brown); color: var(--crema); }
.section--brown .label { color: var(--red-tint); }

h2 { font-size: var(--s5); margin-bottom: var(--sp6); }

/* Photo slots: large, plain, no frame */
.plate img { width: 100%; object-fit: cover; }

/* The shop (morning): text left, tall photo right */
.morning-text { grid-column: 1 / span 6; align-self: center; max-width: var(--measure); }
.morning-text h2 + p, .product-text p { font-size: var(--s1); line-height: 1.45; }
.plate--morning { grid-column: 8 / span 5; }
.plate--morning img, .plate--hands img { aspect-ratio: 4 / 5; }

/* Menu: wide photo, then one card per product */
#menu-title, .more-title { font-size: var(--s4); }
.menu-note { margin-top: var(--sp6); padding-top: var(--sp3); border-top: 1px solid var(--rule); font-style: italic; color: var(--brown-soft); }

/* Story: text left, photo right and lower */
.story-text { grid-column: 1 / span 5; align-self: center; max-width: var(--measure); }
.story-text h2 + p { font-size: var(--s1); line-height: 1.45; }
.plate--story { grid-column: 7 / span 6; }
.plate--story img { aspect-ratio: 3 / 4; }

/* Visit */
.visit-main { grid-column: 1 / span 7; }
.big-address { font-size: var(--s3); line-height: 1.15; letter-spacing: -.01em; margin-bottom: var(--sp4); }
.cta { display: inline-flex; gap: .5em; color: var(--red); font-size: var(--s1); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.cta span { transition: transform .25s; }
.cta:hover span { transform: translateX(4px); }
.cta:hover { text-decoration-thickness: 2px; }
.hint { display: block; font-size: var(--s-1); color: var(--brown-soft); font-style: italic; margin-top: .25rem; }
.visit-side { grid-column: 9 / span 4; align-self: end; }
.visit-side h3 { color: var(--red); margin-bottom: var(--sp2); }
.hours { margin: 0 0 var(--sp6); }
.hours div { padding-block: var(--sp2); border-top: 1px solid var(--rule); }
.hours div:last-child { border-bottom: 1px solid var(--rule); }
.hours dt { font-style: italic; color: var(--brown-soft); }
.hours dd { margin: 0; font-size: var(--s1); font-variant-numeric: oldstyle-nums tabular-nums; }
.phone { font-size: var(--s1); }
.plate--visit { grid-column: 1 / -1; margin-top: var(--sp12); }
.plate--visit img { aspect-ratio: 21 / 9; }

/* ---------- Hero: directions link under the hero line ---------- */
.hero-link { margin-top: var(--sp3); }
.hero-link .link { text-decoration-color: var(--red-tint); }
.hero-link .link:hover { color: var(--crema); }
.hero-link span { display: inline-block; transition: transform .25s; }
.hero-link a:hover span { transform: translateX(4px); }

/* ---------- Product pages: shorter photo at the top, product name on it ---------- */
.hero--page { min-height: min(72svh, 44rem); }
.page-title { font-size: var(--s5); }
.label--hero a { text-decoration: underline 1px transparent; text-underline-offset: .45em; transition: text-decoration-color .2s; }
.label--hero a:hover { text-decoration-color: currentColor; }
.product-text { grid-column: 1 / span 6; align-self: center; max-width: var(--measure); }
.plate--hands { grid-column: 8 / span 5; }
.back { margin-top: var(--sp8); }

/* ---------- Menu cards (phones first: small photo beside the name) ---------- */
.plate--wide { margin-bottom: var(--sp8); }
.plate--wide img { aspect-ratio: 4 / 3; }
.cards { display: grid; gap: var(--sp3); }
.card { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--sp3); align-items: center; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-name { display: block; font-size: var(--s1); line-height: 1.25; margin-bottom: .25rem; text-decoration: underline 1px transparent; text-underline-offset: .22em; transition: color .2s, text-decoration-color .2s; }
.card-line { display: block; font-style: italic; color: var(--brown-soft); line-height: 1.4; }
.card:hover .card-name { color: var(--red); text-decoration-color: var(--red); }
.menu-also { margin-top: var(--sp8); max-width: var(--measure); }
.menu-also + .menu-note { margin-top: var(--sp4); }

/* ---------- How to eat it: 4 photos (phones: scroll sideways) ---------- */
.section--strip { padding-top: 0; }
.strip {
  display: flex; gap: var(--sp2);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip li { flex: 0 0 72%; scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Our story: link to the full story and the Time Out line ---------- */
.story-more { margin-top: var(--sp4); }
.section--brown .cta { color: var(--red-tint); }
.section--brown .link { text-decoration-color: var(--red-tint); }
.section--brown .link:hover { color: var(--crema); }
.press { margin-top: var(--sp6); padding-top: var(--sp3); border-top: 1px solid var(--rule-light); font-style: italic; color: var(--crema-soft); }

/* Story page: the header sits on the brown background */
.page-top { padding-top: calc(var(--section) + 6rem); }
.story-full { grid-column: 1 / span 6; max-width: var(--measure); }
.story-full h1 { font-size: var(--s5); margin-bottom: var(--sp6); }
.story-full h1 + p { font-size: var(--s1); line-height: 1.45; }
.plate--story-page { align-self: start; position: sticky; top: var(--sp4); }

/* Wider screens: cards stand up, the strip fits in one row */
@media (min-width: 721px) {
  .plate--wide img { aspect-ratio: 21 / 9; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp6) var(--gap); }
  .cards--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card { grid-template-columns: 1fr; gap: var(--sp2); align-items: start; }
  .card img { aspect-ratio: 4 / 5; }
  .strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); overflow: visible; margin-inline: 0; padding-inline: 0; }
}
@media (min-width: 1101px) {
  .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cards--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--brown); color: var(--crema); padding-block: var(--sp12) var(--sp6); }
.footer-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.footer-logo { grid-column: 1 / span 5; width: min(100%, 22rem); }
.insta { grid-column: 7 / span 4; margin: 0; }
.site-footer .link { text-decoration-color: var(--red-tint); }
.site-footer .link:hover { color: var(--red-tint); }
.lang--footer { grid-column: 11 / span 2; border: 0; padding: 0; justify-self: end; }
.small { grid-column: 1 / -1; font-size: var(--s-1); color: var(--crema-soft); margin-top: var(--sp8); padding-top: var(--sp3); border-top: 1px solid var(--rule-light); }

/* ---------- Tablet (iPad) ---------- */
@media (max-width: 1100px) {
  :root { --s5: 3.157rem; --s4: 2.369rem; }
  .visit-main { grid-column: 1 / span 7; }
  .visit-side { grid-column: 8 / span 5; }
  .insta { grid-column: 7 / span 6; }
  .lang--footer { grid-column: 7 / span 6; justify-self: start; margin-top: var(--sp3); }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  :root { --s5: 2.369rem; --s4: 2.369rem; --s3: 1.777rem; --s2: 1.333rem; }
  .header-row { flex-wrap: wrap; gap: 0 var(--sp3); min-height: 0; padding-block: var(--sp2); }
  .mark { order: 1; }
  .site-header .lang { order: 2; margin-left: auto; border-left: 0; padding-left: 0; }
  .nav { order: 3; flex-basis: 100%; margin: var(--sp2) 0 0; padding-top: var(--sp1); border-top: 1px solid var(--rule-light); }
  .nav ul { justify-content: space-between; gap: var(--sp2); }
  .nav a, .lang a { letter-spacing: .12em; white-space: nowrap; font-size: .72em; }
  .nav ul { gap: var(--sp1); }
  .hero { min-height: 88svh; }
  .hide-phone { display: none; }
  .morning-text, .plate--morning, .product-text, .plate--hands, .story-text, .story-full, .plate--story, .visit-main, .visit-side { grid-column: 1 / -1; }
  .plate--morning, .plate--hands { margin-top: var(--sp8); }
  .plate--story { margin-top: var(--sp8); position: static; }
  .hero--page { min-height: 62svh; }
  .visit-side { margin-top: var(--sp8); }
  .plate--visit { margin-top: var(--sp8); }
  .plate--visit img { aspect-ratio: 4 / 3; }
  .footer-logo, .insta, .lang--footer { grid-column: 1 / -1; justify-self: start; }
  .insta { margin-top: var(--sp6); }
  .lang--footer { margin-top: var(--sp3); }
}

/* Small texts and links on brown: the same cream and red tints the story section uses */
.section--brown .card-line, .section--brown .menu-note { color: var(--crema-soft); }
.section--brown .menu-note { border-top-color: var(--rule-light); }
.section--brown .card:hover .card-name { color: var(--red-tint); text-decoration-color: var(--red-tint); }

/* The home page has its own stylesheet: assets/css/home.css */
