/* Home: hero film, philosophy, dish gallery, location, Tonino, footer */
/* Shades of green and brown, all in the family of the printed menu */
:root {
  --wine: #6b1f35;
  --forest: #2f3722;   /* dark green */
  --leather: #7a4a2b;  /* warm brown */
  --sand: #efe4d2;     /* light brown */
}

.todo { display: inline-block; font-size: 12px; font-weight: 700; border: 1px dashed currentColor; padding: 8px 12px; margin: 18px 0; }
.section-head { text-align: center; padding: 0 var(--pad); }
.section-head h2 { font-size: clamp(54px, 13vw, 118px); color: var(--olive); letter-spacing: .03em; margin-bottom: 14px; }
.section-head p { max-width: 40ch; margin: 0 auto; font-size: 18px; font-weight: 300; }

/* 1 · Opening film full screen, with the introduction over a dark fade so it stays readable on bright shots */
.hero { position: relative; display: grid; align-items: end; min-height: max(520px, calc(100svh - var(--nav-h))); background: #1d1a12; color: var(--cream); }
.film { position: absolute; inset: 0; }
.film video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.film video.upright { object-position: 50% 50%; } /* the phone cut is already centred */
.film::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgb(20 17 8 / .92) 0, rgb(20 17 8 / .78) 38%, rgb(20 17 8 / 0) 70%); }
.hero-copy { position: relative; z-index: 1; padding: 0 var(--pad) 100px; }
/* Three short lines, the last in yellow. The size also follows the screen height */
.hero h1 { font-size: min(21vw, 12.5svh, 150px); margin: 0 0 16px; }
.hero h1 span { display: block; white-space: nowrap; line-height: .94; }
.hero h1 span:last-child { color: var(--yellow); }
.hero-copy p { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; line-height: 1.6; text-transform: uppercase; text-wrap: balance; max-width: max-content; margin-bottom: 22px; }

/* 3 · Philosophy. Plain version first: everything stacked and visible */
.philosophy .stage { display: grid; grid-template-areas: "words" "sea" "memory" "land"; justify-items: center; gap: 32px; padding: 80px var(--pad); overflow: hidden; }
.philosophy-words { grid-area: words; text-align: center; max-width: 720px; }
.philosophy h2 { font-size: clamp(66px, 18vw, 150px); color: var(--olive); letter-spacing: .03em; margin-bottom: 22px; }
.philosophy-words > p:not(.todo) { font-size: clamp(25px, 7.2vw, 42px); font-weight: 500; line-height: 1.32; color: var(--ink); text-wrap: balance; }
.philosophy-words > .todo { font-size: 12px; font-weight: 700; }
.art { height: 190px; width: auto; max-width: 78%; object-fit: contain; }
.art-sea { grid-area: sea; justify-self: start; }
.art-land { grid-area: land; justify-self: end; }
.memory { grid-area: memory; justify-self: stretch; display: grid; justify-items: center; margin: 0 calc(var(--pad) * -1); padding: 48px var(--pad) 56px; background: var(--cream) url("../assets/tovaglia.webp") center / 760px; }
.memory .clip { width: min(100%, 440px); }

/* Scroll story, switched on by main.js. --p is the whole scroll (0-1), --q the arrival of the photo */
.philosophy.scrolly { height: 340svh; --p: 0; --q: 0; }
.scrolly .stage { position: sticky; top: var(--nav-h); display: block; height: calc(100svh - var(--nav-h)); padding: 0; }
.scrolly .philosophy-words { position: absolute; z-index: 1; left: var(--pad); right: var(--pad); top: 46%; margin-inline: auto; translate: 0 calc(-50% - var(--q) * 22svh); opacity: calc(1 - var(--q) * 1.4); }
.scrolly .w { opacity: .18; transition: opacity .25s linear; }
.scrolly .w.on { opacity: 1; }
.scrolly .memory { position: absolute; z-index: 2; inset: 0; margin: 0; padding: 0 var(--pad) 64px; place-content: center; justify-items: center; translate: 0 calc((1 - var(--q)) * 102%); }
/* Large faded artwork behind the text, each drifting at its own speed */
.scrolly .art { position: absolute; z-index: 0; margin: 0; width: auto; max-width: none; max-height: none; opacity: .11; pointer-events: none; }
.scrolly .art-sea { height: 44svh; left: -24vw; top: 1svh; translate: 0 calc((.5 - var(--p)) * 140px); }
.scrolly .art-land { height: 48svh; right: -12vw; bottom: 3svh; translate: 0 calc((.5 - var(--p)) * 260px); }
.scrolly h2 { font-size: min(18vw, 12.5svh, 150px); }
.scrolly .philosophy-words > p:not(.todo) { font-size: min(7.2vw, 4.3svh, 42px); }
/* the photo always fits the screen, whatever its height */
.scrolly .memory .clip { width: min(84vw, 440px, calc((100svh - 274px) * .68)); }

