/* Colours are variables so the gallery can turn dark. */
:root { --paper:#f7f3ec; --band:#efe8dc; --ink:#1f1d1a; --soft:#6d675e; --line:#ddd5c7; --accent:#8a3b22; --serif:"Iowan Old Style", Palatino, Georgia, serif; }
body.dark { --paper:#151311; --band:#1d1a17; --ink:#f1ece3; --soft:#a69f93; --line:#332e28; --accent:#d9906f; color-scheme:dark; }
* { box-sizing:border-box; margin:0; padding:0; }
[hidden] { display:none !important; }
html { scroll-behavior:smooth; }
body { background:var(--paper); color:var(--ink); font:17px/1.65 -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { font-family:var(--serif); font-weight:400; line-height:1.12; }
a { color:inherit; }
img { max-width:100%; }
img { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; -webkit-user-drag:none; }
.wrap { max-width:1160px; margin:0 auto; padding-left:28px; padding-right:28px; }

header { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:10px; padding-top:18px; padding-bottom:18px; }
/* The header stays at the top while scrolling, with its background running the full width. */
header.wrap { position:sticky; top:0; z-index:10; width:100%; max-width:none; padding-left:max(28px, calc((100% - 1104px) / 2)); padding-right:max(28px, calc((100% - 1104px) / 2)); background:var(--paper); }
.name { font:24px var(--serif); text-decoration:none; }
nav { display:flex; flex-wrap:wrap; gap:6px 26px; }
nav a { font-size:13px; letter-spacing:.12em; text-transform:uppercase; text-decoration:none; color:var(--soft); border-bottom:1px solid transparent; padding-bottom:2px; }
nav a:hover { color:var(--accent); }
nav a[aria-current] { color:var(--ink); border-color:var(--accent); }

.eyebrow { display:block; font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); margin-bottom:14px; }
.button { display:inline-block; border:1px solid currentColor; padding:11px 22px; text-decoration:none; font-size:14px; }
.button.solid { background:var(--ink); border-color:var(--ink); color:var(--paper); }
.button:hover { border-color:var(--accent); color:var(--accent); }
.button.solid:hover { background:var(--accent); color:#fff; }
.photo { display:block; width:100%; height:auto; border-radius:3px; }
.photo.empty { aspect-ratio:1; background:var(--band); display:grid; place-items:center; color:var(--soft); }

/* Home */
.hero { display:grid; grid-template-columns:1.15fr .85fr; gap:64px; align-items:center; padding-top:28px; padding-bottom:64px; }
.hero h1 { font-size:clamp(40px, 5.4vw, 66px); margin-bottom:36px; }
.actions { display:flex; flex-wrap:wrap; gap:12px; }
.heroimage .photo { aspect-ratio:1; object-fit:cover; max-width:480px; margin-left:auto; }
section { padding-top:80px; padding-bottom:80px; }
.heading { display:flex; justify-content:space-between; align-items:baseline; gap:16px; border-top:1px solid var(--line); padding-top:24px; margin-bottom:32px; }
.heading h2 { font-size:34px; }
.heading a { font-size:14px; color:var(--soft); white-space:nowrap; }
/* One large dish beside four smaller ones. */
.feature { display:grid; grid-template-columns:2fr 1fr 1fr; gap:20px; }
.feature a { position:relative; display:block; text-decoration:none; overflow:hidden; border-radius:3px; }
.feature a:first-child { grid-row:span 2; }
.feature .photo { height:100%; aspect-ratio:1; object-fit:cover; transition:transform .4s; }
.feature a:hover .photo { transform:scale(1.03); }
.feature span { position:absolute; left:0; right:0; top:0; padding:12px 16px 36px; color:#fff; font:18px/1.25 var(--serif); background:linear-gradient(rgba(0,0,0,.65), transparent); }
.band { background:var(--band); }
.about { display:grid; grid-template-columns:1fr 1.7fr; gap:64px; align-items:start; }
.portrait { margin:0 0 40px; }
.portrait img { width:100%; aspect-ratio:4/5; object-fit:cover; display:block; }
.portrait figcaption { font-size:14px; opacity:.7; margin-top:8px; }
.about h2 { font-size:34px; margin-bottom:24px; }
.bio p { font:21px/1.6 var(--serif); }
.bio p + p { margin-top:20px; }
.education div { border-top:1px solid var(--line); padding:14px 0; }
.education dt { font:19px var(--serif); }
.education dd { color:var(--soft); font-size:15px; }
.contact { margin-top:24px; }
.strip { display:flex; gap:12px; }
.strip a { flex:1; }
.strip .photo { height:260px; object-fit:cover; }

/* Writing */
.stories { display:grid; grid-template-columns:repeat(2, 1fr); gap:32px; }
.story { display:flex; flex-direction:column; gap:20px; text-decoration:none; }
.story .photo { aspect-ratio:3/2; object-fit:cover; }
.story.textonly { background:var(--band); border-radius:3px; padding:40px; justify-content:center; }
.band .story.textonly { background:var(--paper); }
.story h3 { font-size:27px; margin-bottom:10px; }
.story:hover h3 { color:var(--accent); }
.story p { color:var(--soft); font-size:15px; }

/* Page titles */
.intro { padding-top:40px; padding-bottom:48px; }
.intro h1 { font-size:clamp(40px, 5vw, 60px); }
.intro p { color:var(--soft); margin-top:8px; }
.last { padding-bottom:96px; }

/* Dishes: compact cards, four across. */
.dishes { list-style:none; display:grid; grid-template-columns:repeat(4, 1fr); gap:40px 22px; padding-bottom:80px; }
.dishes a { display:block; text-decoration:none; }
.dishes .photo { aspect-ratio:4/5; object-fit:cover; }
.dishes h2 { font-size:20px; margin:14px 0 4px; }
.dishes a:hover h2 { color:var(--accent); }
.dishes p { color:var(--soft); font-size:14px; line-height:1.5; }

.detail { max-width:776px; padding-top:20px; padding-bottom:80px; }
.detail .photo { width:auto; max-width:min(100%, 520px); max-height:clamp(280px, calc(100vh - 275px), 70vh); margin:0 auto 32px; }
.detail h1, .post h1 { font-size:clamp(32px, 4.4vw, 52px); margin-bottom:16px; }
.pager { display:flex; justify-content:space-between; gap:24px; border-top:1px solid var(--line); margin-top:48px; padding-top:20px; font-size:15px; }
.pager a:last-child { text-align:right; }
.post { max-width:776px; padding-top:48px; padding-bottom:96px; }
.lead { font-size:20px; color:var(--soft); margin-bottom:24px; }
article p { margin-bottom:18px; }
article h2 { font-size:28px; margin:34px 0 12px; }

/* Gallery */
.filters { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.filters button { font:14px inherit; font-family:inherit; color:var(--soft); background:none; border:1px solid var(--line); border-radius:99px; padding:7px 20px; cursor:pointer; }
.filters button[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:var(--paper); }
.wall { columns:3; column-gap:16px; padding-bottom:80px; }
.wall figure { break-inside:avoid; margin-bottom:24px; }
.wall a { display:block; cursor:zoom-in; }
figcaption { color:var(--soft); font-size:14px; line-height:1.45; margin-top:8px; }
figcaption span { display:block; }
figcaption span:first-child:not(.tag) { color:var(--ink); }
.tag { display:block; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--soft); margin-top:3px; }
.filters + .filters { margin-top:10px; }
.filters[data-group="place"] button { font-size:13px; padding:4px 14px; }
.filters button:disabled { opacity:.35; cursor:default; }
.dishes .tag { margin-top:6px; }
.detail .tag { margin:-6px 0 18px; }
.detail .photo.zoom { cursor:zoom-in; }
/* Dishes and Gallery: filter buttons first, then the slideshow. */
.topfilters { width:100%; padding-bottom:12px; }
.topfilters .filters { margin-top:0; justify-content:center; }
.topfilters .filters + .filters { margin-top:8px; }
.topfilters .filters button { padding:4px 14px; font-size:13px; }
body.dark { --above:325px; }
/* On phones each row of buttons scrolls sideways, so the photo stays in view. */
@media (max-width:600px) {
  .topfilters .filters { flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; }
  .topfilters .filters button { flex:none; }
}
/* Slideshow on the Dishes and Gallery pages. */
.slideshow { padding-top:0; padding-bottom:0; width:100%; text-align:center; }
.slideshow .screen { position:relative; display:block; width:100%; height:clamp(160px, calc(100vh - var(--above, 290px)), 640px); border:0; border-radius:6px; overflow:hidden; background:var(--band); cursor:zoom-in; touch-action:pan-y pinch-zoom; }
.screen span { position:absolute; inset:0; opacity:0; transition:opacity 1.1s ease; }
.screen span.on { opacity:1; }
.screen img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; transform:scale(.96); transition:transform 5s ease-out; }
.screen span.on img { transform:none; }
.screen img.back { object-fit:cover; filter:blur(28px) brightness(.45); transform:scale(1.15); }
.screen span.on img.back { transform:scale(1.15); }
.slideshow p { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; height:2.8em; margin-top:8px; font:18px/1.4 var(--serif); }
@media (max-width:600px) { .slideshow p { font-size:15px; } }
.controls { display:flex; justify-content:center; gap:10px; margin-top:8px; }
.controls button { min-width:44px; height:34px; padding:0 14px; font:14px -apple-system, "Segoe UI", sans-serif; color:var(--soft); background:none; border:1px solid var(--line); border-radius:99px; cursor:pointer; }
.controls button:hover { color:var(--ink); border-color:var(--ink); }
@media (prefers-reduced-motion:reduce) { .screen span, .screen img { transition:none; } }

/* Carousel: the current photo in the middle, its neighbours smaller and dimmed either side. */
.viewer { width:100vw; height:100vh; height:100dvh; max-width:none; max-height:none; border:0; overflow:hidden; background:rgba(12,11,10,.97); color:#f1ece3; padding:60px 0 20px; }
.viewer[open] { display:flex; flex-direction:column; align-items:center; gap:14px; animation:viewer-in .35s ease-out; }
@keyframes viewer-in { from { opacity:0; transform:scale(.97); } }
.stage { position:relative; flex:1; width:100%; min-height:0; touch-action:pan-y pinch-zoom; }
.viewer.zoomed .stage { touch-action:auto; }
.stage figure { position:absolute; top:0; bottom:0; left:19%; width:62%; display:flex; align-items:center; justify-content:center; cursor:pointer; pointer-events:none; transform:translateX(calc(var(--at) * 78%)) scale(.72); opacity:0; transition:transform .65s cubic-bezier(.22,.8,.24,1), opacity .65s, filter .65s; }
.stage figure[data-far="0"] { z-index:2; opacity:1; transform:none; cursor:default; }
.stage figure[data-far="1"] { z-index:1; opacity:.45; filter:brightness(.7) blur(1px); }
.stage img { max-width:100%; max-height:100%; border-radius:6px; box-shadow:0 18px 60px rgba(0,0,0,.55); }
.stage figure[data-far="0"] img, .stage figure[data-far="1"] img { pointer-events:auto; }
.words { text-align:center; padding:0 20px; font:18px/1.4 var(--serif); }
.words a { display:inline-block; margin-top:4px; font:14px -apple-system, "Segoe UI", sans-serif; }
.words span { display:block; margin-top:4px; font:12px -apple-system, "Segoe UI", sans-serif; letter-spacing:.14em; opacity:.6; }
.viewer button { position:absolute; z-index:3; background:rgba(0,0,0,.5); border:0; border-radius:99px; color:#fff; width:44px; height:44px; font-size:26px; line-height:1; cursor:pointer; }
.viewer button:hover { background:rgba(255,255,255,.2); }
.viewer [data-step="-1"] { left:12px; top:50%; }
.viewer [data-step="1"] { right:12px; top:50%; }
.viewer [data-close] { right:12px; top:12px; }
@media (max-width:600px) { .stage figure { left:6%; width:88%; } }
/* Phones swipe, so the arrows are taken off the photo. They stay available to screen readers. */
@media (max-width:600px), (pointer:coarse) and (max-height:500px) { .viewer [data-step] { opacity:0; pointer-events:none; } }
@media (prefers-reduced-motion:reduce) { .viewer[open] { animation:none; } .stage figure { transition:none; } }

/* The footer stays at the bottom of the window. On short pages the content stretches to meet it. */
body { display:flex; flex-direction:column; min-height:100vh; min-height:100dvh; }
main { flex:1 0 auto; }
footer { position:sticky; bottom:0; z-index:10; border-top:1px solid var(--line); background:var(--paper); padding:10px 0; color:var(--soft); font-size:13px; }
footer .wrap { display:flex; flex-wrap:wrap; justify-content:space-between; gap:2px 20px; width:100%; }

@media (max-width:900px) {
  .hero, .about { grid-template-columns:1fr; gap:36px; }
  .hero { padding-bottom:56px; }
  .hero h1 { margin-bottom:24px; }
  .heroimage { order:-1; }
  .heroimage .photo { margin:0 auto; }
  section { padding-top:48px; padding-bottom:48px; }
  .feature { grid-template-columns:1fr 1fr; gap:10px; }
  .feature a:first-child { grid-column:span 2; grid-row:auto; }
  .stories { grid-template-columns:1fr; }
  .dishes { grid-template-columns:repeat(3, 1fr); gap:28px 14px; }
  .dishes h2 { font-size:17px; }
  .dishes p { font-size:13px; }
  .wall { columns:2; column-gap:10px; }
  .strip { flex-wrap:wrap; gap:10px; }
  .strip a { flex:1 1 40%; }
  .strip .photo { height:170px; }
}
@media (max-width:600px) {
  .dishes { grid-template-columns:1fr 1fr; gap:24px 12px; }
}
@media (max-width:520px) {
  .wrap, header.wrap { padding-left:20px; padding-right:20px; }
  header.wrap { gap:4px; padding-top:12px; padding-bottom:12px; }
  nav { gap:6px 15px; }
  nav a { font-size:12px; letter-spacing:.06em; }
  .feature span { font-size:15px; padding:8px 10px 28px; }
  .bio p { font-size:19px; }
  figcaption { font-size:12px; }
  .tag { font-size:10px; letter-spacing:.06em; }
}

.winelist section { margin:0 0 40px; padding:0; }
.winelist h2 { font-size:28px; margin-bottom:12px; }
.winelist ul { list-style:none; padding:0; margin:0; }
.winelist li { border-top:1px solid var(--line); padding:14px 0; display:grid; grid-template-columns:1fr auto; gap:2px 16px; }
.winelist .wname { font:19px var(--serif); }
.winelist .wvint { color:var(--soft); font-size:15px; text-align:right; }
.winelist .wgrape, .winelist .wnote { grid-column:1 / -1; color:var(--soft); font-size:15px; }
