/* ==========================================================================
   SITE FOOTER v4 — "The Lifted Curtain", rebuilt on the page's own grid
   (2026-09-03). One footer for every page: stamped by scripts/sync-footer.mjs
   from scripts/site-footer.template.html — never hand-edit a page's <footer>.

   v3 was rejected in context: three left edges across the tail, a labelled
   "philosophy" restart after the menu, a mid-band crop that made the mark
   unreadable, a cursor plate covering the rows it belonged to. v4 keeps the
   founder-picked skeleton (curtain reveal, display-size kitchen rows, one
   index, the mark at container width, hairline legal) and fixes the
   fundamentals:

   · ONE grid. The wrap is the same 1200px container the sections use; a
     3.5rem marginalia gutter (+1.5rem gap) carries numerals, index labels
     and the closing diamond; every line of TEXT starts at the content
     column; OBJECTS (rules, the mark) span the full container.
   · The first line continues the story — no eyebrow, no section label.
   · The mark is the WHOLE word: Cormorant 500, the logo's 0.22em tracking,
     sized so "rasa" spans the container (2.19em wide → font-size =
     width / 2.19). Ink band = 0.398em, top of ink at 0.4205em into a
     line-height-1 box (measured: ascent 924 / descent 287 / x-ink 398 per
     1000). Baseline stands on the legal rule. Nothing is cropped.
   · No floating imagery. The rows' hover is the underline drawing in the
     kitchen's colour, the name easing right, the arrow lighting.

   The curtain: position: sticky; bottom: 0; z-index: -1 on the footer, and
   an opaque .sf-ground sheet (appended after the footer by its script, sized
   to the footer's resting offsetTop) that every section sits on — only when
   the footer fits the viewport and the body paints a flat colour.

   Contrast on #070A10: blush .78 → 9.3:1, .72 → 8.0, .62 → 6.2; saffron
   8.7:1; rose-gold 6.4:1. Nothing under 5.4.
   ========================================================================== */

.sf {
  --fill: 0;
  --sf-blush: 242, 221, 208;
  --sf-saffron: #f5a623;
  --sf-gutter: 3.5rem;
  --sf-gap: 1.5rem;
  --sf-indent: calc(var(--sf-gutter) + var(--sf-gap));
  position: relative;
  z-index: 0;
  background: #070a10;
  color: rgb(var(--sf-blush));
  overflow: clip;
  font-family: "Syne", sans-serif;
}
.sf[data-curtain] {
  position: sticky;
  bottom: 0;
  z-index: -1;
}
/* the sheet that lifts: appended after the footer by its script, painted
   above the pinned footer (same level, later in the tree) and below every
   section; its height is the footer's resting offsetTop */
.sf-ground {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: 0 26px 60px -6px rgba(0, 0, 0, 0.62);
}
.sf::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 40% at 50% 100%, rgba(245, 166, 35, 0.09), transparent 70%);
}
.sf__wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 0 1.25rem;
}
@media (max-width: 1279px) {
  .sf__wrap {
    padding-inline: clamp(1.25rem, 4vw, 2rem);
  }
}
.sf__ac {
  color: var(--sf-saffron);
}

/* ── 1 · The last line — in the page's flow, before the footer element ── */
.sf-close {
  --sf-gutter: 3.5rem;
  --sf-gap: 1.5rem;
  --sf-indent: calc(var(--sf-gutter) + var(--sf-gap));
  --sf-blush: 242, 221, 208;
  --sf-saffron: #f5a623;
  position: relative;
  color: rgb(var(--sf-blush));
}
.sf-close__wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 0 4rem;
}
@media (max-width: 1279px) {
  .sf-close__wrap {
    padding-inline: clamp(1.25rem, 4vw, 2rem);
  }
}
.sf__quote {
  position: relative;
  margin: 0;
  padding-left: var(--sf-indent);
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.4rem, 4.1vw, 4rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
}
.sf__quote em {
  font-style: normal;
  font-weight: 500;
  color: var(--sf-saffron);
}
/* the closing diamond, in the gutter — the site's own ornament */
.sf__fin {
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  background: var(--sf-saffron);
  transform: rotate(45deg);
}

