:root {
  --sea-wash: #f2f5f4;
  --bark: #3a2216;
  --brown: #804024;
  --sea: #338293;
  --sand: #e8dfd2;
  --white: #ffffff;
  --wall: #b6b5b1;

  --sans: "Commissioner", "Helvetica Neue", Arial, sans-serif;
  --serif: "Literata", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 36rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--sea-wash);
  color: var(--bark);
  font: 400 1.0625rem/1.75 var(--serif);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--sea); text-underline-offset: 0.2em; }
a:hover { color: var(--brown); }

:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--brown);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 2.5rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "logo text"
    "trio trio";
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) 0;
}

.hero-logo {
  grid-area: logo;
  width: 100%;
  max-width: 26rem;
  justify-self: center;
}

.hero-text { grid-area: text; }

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.5rem);
  max-width: 14ch;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.hero-text > p {
  max-width: var(--measure);
  margin: 0 0 1.1rem;
}

.hero-text > p:last-of-type { margin-bottom: 2rem; }

.hero .eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--sea);
  margin-bottom: 0.75rem;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-family: var(--sans);
  font-size: 1.05rem;
}

.hero-nav a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1em;
}

.trio {
  grid-area: trio;
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.8fr;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  margin-top: 1rem;
}

.trio img {
  width: 100%;
  height: clamp(14rem, 34vw, 26rem);
  object-fit: cover;
  border-radius: 999px 999px 0.5rem 0.5rem;
}

/* Story timeline */

.story {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) 2rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 clamp(4.5rem, 14vw, 9rem);
  position: relative;
}

/* the sea wave from the logo, running down the page */
.timeline::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0;
  left: clamp(1.4rem, 5vw, 3.4rem);
  width: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='48' viewBox='0 0 18 48'%3E%3Cpath d='M9 0 C17 12 17 12 9 24 C1 36 1 36 9 48' fill='none' stroke='%23338293' stroke-width='2'/%3E%3C/svg%3E") repeat-y;
  opacity: 0.55;
}

.timeline li {
  position: relative;
  padding-bottom: 3rem;
}

.timeline h3,
.ingredients h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 400;
  margin-bottom: 0.9rem;
}

.timeline p {
  max-width: var(--measure);
  margin: 0 0 1rem;
}

.year {
  position: absolute;
  right: calc(100% + clamp(0.75rem, 4vw, 2.5rem));
  top: 0.15rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  color: var(--brown);
  background: var(--sea-wash);
  padding: 0.2rem 0;
  line-height: 1.2;
  width: clamp(3.6rem, 10vw, 6.5rem);
  text-align: right;
  hyphens: none;
}

.aside {
  margin: 1.75rem 0 0;
  max-width: 26rem;
}

.aside img {
  border-radius: 0.5rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* archive photos: small originals, shown at their natural ratio */
.archive img {
  aspect-ratio: auto;
  filter: sepia(0.15);
  box-shadow: 0 1px 0 var(--sand), 0 0.6rem 1.4rem -0.8rem rgb(58 34 22 / 0.45);
}

figcaption {
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 0.6rem;
  color: var(--brown);
}

/* Host */

.host {
  background: var(--sand);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: 76rem;
  margin: clamp(2rem, 5vw, 4rem) auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  border-radius: 0.75rem;
}

.host-photo {
  width: 100%;
  max-width: 20rem;
  justify-self: center;
  border-radius: 999px 999px 0.5rem 0.5rem;
}

.host h2 { margin-bottom: 1.5rem; }

.host-text > p { max-width: var(--measure); margin: 0 0 2rem; }

.quote { margin: 0; max-width: var(--measure); }

.quote blockquote {
  margin: 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--sea);
  font-style: italic;
  font-size: 1.15rem;
}

.quote blockquote p { margin: 0; }
.quote blockquote p::before { content: "«"; }
.quote blockquote p::after { content: "»"; }

.quote figcaption {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  padding-left: 1.25rem;
  margin-top: 0.9rem;
}

/* Ingredients */

.ingredients {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) 1rem;
}

