/* base.css — Long Table Catering: reset, primitives, chrome.
   Sections live in site.css. Colour lives in tokens.css. */

/* ------------------------------------------------------------------ reset */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-0);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--duna-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-head);
  letter-spacing: -0.008em;
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}
h1 { font-size: var(--fs-4); font-weight: 400; letter-spacing: -0.018em; }
h2 { font-size: var(--fs-3); letter-spacing: -0.014em; }
h3 { font-size: var(--fs-2); }
em { font-style: italic; }
p { margin: 0 0 var(--sp-3); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
b, strong { font-weight: 600; }

::selection { background: var(--olive); color: var(--on-dark); }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.section--olive :focus-visible { outline-color: var(--on-dark); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--olive-deep); color: var(--on-dark);
  padding: 0.85rem 1.3rem; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

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

/* ------------------------------------------------------------------ layout */

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

.section { padding-block: var(--section-y); position: relative; }
.section--tint { background: var(--cream-2); }
.section--olive { background: var(--olive-deep); color: var(--on-dark); }
.section--olive h1, .section--olive h2, .section--olive h3 { color: var(--on-dark); }

/* The long table: a hairline drawn the full width of the screen between
   sections. It is the brand name made literal, and it is the only divider
   this site needs. */
.section--ruled { border-top: 1px solid var(--line-2); }

.split { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
  .split--flip > :first-child { order: 2; }
  .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
  .split--wide-right { grid-template-columns: 0.85fr 1.15fr; }
  .split--center { align-items: center; }
}

.stack > * + * { margin-top: var(--sp-3); }

.sec-head { max-width: 44rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.sec-head > :last-child { margin-bottom: 0; }
.sec-head .lead { margin-top: var(--sp-3); }

.eyebrow {
  display: block; margin: 0 0 var(--sp-3);
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--terracotta);
}
.section--olive .eyebrow { color: var(--on-dark-muted); }

.lead { font-size: var(--fs-1); line-height: 1.55; color: var(--muted); }
.section--olive .lead { color: var(--on-dark-muted); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.85rem 1.6rem;
  border: 1px solid transparent; border-radius: var(--r);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn--primary { background: var(--terracotta); color: #FFFFFF; border-color: var(--terracotta); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--terracotta-deep); border-color: var(--terracotta-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--olive); color: var(--on-dark); border-color: var(--olive); transform: translateY(-1px); }
.btn--lg { min-height: 58px; padding: 1rem 2rem; font-size: 0.98rem; }

/* Inside the olive band every fill inverts so the control keeps a visible edge. */
.section--olive .btn--primary { background: var(--on-dark); color: var(--olive-deep); border-color: var(--on-dark); }
.section--olive .btn--primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
.section--olive .btn--ghost { color: var(--on-dark); border-color: rgba(250, 247, 240, 0.45); }
.section--olive .btn--ghost:hover { background: rgba(250, 247, 240, 0.12); color: var(--on-dark); border-color: var(--on-dark); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-top: var(--sp-4); }
@media (max-width: 560px) {
  .btn-row { gap: var(--sp-2); }
  .btn-row > .btn { width: 100%; }
}

/* Text link — a hairline that thickens on hover. */
.link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none; color: var(--olive);
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 1px;
  transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}
.link:hover { color: var(--terracotta); background-size: 100% 2px; }
.arw { display: inline-block; transition: transform var(--dur) var(--ease); }
.link:hover .arw { transform: translateX(3px); }
.section--olive .link { color: var(--on-dark); }

/* ------------------------------------------------------------------ media */

.media { overflow: hidden; background: var(--cream-3); border-radius: var(--r-lg); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.r-3-2 { aspect-ratio: 3 / 2; }
.r-4-3 { aspect-ratio: 4 / 3; }
.r-3-4 { aspect-ratio: 3 / 4; }
.r-4-5 { aspect-ratio: 4 / 5; }
.r-1-1 { aspect-ratio: 1 / 1; }
.figcap {
  margin-top: 0.8rem; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--cream); } }
.site-header.is-stuck { border-bottom-color: var(--line-2); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); min-height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--font-display); font-weight: 500; font-size: 1.24rem;
  letter-spacing: 0.005em; text-decoration: none; color: var(--ink); padding-block: 0.4rem;
}
.monogram {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px;
  border: 1px solid var(--olive); border-radius: var(--r);
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--olive); line-height: 1;
}

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.7rem); }
.nav a:not(.btn) {
  position: relative; text-decoration: none; font-weight: 500; font-size: 0.93rem;
  color: var(--ink-2); padding-block: 0.6rem; transition: color var(--dur) var(--ease);
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.15rem; height: 1px;
  background: var(--terracotta); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav a:not(.btn):hover { color: var(--terracotta); }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--terracotta); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { min-height: 44px; padding: 0.6rem 1.15rem; font-size: 0.86rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--r);
  width: 46px; height: 44px; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink);
}
.nav-toggle:hover { border-color: var(--ink); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line-2);
    padding: var(--sp-2) var(--gutter) var(--sp-4);
    box-shadow: 0 24px 40px -30px rgba(38, 36, 24, 0.7);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.95rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: var(--sp-3); width: 100%; min-height: 52px; font-size: 0.95rem; }
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  background: var(--cream-2); border-top: 1px solid var(--line-2);
  padding-block: var(--sp-5) var(--sp-4);
  color: var(--muted); font-size: var(--fs-sm);
}
.site-footer .container { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer p { max-width: 34ch; margin-bottom: var(--sp-2); }
.site-footer a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.site-footer a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.site-footer .brand { font-size: 1.08rem; margin-bottom: var(--sp-2); border: 0; }
.footer-h {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink); margin: 0 0 var(--sp-2);
}
.footer-links { display: grid; gap: 0.45rem; justify-items: start; }
.site-footer .demo {
  grid-column: 1 / -1; border-top: 1px solid var(--line-2);
  padding-top: var(--sp-3); margin: var(--sp-2) 0 0; max-width: none; font-size: 0.78rem;
}

/* ------------------------------------------------------------------ sticky bar (mobile) */

.cta-bar {
  position: fixed; left: 0; right: 0; z-index: 90; display: none;
  bottom: calc(var(--duna-h) + env(safe-area-inset-bottom));
  padding: 0.6rem var(--gutter) 0.7rem;
  background: color-mix(in srgb, var(--cream) 95%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-2);
}
@supports not (backdrop-filter: blur(1px)) { .cta-bar { background: var(--cream); } }
.cta-bar .btn { width: 100%; }
.cta-bar__note { display: block; text-align: center; font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; }
@media (max-width: 940px) {
  .cta-bar { display: block; }
  body.has-cta-bar { padding-bottom: calc(var(--duna-h) + 104px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------------ reveal */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