/* ── 2 · The three kitchens ───────────────────────────────────────────── */
.sf__doors {
  border-top: 1px solid rgba(var(--sf-blush), 0.12);
  margin-bottom: 2rem;
}
.sf__door {
  position: relative;
  display: grid;
  grid-template-columns: var(--sf-gutter) minmax(0, 1fr) auto auto 2.5rem;
  align-items: baseline;
  gap: var(--sf-gap);
  min-height: 5rem;
  padding: 0.8rem 0.5rem 0.75rem 0;
  border-bottom: 1px solid rgba(var(--sf-blush), 0.12);
  text-decoration: none;
  color: inherit;
}
.sf__door::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: rgb(var(--pa));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.sf__door:hover::before,
.sf__door:focus-visible::before {
  transform: scaleX(1);
}
.sf__door-no {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: rgb(var(--pa));
}
.sf__door-name {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  transition: color 0.35s;
}
.sf__door:first-child .sf__door-name {
  letter-spacing: 0.22em;
  font-size: clamp(2.05rem, 3.25vw, 3.02rem); /* ×1.08: lowercase-only x-height word vs capped siblings */
}
/* hover: the name takes the kitchen's colour, the rule draws in it, the
   arrow lights — colour, never movement of the words */
.sf__door:hover .sf__door-name,
.sf__door:focus-visible .sf__door-name {
  color: rgb(var(--pa));
}
.sf__door:hover .sf__door-name .sf__ac,
.sf__door:focus-visible .sf__door-name .sf__ac {
  color: rgb(var(--sf-blush));
}
.sf__door-for {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(var(--sf-blush), 0.62);
  white-space: nowrap;
}
.sf__door-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--sf-blush), 0.62);
  white-space: nowrap;
}
.sf__door-count b {
  margin-right: 0.3rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: 0;
  color: rgb(var(--sf-blush));
  font-variant-numeric: lining-nums tabular-nums;
}
.sf__door-arrow {
  justify-self: end;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--sf-saffron);
  opacity: 0.45;
  transition:
    opacity 0.3s,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sf__door:hover .sf__door-arrow {
  opacity: 1;
  transform: translateX(6px);
}
.sf__door:focus-visible {
  outline: 1px solid rgba(245, 166, 35, 0.75);
  outline-offset: 4px;
}

/* ── 3 · The index — two labelled rows on the same gutter ─────────────── */
/* ── 3 · The band — index left, signature right, on the kitchens' grid ──
   Three shared rows (subgrid): Learn / Cook / Account on the left, tagline /
   sub-line / contact on the right, baseline to baseline. The right column
   ends on the container edge — the same edge the mark and the legal links
   stand on — so the band keeps the width the rows above it drew. */
.sf__band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  column-gap: 3rem;
  row-gap: 0.55rem;
  margin-bottom: 2rem;
}
.sf__index {
  grid-row: 1 / 4;
  display: grid;
  grid-template-rows: subgrid;
}
.sf__index-row {
  display: grid;
  grid-template-columns: var(--sf-gutter) minmax(0, 1fr);
  gap: var(--sf-gap);
  align-items: baseline;
  align-self: baseline; /* joins the row's baseline group with the signature line */
}
.sf__index-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--sf-blush), 0.56); /* 5.1:1 — the 4.5 floor has no footer exemption */
}
.sf__index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0;
}
.sf__index-links a {
  padding: 0.25rem 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--sf-blush), 0.72);
  text-decoration: none;
  transition: color 0.25s;
}
.sf__index-links a:not(:last-child)::after {
  content: "·";
  margin: 0 0.75rem;
  color: rgba(var(--sf-blush), 0.3);
}
.sf__index-links a:hover {
  color: var(--sf-saffron);
}
.sf__index-links a:focus-visible {
  outline: 1px solid rgba(245, 166, 35, 0.75);
  outline-offset: 3px;
}

/* ── 4 · The signature ────────────────────────────────────────────────── */
.sf__sign {
  grid-row: 1 / 4;
  display: grid;
  grid-template-rows: subgrid;
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}
.sf__sign > * {
  align-self: baseline;
}
.sf__tagline {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(var(--sf-blush), 0.82);
}
.sf__tagline-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(var(--sf-blush), 0.62);
}
.sf__mail {
  padding: 0.25rem 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: rgb(var(--sf-blush));
  text-decoration: underline;
  text-decoration-color: rgba(245, 166, 35, 0.6);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.42em;
  transition: color 0.25s;
}
.sf__mail:hover {
  color: var(--sf-saffron);
}
.sf__mail:focus-visible {
  outline: 1px solid rgba(245, 166, 35, 0.75);
  outline-offset: 3px;
}
/* "rasa" spans the container: 4 glyphs (1.5306em) + 3 visible tracks of
   0.22em = 2.19em; 2.22 leaves slack for a scrollbar. The clip shows only
   the ink band, so the baseline lands on the legal rule beneath. */
