/* Montecorboli: food, art and hospitality in Tuscany

   Look: closer to Tilly's printed menus. Warm paper, a light Garamond for
   reading, condensed capitals for titles, hairline rules and a "~" between
   courses. One quiet terracotta accent; the brief's four colours survive
   only as small markers for Eat / Stay / Host / Art. */

:root {
  --paper: #FAF7F1;
  --paper-2: #F3EDE3;
  --ink: #3F3731;          /* headings */
  --text: #5E544C;         /* body, the menus' warm grey-brown */
  --muted: #8A7F75;
  --rule: #B9AEA3;         /* hairlines */
  --rule-soft: rgba(94, 84, 76, 0.18);

  --accent: #A65A3A;       /* softened terracotta */
  --accent-dark: #874629;
  --eat: #A65A3A;
  --stay: #6E7450;
  --host: #B08A3E;
  --art: #5A7280;

  --serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --caps: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 5vw, 48px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 4px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Titles: condensed capitals, like "SAMPLE MENU ONE" */
h1, h2 {
  font-family: var(--caps);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }

/* Sub-heads: like the dish names, bold condensed caps */
h3, h4 {
  font-family: var(--caps);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--ink);
  font-size: 1.15rem;
  margin: 0 0 0.3em;
}

p { margin: 0 0 1em; max-width: 62ch; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Small-caps label, like "ANTIPASTO" */
.eyebrow {
  font-family: var(--serif);
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 0.4em;
}

.lede { font-size: 1.2rem; }

/* The "~" between courses */
.tilde {
  display: block;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--rule);
  margin: 0.4em 0 0.6em;
}
.tilde::before { content: "~"; }

/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule-soft);
}

.site-header .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 26px;
  padding-bottom: 16px;
}