/* Clipping (historic photo only): cut paper, torn bottom, glued flat */
.clip { rotate: var(--tilt, 0deg); filter: drop-shadow(0 2px 1px rgb(0 0 0 / .22)) drop-shadow(0 9px 12px rgb(0 0 0 / .16)); }
.paper { position: relative; background: #f6efe0; color: var(--ink); padding: 12px 12px 20px; clip-path: polygon(0 .7%, 31% 0, 68% .5%, 99.4% 0, 100% 52%, 99.6% 97.6%, 94% 98.8%, 90% 97.4%, 84% 99.6%, 77% 98.1%, 71% 99.8%, 66% 98.4%, 58% 100%, 51% 98.2%, 45% 99.3%, 38% 97.8%, 31% 99.7%, 24% 98.3%, 17% 99.9%, 11% 98%, 5% 99.2%, .4% 97.9%, 0 46%); }
.paper::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; mix-blend-mode: multiply; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.print { overflow: hidden; aspect-ratio: var(--ratio); }
.print img { width: 100%; height: 100%; object-fit: cover; }
.clip figcaption { font: 400 13.5px/1.4 var(--text); letter-spacing: .01em; border-top: 1px solid rgb(47 23 8 / .35); margin-top: 9px; padding-top: 6px; }
.js .clip.reveal { opacity: 0; translate: 0 -22px; scale: 1.04; transform: none; transition: opacity .45s ease, translate .55s cubic-bezier(.2, .8, .2, 1), scale .55s cubic-bezier(.2, .8, .2, 1); }
.js .clip.reveal.in { opacity: 1; translate: 0 0; scale: 1; }

/* 4 · The kitchen: two ideas in words, then a slow ribbon of dishes */
.dishes { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 56px; padding: 0 0 88px; }
.kitchen-head { display: grid; justify-items: center; gap: 28px; text-align: center; padding: 56px var(--pad) 0; }
.kitchen-head::before { content: ""; width: 120px; border-top: 4px double #d9cdb8; } /* double rule, as on the printed menu */
.kitchen-head h2 { font-size: 22px; letter-spacing: .24em; color: var(--olive); }
.creed { text-align: center; padding: 0 var(--pad); }
.creed h3 { font: 700 64px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--leather); margin-bottom: 16px; }
/* Four key words, set like a line of the printed menu. Two columns on phones, one line with dots from tablet up */
.keywords { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 12px 36px; font-size: 14px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--olive); }
.keywords::before { content: ""; grid-column: 1 / -1; justify-self: center; width: 56px; border-top: 1px solid #d9cdb8; margin-bottom: 8px; }
.ribbon { justify-self: stretch; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: end; gap: 12px; }
.ribbon-track { justify-self: stretch; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.ribbon-track::-webkit-scrollbar { display: none; }
.ribbon-track:focus-visible { outline-offset: -3px; }
.ribbon-track li { flex: none; height: 210px; aspect-ratio: var(--ratio, 1); overflow: hidden; }
.ribbon-track img { width: 100%; height: 100%; object-fit: cover; }
.kitchen-end { display: grid; justify-items: center; padding-top: 28px; }
.btn-leather { background: var(--leather); color: var(--cream); }
.js .dishes .reveal { transform: none; transition: opacity 1s ease; }
.frame { overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* A long word must shrink inside its column (see nav.js), never widen the page */
.hero, .takeaway, .tonino, .location { grid-template-columns: minmax(0, 1fr); }
.section-head { min-width: 0; }
/* company details, required on the site */
.foot-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; font-size: 12px; line-height: 1.6; opacity: .85; }
@media (min-width: 880px) { .foot-legal { grid-column: 1 / -1; justify-self: stretch; justify-content: flex-start; } }
/* very narrow phones: long keywords in some languages need tighter spacing */
@media (max-width: 359px) { .keywords { letter-spacing: .06em; column-gap: 16px; } }
.hero-copy, .takeaway-words, .tonino-words, .philosophy-words { min-width: 0; }

/* Pause / play: square, discreet, icon only */
.motion-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid currentColor; cursor: pointer; }
.motion-toggle::before { content: ""; box-sizing: border-box; width: 11px; height: 13px; border-inline: 3px solid currentColor; }
.motion-toggle[data-state="paused"]::before { width: 0; height: 0; border-block: 7px solid transparent; border-right: 0; border-left: 12px solid currentColor; }
.film .motion-toggle { position: absolute; z-index: 1; right: 12px; top: 12px; color: var(--cream); background: rgb(0 0 0 / .45); }
.ribbon .motion-toggle { margin-right: var(--pad); color: var(--olive); background: none; }
/* footer links big enough to tap */
.site-foot a { display: inline-block; min-height: 32px; padding-block: 5px; }

.takeaway .takeaway-note { max-width: 40ch; margin: 14px auto 20px; font-size: 14px; font-weight: 700; line-height: 1.5; text-wrap: balance; }

/* Takeaway, on sand: words, then one large photo reaching the edges */
.takeaway { display: grid; background: var(--sand); color: var(--ink); text-align: center; }
.takeaway-words { padding: 80px var(--pad) 48px; }
.takeaway-pre { font: 600 24px/1.2 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--leather); margin-bottom: 10px; }
.takeaway h2 { font-size: clamp(56px, 15vw, 112px); color: var(--olive); line-height: .96; margin-bottom: 18px; }
.takeaway h2 span { display: block; }
.takeaway-text { max-width: 34ch; margin: 0 auto 28px; font-size: 18px; font-weight: 300; }
.takeaway-photo { margin: 0; min-height: 0; }
.takeaway-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 70%; }