.sf__mark-clip {
  height: 0.41em; /* ink band 0.398em + the bowls' 0.011em overshoot below the baseline — never shear a round letter flat */
  overflow: hidden;
  font-size: min(543px, calc((100vw - 2 * clamp(1.25rem, 4vw, 2rem)) / 2.21));
  line-height: 1;
}
.sf__mark {
  position: relative;
  display: block;
  margin-top: -0.4205em;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  color: rgb(var(--sf-blush));
  text-decoration: none;
  white-space: nowrap;
}
.sf__mark-outline {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--sf-blush), 0.26);
}
/* the accent span sets its own colour — in the outline copy it must stay
   hollow too, with a saffron hairline instead of a solid letter */
.sf__mark-outline .sf__ac {
  color: transparent;
  -webkit-text-stroke-color: rgba(245, 166, 35, 0.34);
}
.sf__mark-fill {
  position: absolute;
  inset: 0;
  display: block;
  clip-path: inset(0 calc((1 - var(--fill)) * 100%) 0 0);
}
.sf__mark:focus-visible {
  outline: 1px solid rgba(245, 166, 35, 0.75);
  outline-offset: 4px;
}

/* ── 5 · Legal — one hairline row ─────────────────────────────────────── */
.sf__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid rgba(var(--sf-blush), 0.14);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--sf-blush), 0.62);
}
.sf__legal-links {
  display: flex;
  align-items: baseline;
}
.sf__legal-links a:not(:last-child)::after {
  content: "·";
  margin: 0 0.75rem;
  color: rgba(var(--sf-blush), 0.3);
}
.sf__legal a {
  color: rgba(var(--sf-blush), 0.62);
  text-decoration: none;
  transition: color 0.25s;
}
.sf__legal a:hover {
  color: var(--sf-saffron);
}
.sf__legal a:focus-visible {
  outline: 1px solid rgba(245, 166, 35, 0.75);
  outline-offset: 3px;
}
.sf__legal-br {
  display: none; /* phones: the legal line breaks here instead of orphaning one word */
}
.sf__credit {
  color: #d4a89a !important;
  text-transform: none;
  letter-spacing: 0.04em;
}
.sf__credit strong {
  font-weight: 600;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sf,
  .sf-close {
    --sf-gutter: 2.5rem;
    --sf-gap: 1rem;
  }
  .sf__wrap {
    padding-top: 2.25rem;
  }
  .sf-close__wrap {
    padding-bottom: 3rem;
  }
  .sf__quote {
    font-size: 2.1rem;
  }
  .sf__br {
    display: none;
  }
  .sf__door {
    grid-template-columns: var(--sf-gutter) minmax(0, 1fr) auto;
    grid-template-areas:
      "no name count"
      "no for count";
    align-items: center;
    gap: 0.2rem var(--sf-gap);
    padding: 1.1rem 0;
  }
  .sf__door-no { grid-area: no; }
  .sf__door-name { grid-area: name; font-size: 1.9rem; }
  .sf__door:first-child .sf__door-name { font-size: 2.05rem; }
  .sf__door-for { grid-area: for; font-size: 1rem; }
  /* the count sits on the NAME's row, baseline to baseline — not floating
     between the two lines */
  .sf__door-count { grid-column: 3; grid-row: 1; justify-self: end; align-self: baseline; }
  .sf__door-arrow { display: none; }
  /* one column: the index, then the signature, both on the left edge */
  .sf__band {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 2rem;
    margin-bottom: 1.25rem;
  }
  .sf__index,
  .sf__sign {
    grid-row: auto;
    grid-template-rows: none;
  }
  .sf__index {
    gap: 1rem;
  }
  .sf__index-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  /* phone: each group two-up in 44px tap boxes (four links = a clean 2×2 —
     a wrapped row orphans its last link), no separators */
  .sf__index-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }
  .sf__index-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
  }
  .sf__index-links a:not(:last-child)::after {
    content: none;
  }
  .sf__sign {
    gap: 0.35rem;
    justify-items: start;
    text-align: left;
    white-space: normal;
  }
  .sf__mail {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
  }
  .sf__legal-br {
    display: inline;
  }
  .sf__legal-sep {
    display: none;
  }
  .sf__wrap {
    padding-bottom: 1.5rem;
  }
  .sf__legal {
    flex-direction: column;
    align-items: flex-start;
  }
  .sf__legal-links {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sf__door::before,
  .sf__door-name,
  .sf__door-arrow,
  .sf__index-links a,
  .sf__mail,
  .sf__legal a {
    transition: none;
  }
}
