/* =========================================================
   THE SHARED KITCHEN — Design System
   West Footscray, Melbourne
   ========================================================= */

:root {
  /* Palette — warm editorial with industrial accents */
  --paper:        #F3ECDF;   /* base background */
  --paper-2:      #ECE3D2;   /* deeper cream */
  --paper-3:      #E3D7BE;   /* warm parchment */
  --ink:          #1A1714;   /* near-black, warm */
  --ink-2:        #2B2620;   /* secondary ink */
  --ink-3:        #5A4F44;   /* muted ink for body */
  --flame:        #D9531E;   /* primary accent */
  --flame-dark:   #B33E0E;
  --olive:        #4A5230;   /* secondary accent */
  --line:         rgba(26, 23, 20, 0.14);
  --line-2:       rgba(26, 23, 20, 0.06);
  --line-cream:   rgba(243, 236, 223, 0.18);

  /* Type */
  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-sans:    "Geist", "Helvetica Neue", system-ui, sans-serif;
  --f-mono:    "Geist Mono", ui-monospace, monospace;

  /* Radii */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-card: 0 1px 0 rgba(26,23,20,0.04), 0 10px 30px -18px rgba(26,23,20,0.25);

  /* Layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Typography utilities ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flame);
  margin-right: 8px;
  vertical-align: 2px;
}

.display {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
}

.display .it { font-style: italic; color: var(--flame); }
.display .it-ink { font-style: italic; }

h1.display { font-size: clamp(48px, 7.2vw, 112px); }
h2.display { font-size: clamp(38px, 5.4vw, 80px); }
h3.display { font-size: clamp(28px, 3.4vw, 48px); }

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 56ch;
  text-wrap: pretty;
}

.label-mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Container & section ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { position: relative; }

.section {
  padding-block: clamp(44px, 6vw, 88px);
}

.section--tight { padding-block: clamp(32px, 4vw, 60px); }

.section--ink   { background: var(--ink); color: var(--paper); }
.section--ink .lede,
.section--ink .eyebrow { color: rgba(243, 236, 223, 0.65); }
.section--ink .eyebrow .dot { background: var(--flame); }

.section--cream-2 { background: var(--paper-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--flame { background: var(--flame); color: #fff; }
.btn--flame:hover { background: var(--flame-dark); }

.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-2); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: rgba(26,23,20,0.05); }

.btn--ghost-cream { background: transparent; border-color: rgba(243,236,223,0.25); color: var(--paper); }
.btn--ghost-cream:hover { background: rgba(243,236,223,0.08); }

.btn--lg { padding: 18px 28px; font-size: 16px; }

.btn .arrow {
  width: 16px; height: 16px;
  display: inline-block;
  position: relative;
  margin-bottom:9px;
}
.btn .arrow::before {
  content: "→";
  font-family: var(--f-sans);
}

/* ---------- Top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(10px);
}
.topnav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 92px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand__logo {
  height: 85px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .brand__logo { height: 70px; }
}

/* legacy mark/name fallbacks (no-op when logo image is in use) */
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--flame);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 20px;
  font-style: italic;
  flex: 0 0 auto;
}
.brand__name { line-height: 1; }
.brand__name small {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
}
.nav a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  position: relative;
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--ink); background: rgba(26,23,20,0.05); }
.nav a.is-active {
  color: var(--ink);
  background: rgba(26,23,20,0.06);
}
.nav a.is-active::before {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px; height: 1px;
  background: var(--flame);
}

.topnav__cta { display: flex; align-items: center; gap: 10px; }