.ingredients article {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.ingredients article:nth-of-type(even) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.ingredients article:nth-of-type(even) img { order: 2; }

.ingredients img {
  width: 100%;
  max-width: 24rem;
  justify-self: center;
  border-radius: 0.5rem;
}

.ingredients p { margin: 0; max-width: var(--measure); }

/* Gallery */

.gallery {
  max-width: 76rem;
  margin: 0 auto;
  padding: 3rem var(--gutter) clamp(4rem, 9vw, 7rem);
}

.gallery h2 { margin-bottom: 0.75rem; }

.gallery-intro {
  max-width: var(--measure);
  margin: 0 0 2.5rem;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3 16rem;
  column-gap: 1.25rem;
}

.grid li {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.grid button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--sand);
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: zoom-in;
}

.grid img {
  width: 100%;
  transition: transform 0.4s ease;
}

.grid button:hover img { transform: scale(1.03); }

.grid span {
  display: block;
  font-family: var(--sans);
  font-size: 1rem;
  margin-top: 0.55rem;
}

@media (prefers-reduced-motion: reduce) {
  .grid img { transition: none; }
}

/* Featured dish: the pinsa leads the gallery */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: end;
  margin: 0 0 2.5rem;
}

.featured button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--sand);
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: zoom-in;
}

.featured img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured button:hover img { transform: scale(1.02); }

.featured figcaption {
  font-style: normal;
  color: var(--bark);
  border-top: 3px solid var(--sea);
  padding-top: 1rem;
}

.featured figcaption span {
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  color: var(--brown);
  line-height: 1.1;
}

.featured figcaption em {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
  .featured img { transition: none; }
}

/* Lightbox */

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 70rem);
  max-height: 92vh;
  overflow: visible;
}

.lightbox::backdrop { background: rgb(42 24 15 / 0.88); }

.lightbox img {
  max-height: 82vh;
  width: auto;
  margin: 0 auto;
  border-radius: 0.5rem;
}

.lightbox-caption {
  font-family: var(--sans);
  color: var(--white);
  text-align: center;
  margin: 0.75rem 0 0;
}

.lightbox .close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  background: var(--white);
  color: var(--bark);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* Visit */

/* matches the grey wall behind the sign in time-to-relax.jpg */
.visit {
  background: var(--wall);
  border-top: 6px solid var(--sea);
}

.visit a { color: var(--bark); }
.visit a:hover { color: var(--brown); }

.visit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
}

.visit-sign {
  width: 100%;
  max-width: 30rem;
  justify-self: end;
}

.visit h2 { margin-bottom: 1.5rem; }

.visit dl { margin: 0 0 2.5rem; }

.visit dt {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--brown);
  margin-top: 1.1rem;
}

.visit dd { margin: 0.1rem 0 0; }

.small { font-size: 0.9rem; margin: 0; }

.season { font-weight: 400; }

.hours {
  border-collapse: collapse;
  margin-top: 0.3rem;
}

.hours th,
.hours td {
  text-align: left;
  font-weight: 400;
  padding: 0.15rem 1.5rem 0.15rem 0;
  font-variant-numeric: tabular-nums;
}

.hours .closed { color: var(--brown); font-style: italic; }

.note { font-size: 0.95rem; margin: 0.6rem 0 0; }

/* Narrow screens */

@media (max-width: 52rem) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "logo" "text" "trio";
    text-align: center;
  }
  .hero-logo { max-width: 16rem; }
  .hero h1, .hero-text > p { margin-inline: auto; }
  .hero-text > p:not(.eyebrow) { text-align: left; }
  .hero-nav { justify-content: center; }

  .visit,
  .host,
  .featured,
  .ingredients article,
  .ingredients article:nth-of-type(even) { grid-template-columns: 1fr; }
  .ingredients article:nth-of-type(even) img { order: 0; }
  .host { border-radius: 0; }
  .visit-sign { justify-self: start; }
}

@media (max-width: 34rem) {
  .trio { grid-template-columns: 1fr 1fr; }
  .trio img:last-child { display: none; }
}