/* 5 · Location gallery */
.location { background: var(--olive); color: var(--cream); padding: 80px 0 72px; display: grid; gap: 34px; }
.location .section-head h2 { color: var(--cream); }
/* Phones: a slider, one large photo at a time with a slice of the next one */
.room-gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 var(--pad); scroll-padding-inline: var(--pad); }
.room-gallery::-webkit-scrollbar { display: none; }
.room-gallery li { flex: 0 0 calc(100% - 26px); min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.js .room-gallery li.reveal { opacity: 1; translate: none; transform: none; }
.room-gallery figure { margin: 0; }
.room-gallery .frame { aspect-ratio: 4 / 5; max-height: 70svh; width: 100%; }
/* Where you are: one square segment per photo */
.gallery-dots { display: flex; gap: 6px; padding: 0 var(--pad); margin-top: -16px; }
.gallery-dots i { flex: 1; height: 3px; background: rgb(255 250 245 / .28); transition: background-color .25s; }
.gallery-dots i.on { background: var(--yellow); }

/* 6 · Tonino, wine colour */
.tonino { background: var(--wine); color: var(--cream); display: grid; gap: 44px; padding: 84px var(--pad) 88px; }
.tonino-words { text-align: center; }
.tonino-pre { font: 600 26px/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--yellow); margin-bottom: 6px; }
.tonino h2 { font-size: clamp(96px, 26vw, 190px); letter-spacing: .05em; margin-bottom: 16px; }
.tonino-words > p:not(.tonino-pre, .tonino-seats) { max-width: 36ch; margin-inline: auto; font-size: 19px; font-weight: 300; }
/* The one practical fact about the room, set between two thin double rules */
.tonino-seats { display: table; margin: 24px auto 0; padding: 10px 22px; border-block: 4px double rgb(255 250 245 / .4); font: 700 24px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
/* Tonino slider: one photo at a time, no autoplay; arrows for mouse and keyboard */
.tonino-slider { justify-self: center; width: min(960px, 100%, (100svh - 230px) * 4 / 3); min-width: min(100%, 300px); }
.tonino-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.tonino-track::-webkit-scrollbar { display: none; }
.tonino-track:focus-visible { outline-offset: -3px; }
.tonino-track li { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.tonino-track figure { margin: 0; }
.tonino-track img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.tonino-controls { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 12px; }
.tonino-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--cream); background: none; border: 1px solid rgb(255 250 245 / .65); cursor: pointer; }
.tonino-arrow::before { content: ""; width: 9px; height: 9px; border-top: 2px solid; border-left: 2px solid; rotate: -45deg; translate: 2px 0; }
.tonino-arrow.next::before { rotate: 135deg; translate: -2px 0; }
.tonino-arrow:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.tonino-dots { display: flex; gap: 6px; }
.tonino-dots i { flex: 1; height: 3px; background: rgb(255 250 245 / .28); transition: background-color .25s; }
.tonino-dots i.on { background: var(--yellow); }
.tonino-ai { max-width: 52ch; margin: 14px auto 0; font-size: 13px; line-height: 1.5; text-align: center; text-wrap: balance; }
.tonino-cta { justify-self: center; }