/* End-CTA — add visible separator from footer so the CTA button doesn't touch the dark footer banner */
.endcta {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(56px, 7vw, 100px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.endcta__inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}
.endcta h2 {
  font-family: var(--f-display);
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 16px 0 28px;
  color: var(--paper);
}
.endcta h2 .it { font-style: italic; color: var(--flame); }
.endcta p {
  color: rgba(243,236,223,0.7);
  font-size: 18px;
  max-width: 56ch;
  margin: 0 auto 36px;
}
.endcta__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.endcta__mark {
  position: absolute;
  top: -40px;
  right: -40px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 260px;
  line-height: 1;
  color: rgba(217,83,30,0.08);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.endcta + .footer,
.endcta--spaced + .footer {
  border-top: 1px solid var(--line-cream);
}
.endcta--spaced { padding-block: clamp(48px, 5vw, 80px) clamp(72px, 8vw, 110px); }

/* When end-CTA directly follows a normal section, collapse the doubled vertical gap */
.section + .endcta,
.section + .endcta--spaced { padding-top: clamp(20px, 2.5vw, 36px); }

/* ---------- Form feedback (used by form-handler.js) ---------- */
.sk-feedback {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.5;
}
.sk-feedback--info    { background: var(--paper-2); color: var(--ink-2); }
.sk-feedback--success { background: rgba(58,135,72,0.12); color: #2f7c41; }
.sk-feedback--error   { background: rgba(217,83,30,0.10); color: var(--flame-dark); }
.is-invalid {
  border-color: var(--flame) !important;
  background: rgba(217,83,30,0.04) !important;
}
.req { color: var(--flame); }

/* ---------- Mobile nav (hamburger + drawer) ---------- */
.navtoggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 60;
  flex: 0 0 auto;
}
.navtoggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: absolute;
  left: 12px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.navtoggle span:nth-child(1) { top: 14px; }
.navtoggle span:nth-child(2) { top: 21px; }
.navtoggle span:nth-child(3) { top: 28px; }
.navtoggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 920px) {
  .navtoggle { display: inline-flex; }

  /* Hide the desktop phone button on mobile to keep the bar clean */
  .topnav__cta .btn--ghost { display: none; }

  /* Convert .nav into a full-width slide-down drawer */
  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 16px 20px 24px;
    gap: 4px;
    box-shadow: 0 18px 24px -20px rgba(26,23,20,0.25);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .2s ease;
    z-index: 55;
  }
  .nav a {
    padding: 14px 16px;
    font-size: 17px;
    font-family: var(--f-display);
    font-weight: 400;
    letter-spacing: -0.005em;
    border-radius: 12px;
  }
  .nav a.is-active::before { display: none; }
  .nav a.is-active { background: rgba(217,83,30,0.08); color: var(--flame); }

  html.nav-open .nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  html.nav-open body { overflow: hidden; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: 80px 32px;
}
.footer .container { display: grid; gap: 48px; }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer__brand .brand__mark { background: var(--flame); color: var(--ink); }
.footer__brand p {
  color: rgba(243,236,223,0.6);
  margin-top: 18px;
  max-width: 36ch;
  font-size: 14.5px;
  line-height: 1.6;
}
.footer__col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243,236,223,0.5);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__col a {
  color: rgba(243,236,223,0.85);
  font-size: 14.5px;
  transition: color .15s;
}
.footer__col a:hover { color: var(--flame); }

.footer__bottom {
  border-top: 1px solid var(--line-cream);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(243,236,223,0.5);
  text-transform: uppercase;
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* ---------- Tag / chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--flame);
}

/* ---------- Image slot styling ---------- */
image-slot {
  background: var(--paper-3);
  border-radius: var(--r-md);
  --image-slot-placeholder-color: var(--ink-3);
  --image-slot-border: 1px dashed rgba(26,23,20,0.25);
}

/* ---------- Section header (eyebrow + title) ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
.section-head .lede { max-width: 56ch; }
.section-head__row { width: 100%; }
.section-head__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.section-head .lede { margin-top: 4px; }

/* ---------- Responsive helpers ---------- */
@media (max-width: 1024px) {
  :root { --gutter: clamp(20px, 3.5vw, 40px); }
}
@media (max-width: 920px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
  .topnav__cta .btn--ghost { display: none; }
  .brand small { display: none; }
  h1.display { font-size: clamp(40px, 11vw, 64px); }
  h2.display { font-size: clamp(32px, 8vw, 48px); }
}
@media (max-width: 420px) {
  .container { padding-inline: 16px; }
}

/* ============ DOC PAGE LAYOUT ============ */
.doc-hero {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--line-cream);
}
.doc-hero__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: end;
}
.doc-hero h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 24px 0 0;
}
.doc-hero h1 .it { font-style: italic; color: var(--flame); }
.doc-hero__lede {
  color: rgba(243,236,223,0.7);
  font-size: 18px;
  max-width: 50ch;
  padding-bottom: 18px;
}

.doc-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 100px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.doc-toc .l {
  color: var(--ink-3);
  margin-bottom: 14px;
  display: block;
}
.doc-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: tc; display: grid; gap: 4px; }
.doc-toc li { counter-increment: tc; }
.doc-toc a {
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 8px 0;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  letter-spacing: 0.08em;
  transition: color .15s;
}
.doc-toc a::before { content: counter(tc, decimal-leading-zero); color: var(--flame); }
.doc-toc a:hover { color: var(--ink); }
.doc-toc a.is-active { color: var(--ink); }

.doc-body { display: grid; gap: 40px; max-width: 760px; }
.doc-body section {
  scroll-margin-top: 100px;
}
.doc-body h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 18px;
}
.doc-body h2 .it { font-style: italic; color: var(--flame); }
.doc-body h2 .num {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--flame);
  margin-bottom: 14px;
}
.doc-body h3 {
  font-family: var(--f-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 24px 0 8px;
}
.doc-body p, .doc-body li { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.doc-body p { margin: 0 0 14px; }
.doc-body ul, .doc-body ol { padding-left: 0; margin: 0 0 16px; list-style: none; }
.doc-body ul li {
  display: grid;
  grid-template-columns: 22px 1fr;
  padding: 6px 0;
  align-items: baseline;
}
.doc-body ul li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--flame);
  align-self: center;
  margin-top: 2px;
}

@media (max-width: 980px) {
  .doc-hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .doc-grid { grid-template-columns: 1fr; gap: 32px; }
  .doc-toc { position: static; top: auto; }
  .doc-toc ol { display: flex; flex-wrap: wrap; gap: 0; }
  .doc-toc li { flex: 1 1 220px; }
}