/* Wordmark between two hairlines, as on the menu cards */
.logo {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
  padding: 8px 4px 6px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.logo:hover { color: var(--ink); }
.logo span { display: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-family: var(--caps);
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav .btn { padding: 4px 0; background: none; border: 0; border-bottom: 1px solid transparent; color: var(--accent); }
.nav .btn:hover, .nav .btn[aria-current="page"] { background: none; color: var(--accent-dark); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-family: var(--caps);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
}

/* ---------- Buttons: plain, framed by a hairline ---------- */

.btn {
  display: inline-block;
  font-family: var(--caps);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 26px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.ghost { border-color: var(--rule); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Sections ---------- */

section { padding: clamp(56px, 8vw, 104px) 0; }
.panel { background: var(--paper-2); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }

/* ---------- Forms ---------- */

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
  margin-top: 8px;
}
.form .full { grid-column: 1 / -1; }
.form label {
  display: block;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.1em;
  font-size: 1.02rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.form input, .form select, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 11px 13px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 1px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: 40px;
}
.site-footer h4 { font-weight: 500; font-size: 0.95rem; letter-spacing: 0.14em; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { text-decoration: none; }
.site-footer .logo { font-size: 1.35rem; display: inline-block; margin-bottom: 14px; }
.newsletter { display: flex; gap: 8px; margin-top: 10px; }
.newsletter input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.newsletter .btn { padding: 9px 16px; font-size: 0.9rem; }
.footer-base {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--caps);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.footer-base > span + span::before { content: "|"; margin-right: 14px; color: var(--rule); }

/* ---------- Reveal on scroll (kept very gentle) ---------- */

.reveal { opacity: 0; transition: opacity 0.9s ease; }
.reveal.in { opacity: 1; }

/* =========================================================
   Home
   ========================================================= */

/* 1. Carousel */

.carousel { padding: clamp(24px, 4vw, 44px) 0 0; }
.carousel .frame {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 3 / 2;
  max-height: 72vh;
  overflow: hidden;
  background: var(--paper-2);
}
.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.slide.on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-bar {
  max-width: 900px;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.carousel-caption { font-style: italic; color: var(--muted); margin: 0; min-height: 1.6em; }
.carousel-controls { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.carousel-controls button {
  background: none;
  border: 0;
  padding: 4px 6px;
  font: inherit;
  font-size: 1.2rem;
  color: var(--muted);
  cursor: pointer;
}
.carousel-controls button:hover { color: var(--accent); }
.dots { display: flex; gap: 8px; }
.dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: transparent;
}
.dots button[aria-current="true"] { background: var(--muted); }

/* 2. A note from the host */

.host-note { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); text-align: center; }
.host-note .letter { max-width: 620px; margin: 0 auto; }
.host-note .letter p {
  max-width: none;
  font-size: clamp(1.15rem, 2vw, 1.32rem);
  line-height: 1.65;
  text-align: left;
}
.host-note .btn { margin-top: 18px; }

/* 3. The four sections, set like courses on a menu */

.courses { padding-bottom: clamp(56px, 8vw, 104px); }
.course {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(44px, 6vw, 72px) 0;
  border-top: 1px solid var(--rule-soft);
}
.course:nth-child(even) .course-photo { order: 2; }

.course-photo { margin: 0; }
.course-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.course-text h2 { margin-bottom: 0; letter-spacing: 0.1em; }
.course-text h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin: 14px 0 22px;
  background: var(--marker, var(--accent));
}
.course.eat  { --marker: var(--eat); }
.course.stay { --marker: var(--stay); }
.course.host { --marker: var(--host); }
.course.art  { --marker: var(--art); }

.course-text p { max-width: 46ch; }
.course-text p:first-of-type { font-style: italic; font-size: 1.15rem; color: var(--ink); }
.course-text a { color: var(--accent); }

/* Paintings, beneath the Art section */
.gallery-wrap { padding-top: clamp(8px, 2vw, 16px); }
.gallery-wrap > .eyebrow { text-align: center; margin-bottom: 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .course { grid-template-columns: 1fr; }
  .course:nth-child(even) .course-photo { order: 0; }
  .course-photo img { aspect-ratio: 4 / 3; }
}

@media (max-width: 760px) {
  body { font-size: 18px; }
  .site-header { position: relative; }
  .site-header .wrap { flex-direction: row; justify-content: space-between; padding-top: 16px; padding-bottom: 14px; }
  .logo { font-size: 1.3rem; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-soft);
    display: none;
  }
  .nav.open { display: flex; }
  .nav li { width: 100%; text-align: center; }
  .nav a { display: block; padding: 11px 0; font-size: 1.05rem; }


  .form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .newsletter { justify-content: center; }

  .carousel { padding-top: 0; }
  .carousel .wrap { padding: 0; }
  .carousel .frame { aspect-ratio: 4 / 3; }
  .carousel-bar { padding: 0 var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transition: none; }
  .slide { transition: none; }
  html { scroll-behavior: auto; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Enquiry: simple form + the host's email ---------- */

.enquire {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  max-width: 980px;
}
.enquire .form { grid-template-columns: 1fr; max-width: none; }
.write-direct {
  text-align: center;
  border: 1px solid var(--rule);
  padding: 32px 24px;
  margin-top: 30px;
}
.write-direct .eyebrow { margin: 0; }
.write-direct .tilde { margin: 6px 0 10px; }
.host-email {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.host-email.pending { font-style: italic; color: var(--muted); text-decoration: none; pointer-events: none; }

/* ---------- Art gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(20px, 3vw, 36px);
}
.painting { text-align: center; }
.painting-img {
  margin: 0 0 16px;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  overflow: hidden;
}
.painting-img img { width: 100%; height: 100%; object-fit: contain; }
.painting-img.todo {
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule);
  font-style: italic;
  color: var(--muted);
}
.painting h3 { margin-bottom: 2px; }
.painting-info { font-style: italic; color: var(--muted); margin: 0 auto 8px; }
.painting-ask { font-style: italic; color: var(--accent); }

@media (max-width: 760px) {
  .enquire { grid-template-columns: 1fr; }
  .write-direct { margin-top: 0; }
}