/* 7 · Footer */
.site-foot { background: var(--olive); color: var(--cream); display: grid; gap: 30px; text-align: center; justify-items: center; padding: 64px var(--pad) 120px; }
.foot-brand { display: grid; justify-items: center; gap: 10px; }
.foot-brand p { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.site-foot h3 { font-size: 22px; letter-spacing: .12em; color: var(--yellow); margin-bottom: 8px; }
.site-foot address { font-style: normal; }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 22px; row-gap: 4px; max-width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* Colour rhythm: green and brown take turns down the page */
.philosophy h2 .year { color: var(--leather); }
.location { background: var(--forest); }
.site-foot { background: var(--ink); }

@media (min-width: 880px) {
  .hero { min-height: max(560px, calc(100svh - var(--nav-h))); }
  .film::after { background: linear-gradient(to right, rgb(20 17 8 / .86) 0, rgb(20 17 8 / .62) 36%, rgb(20 17 8 / 0) 66%), linear-gradient(to top, rgb(20 17 8 / .5), rgb(20 17 8 / 0) 45%); }
  .hero-copy { padding-bottom: 80px; }
  .dishes { gap: 72px; padding-bottom: 112px; }
  .kitchen-head { padding-top: 88px; }
  .creed h3 { font-size: 92px; }
  .keywords { grid-template-columns: repeat(4, max-content); gap: 12px 0; font-size: 15px; }
  .keywords::before { margin-bottom: 14px; }
  .keywords li + li::before { content: "·"; padding: 0 20px; color: var(--leather); }
  .ribbon-track { gap: 16px; }
  .ribbon-track li { height: 460px; }
  .philosophy .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 480px) minmax(0, 1fr); grid-template-areas: "words words words" "sea memory land"; align-items: center; gap: 48px 40px; padding-block: 112px; }
  .philosophy-words { justify-self: center; }
  .memory { margin: 0; padding: 48px 40px 56px; }
  .art { height: auto; width: 100%; max-height: 340px; max-width: 320px; }
  .art-sea, .art-land { justify-self: center; }
  /* text starts in the middle and makes room on the left while the photo rises on the right */
  .scrolly .stage { display: block; padding: 0; }
  .scrolly .philosophy-words { left: 0; right: auto; top: 50%; width: 46vw; max-width: 640px; margin: 0; translate: calc((1 - var(--q)) * (50vw - 50%) + var(--q) * 5vw) -50%; opacity: 1; }
  .scrolly .memory { left: 54%; right: 4vw; padding: 24px 0; background: none; translate: 0 calc((1 - var(--q)) * 102%); }
  .scrolly .memory::before { content: ""; position: absolute; inset: 5svh 4%; z-index: -1; background: var(--cream) url("../assets/tovaglia.webp") center / 760px; }
  .scrolly .art-sea { height: 78svh; left: -7vw; top: auto; bottom: -4svh; translate: 0 calc((.5 - var(--p)) * 200px); }
  .scrolly .art-land { height: 82svh; right: -3vw; bottom: auto; top: 2svh; translate: 0 calc((.5 - var(--p)) * 360px); }
  .scrolly .memory .clip { width: min(28vw, 440px, calc((100svh - 294px) * .68)); }
  .takeaway { grid-template-columns: 1fr 1fr; height: clamp(600px, calc(100svh - var(--nav-h)), 820px); }
  .takeaway-words { align-self: center; padding-block: 48px; }
  .takeaway-photo { height: 100%; overflow: hidden; }
  .takeaway-photo img { height: 100%; aspect-ratio: auto; object-position: 50% 68%; }
  .location { padding-block: 112px; }
  /* One gallery in two rows: widths follow each photo's shape, so every row has a single height */
  .room-gallery { display: flex; flex-wrap: wrap; gap: 16px; overflow: visible; max-width: 1360px; width: 100%; margin-inline: auto; }
  .room-gallery li { flex: 0 0 auto; width: calc((100% - 32px) * var(--w)); }
  .room-gallery figure, .room-gallery .frame { height: auto; }
  .room-gallery .frame { aspect-ratio: var(--r); max-height: none; }
  .gallery-dots { display: none; }
  .tonino { gap: 52px; padding-block: 112px; }
  .site-foot { grid-template-columns: 1.4fr 1fr 1fr 1fr; text-align: left; justify-items: start; align-items: start; padding-bottom: 56px; }
  .foot-brand { justify-items: start; }
  .site-foot nav { grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid rgb(255 250 245 / .25); padding-top: 22px; justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .js .clip.reveal { opacity: 1; translate: 0 0; scale: 1; }
}

/* Photos show as soon as they arrive: no fade or drop on the blocks that hold them */
.js .takeaway-photo.reveal, .js .tonino-slider.reveal, .js .clip.reveal { opacity: 1; translate: none; scale: 1; transform: none; transition: none; }
