/* =========================================================================
   Tuscany Forever — site-wide layout & chrome
   Pairs with colors_and_type.css (design tokens). Handles responsive
   layout, navigation, footer and shared component shells. The React kit
   (tf-core/tf-chrome) uses these classes for anything that must reflow.
   ========================================================================= */

* { box-sizing: border-box; }
/* scroll-padding keeps in-page anchors (e.g. #booking) clear of the sticky header */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
html, body { margin: 0; padding: 0; background: var(--tf-cream); }
body {
  font-family: var(--tf-sans); color: var(--tf-ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { -webkit-tap-highlight-color: transparent; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--tf-sun-wash); }

/* ---------- layout primitives ---------- */
.wrap { max-width: var(--tf-maxw); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.wrap-wide { max-width: 1360px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.section { padding: 92px 0; }
.section-sm { padding: 64px 0; }
.bg-cream { background: var(--tf-cream); }
.bg-warm  { background: var(--tf-cream-warm); }
.bg-hi    { background: var(--tf-cream-hi); }
.bg-olive { background: var(--tf-olive); color: var(--tf-cream); }
.bg-deep  { background: var(--tf-olive-deep); color: var(--tf-cream); }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* ---------- section heading block ---------- */
.sec-head { margin-bottom: 44px; }
.sec-title {
  font-family: var(--tf-serif); font-weight: 600; color: var(--tf-olive);
  font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.15; margin: 12px 0 0;
}
.sec-title em { font-style: italic; font-weight: 500; }
.sec-lead { font-family: var(--tf-sans); font-weight: 400; font-size: var(--tf-body-lg);
  line-height: var(--tf-lh-body); color: var(--tf-fg-muted); max-width: 60ch; margin: 14px 0 0; }

/* ---------- skip-to / a11y ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============================ NAVIGATION ============================ */
.nav {
  position: sticky; top: 0; z-index: 60; transition: background .5s var(--tf-ease),
  border-color .5s var(--tf-ease), box-shadow .5s var(--tf-ease), padding .35s var(--tf-ease);
  border-bottom: 1px solid transparent;
}
.nav--solid {
  background: rgba(247,244,238,0.92); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--tf-border);
}
/* Leaner bar (client review 06/2026): less height, a touch smaller everything,
   and the solid state eases in gently (slower transition above). Solid scrolled
   state tightens a couple more px for a calmer feel. */
.nav__inner { max-width: 1360px; margin: 0 auto; padding: 10px 32px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  transition: padding .35s var(--tf-ease); }
.nav--solid .nav__inner { padding-top: 8px; padding-bottom: 8px; }
.nav__links { display: flex; gap: 20px; align-items: center; justify-self: center; }
.nav__right { justify-self: end; }
.nav__link {
  font-family: var(--tf-sans); font-size: 15.5px; font-weight: 500; text-decoration: none;
  letter-spacing: 0.01em; white-space: nowrap; position: relative; padding: 4px 0;
  transition: color .2s var(--tf-ease);
}
.nav__link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1.5px; background: var(--tf-terracotta); transition: right .28s var(--tf-ease); }
.nav__link:hover::after { right: 0; }
.nav__right { display: flex; align-items: center; gap: 18px; }
.nav__lang { font-family: var(--tf-sans); font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
  cursor: pointer; background: none; border: none; padding: 4px; }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px; }
.nav__burger span { display: block; width: 24px; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .3s var(--tf-ease), opacity .2s; }

/* tone over hero (transparent) vs solid */
.nav--ghost .nav__link { color: var(--tf-cream); }
.nav--ghost .nav__lang { color: rgba(242,237,229,0.9); }
.nav--ghost .nav__burger { color: var(--tf-cream); }
.nav--solid .nav__link { color: var(--tf-ink); }
.nav--solid .nav__lang { color: var(--tf-ink-2); }
.nav--solid .nav__burger { color: var(--tf-olive); }

/* mobile drawer — overflow:hidden so the off-canvas panel can't widen the page */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; overflow: hidden; }
.drawer.open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(40,46,20,0.5);
  opacity: 0; transition: opacity .3s var(--tf-ease); backdrop-filter: blur(3px); }
.drawer.open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(86vw, 360px);
  background: var(--tf-cream-hi); box-shadow: var(--tf-shadow-lg); padding: 24px;
  transform: translateX(100%); transition: transform .38s var(--tf-ease);
  display: flex; flex-direction: column; }
.drawer.open .drawer__panel { transform: translateX(0); }
.drawer__link { display: block; font-family: var(--tf-serif); font-size: 24px; color: var(--tf-olive);
  text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--tf-border); }
/* sub-items (under EVENTS / RESOURCES) — stack full-width, a touch smaller for hierarchy */
.drawer__sub { font-size: 20px; }

/* ============================ STICKY MOBILE CTA ============================ */
.mcta { display: none; }
@media (max-width: 860px) {
  .mcta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(247,244,238,0.94); backdrop-filter: blur(10px);
    border-top: 1px solid var(--tf-border);
    transition: transform .32s var(--tf-ease), opacity .32s var(--tf-ease); }
  /* tucked away while the inline booking widget is on screen (set from tf-ui.js) */
  .mcta--hidden { transform: translateY(112%); opacity: 0; pointer-events: none; }
  .mcta a { display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 52px; background: var(--tf-sun); color: #1a1a1a; text-decoration: none;
    font-family: var(--tf-sans); font-weight: 600; font-size: 15.5px; padding: 15px;
    border-radius: var(--tf-radius-pill); }
  .mcta a:active { background: var(--tf-sun-deep); }
  body { padding-bottom: 72px; }
}

/* ============================ BREADCRUMB ============================ */
.crumbs { font-family: var(--tf-sans); font-size: 13px; color: var(--tf-ink-3);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; letter-spacing: 0.01em; }
.crumbs a { text-decoration: none; color: var(--tf-ink-2); }
.crumbs a:hover { color: var(--tf-terracotta); }
.crumbs .sep { color: var(--tf-limestone); }
.crumbs .cur { color: var(--tf-olive); font-weight: 500; }

/* ============================ PAGE HEADER ============================ */
.pagehead { background: var(--tf-cream-warm); border-bottom: 1px solid var(--tf-border);
  padding: 30px 0 48px; }
.pagehead h1 { font-family: var(--tf-serif); font-weight: 600; color: var(--tf-olive);
  font-size: clamp(2.1rem, 3.8vw, 3.2rem); line-height: 1.08; margin: 18px 0 0; }
.pagehead p { font-family: var(--tf-sans); font-weight: 400; font-size: var(--tf-body-lg);
  line-height: 1.6; color: var(--tf-ink-2); max-width: 64ch; margin: 14px 0 0; }

/* ============================ BOOKALET WRAPPER ============================ */
.bookalet { background: var(--tf-cream-hi); border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius-lg); box-shadow: var(--tf-shadow-md); overflow: hidden; }
.bookalet__bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px;
  background: var(--tf-sun); color: #1a1a1a; text-align: center;
  font-family: var(--tf-sans); font-weight: 600; font-size: 14.5px; letter-spacing: 0.02em; }
.bookalet__bar .dot { margin-left: 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: #1a1a1a; opacity: 0.85; }
.bookalet__frame { background: #fff; padding: 12px; border-radius: 10px; }
.bookalet__frame iframe { width: 100%; border: 0; display: block; }

/* ============================ FOOTER ============================ */
.foot { background: var(--tf-olive-deep); color: var(--tf-cream); padding: 76px 0 38px; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1.1fr; gap: 32px; }
.foot__h { font-family: var(--tf-sans); font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--tf-sun); margin-bottom: 16px; }
.foot a.foot__lnk { display: block; font-family: var(--tf-sans); font-size: 14.5px;
  color: rgba(242,237,229,0.82); text-decoration: none; margin-bottom: 11px; transition: color .2s; }
.foot a.foot__lnk:hover { color: var(--tf-sun); }
.foot__niche a.foot__lnk { color: rgba(242,237,229,0.55); font-size: 13.5px; }
.foot__bottom { max-width: var(--tf-maxw); margin: 50px auto 0; padding: 24px 32px 0;
  border-top: 1px solid rgba(242,237,229,0.16); display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
  font-family: var(--tf-sans); font-size: 12.5px; color: rgba(242,237,229,0.58); }
.foot__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot__legal a { text-decoration: none; color: inherit; }
.foot__legal a:hover { color: var(--tf-sun); }

/* ============================ CTA STRIP (contained card) ============================ */
.ctastrip-wrap { padding: 72px 0; }
.ctastrip { position: relative; overflow: hidden; border-radius: 22px; padding: 72px 28px;
  text-align: center; color: #fff; background: var(--tf-terracotta); box-shadow: 0 24px 60px rgba(44,52,20,0.18); }
.ctastrip__bg { position: absolute; inset: 0; }
.ctastrip__scrim { position: absolute; inset: 0;
  background: var(--tf-terracotta); }
.ctastrip__inner { position: relative; max-width: 680px; margin: 0 auto; }
@media (max-width: 640px) { .ctastrip-wrap { padding: 48px 0; } .ctastrip { padding: 52px 20px; } }

/* ============================ COOKIE BANNER ============================ */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150;
  max-width: 480px; background: var(--tf-cream-hi); border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius-lg); box-shadow: var(--tf-shadow-lg); padding: 22px 24px; }
@media (max-width: 860px) { .cookie { bottom: 84px; } }

/* ============================ FORMS ============================ */
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--tf-sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--tf-olive); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; font-family: var(--tf-sans); font-size: 15px; color: var(--tf-ink);
  background: var(--tf-cream-hi); border: 1px solid var(--tf-border); border-radius: var(--tf-radius-sm);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--tf-olive);
  box-shadow: var(--tf-shadow-focus); }
.textarea { min-height: 130px; resize: vertical; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1080px) {
  .foot__grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav__links, .nav__langwrap, .nav__right .btn-desktop { display: none; }
  /* drop the empty centre column so the burger stays pinned right (lang lives in the drawer) */
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__burger { display: flex; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .wrap, .wrap-wide { padding-left: 20px; padding-right: 20px; }
  /* >=16px form controls stop iOS Safari from auto-zooming on focus */
  .input, .select, .textarea,
  .tf-form input, .tf-form select, .tf-form textarea,
  .tf-filters__search, .tf-faq-search { font-size: 16px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__bottom { flex-direction: column; align-items: flex-start; }
}
