/* ============================================================
   KOMI shared stylesheet: tokens, type, calls to action, header
   and footer. Used by every page, so a change here is a change
   everywhere. Page-specific styles stay inline in each page.
   ============================================================ */

/* ============================================================
   KOMI — direction "The Slow Reveal"
   Built to Valeria Zilkha's brief of 10 Sep 2026.

   Palette is near-black and deep graphite with ivory type, red
   strictly an accent. Photography is people, hands, heat and
   partial reveals rather than plated stills. The page discloses
   KOMI gradually: four techniques, then the kitchen, then the
   menu, then the bar, and only at the end the meaning of the seal.
   ============================================================ */

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

:root {
  /* ground */
  --ink:        #08090A;   /* base */
  --graphite:   #101215;
  --graphite-2: #15171B;
  --night:      #040405;   /* the bar, the darkest point of the page */

  /* ink on ground */
  --ivory:       #EFEAE1;
  --ivory-dim:   rgba(239, 234, 225, 0.62);
  --ivory-faint: rgba(239, 234, 225, 0.34);
  --hair:        rgba(239, 234, 225, 0.14);

  /* the one accent */
  --red:      #9B231C;
  --red-lift: #BE3527;

  /* type */
  --serif:     'Cormorant Garamond', Georgia, serif;
  --sans:      'Jost', system-ui, -apple-system, sans-serif;
  --mincho:    'Zen Old Mincho', Georgia, serif;
  --condensed: 'Barlow Condensed', Impact, sans-serif;

  --gutter: 7vw;
  --rule:   1px solid var(--hair);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
/* A <picture> has no height of its own, so an img inside it set to
   height:100% fell back to its natural 16:9 shape instead of filling
   its frame: a 96px empty band under the homepage hero at 1440x900,
   most of the hero empty on a phone. Every picture here wraps one img
   in a sized frame, so the picture takes the frame's size. */
picture { width: 100%; height: 100%; }
/* Guard: width/height attributes are presentational hints, so an image with
   only `height` in CSS would take the attribute's width and stretch. Every
   logo is sized by height, so width always derives from the ratio. */
.hdr__mark, .ftr__mark, .hero__word, .tech__mark, .bar__seal, .connection__seal { width: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- shared type ---------------------------------- */
.eyebrow {
  font-family: var(--condensed);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--red-lift);
}
.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
.techword {
  font-family: var(--mincho);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

/* the four techniques, set as a run of words with red interpuncts */
.run { font-family: var(--mincho); text-transform: uppercase; letter-spacing: 0.26em; }
.run i { color: var(--red-lift); font-style: normal; margin: 0 0.5em; }

/* ---------- calls to action ------------------------------ */
/* The seal is a double-ruled stamp. The primary CTA is built the same
   way: a red ground with an inset hairline that closes toward the edge
   on hover, so it reads as something stamped rather than a button. */
.cta {
  position: relative;
  display: inline-block;
  font-family: var(--condensed);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 21px 44px 19px;
  color: var(--ivory);
  background: var(--red);
  transition: background 0.2s ease;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(239, 234, 225, 0.4);
  pointer-events: none;
  transition: inset 0.2s ease, border-color 0.2s ease;
}
.cta:hover, .cta:focus-visible { background: var(--red-lift); }
.cta:hover::after, .cta:focus-visible::after { inset: 2px; border-color: rgba(239, 234, 225, 0.85); }
.cta--sm { padding: 14px 26px 12px; font-size: 11px; letter-spacing: 0.2em; }
.cta--sm::after { inset: 4px; }

/* Secondary has no box at all: a tracked label sitting on a hairline
   that draws across on approach. */
.cta-ghost {
  position: relative;
  display: inline-block;
  font-family: var(--condensed);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0 2px 13px;
  color: var(--ivory-dim);
  transition: color 0.2s ease;
}
.cta-ghost::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: rgba(239, 234, 225, 0.2);
}
.cta-ghost::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--ivory);
  transition: width 0.25s ease;
}
.cta-ghost:hover, .cta-ghost:focus-visible { color: var(--ivory); }
.cta-ghost:hover::after, .cta-ghost:focus-visible::after { width: 100%; }
:focus-visible { outline: 2px solid var(--red-lift); outline-offset: 3px; }

/* ---------- flame CTA ------------------------------------ */
/* Ported from the React FlameButton. Silver pill, and a flame that
   tracks the cursor and burns hottest toward whichever edge it is
   nearest. Fitting for a kitchen whose whole story is heat. */
.flame {
  position: relative;
  display: inline-block;
  border-radius: 9999px;   /* so the focus ring follows the pill */
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
}
.flame__glow {
  /* motion-fallback: ok decorative hover glow, not content; shown only on hover */
  position: absolute;
  inset: -6px;
  z-index: 0;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0;
  filter: blur(7px) saturate(1.4);
}
.flame__btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 34px;
  border: 1px solid transparent;
  border-radius: 9999px;
  overflow: hidden;
  cursor: pointer;
  appearance: none;
  font-family: var(--condensed);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #5A250A;
  background: linear-gradient(100deg, #CFCFCF 0%, #D6D6D6 40%, #E4E2E0 70%, #F0EEEC 100%);
  -webkit-tap-highlight-color: transparent;
}
.flame__hot {
  /* motion-fallback: ok decorative hover hot-spots, not content; shown only on hover */
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease-out;
}
.flame.is-hot .flame__hot { opacity: 1; }
.flame__hot span {
  position: absolute;
  top: 50%;
  border-radius: 9999px;
  transform: translateY(-50%);
}
.flame__hot .s1 {
  width: 121px; height: 121px;
  background: radial-gradient(50% 50% at 50% 50%, #FFFFF5 3.5%, rgba(255,106,45,1) 26.5%,
              #FFDA9F 37.5%, rgba(255,106,45,0.5) 49%, rgba(255,45,85,0) 92.5%);
}
.flame__hot .s2 {
  width: 204px; height: 103px;
  filter: blur(5px);
  background: radial-gradient(43.3% 44.23% at 50% 49.51%, #FFFFF7 29%, #FFFACD 48.5%,
              #F4D2BF 60.71%, rgba(214,211,210,0) 100%);
}
.flame__label { position: relative; z-index: 1; }
.flame__arrow { position: relative; z-index: 1; width: 14px; height: 14px; }
.flame--sm .flame__btn { height: 38px; padding: 0 22px; font-size: 11px; letter-spacing: 0.12em; }
@media (max-width: 520px) {
  .flame__btn { height: 44px; padding: 0 24px; letter-spacing: 0.1em; }
}

/* ---------- header --------------------------------------- */
.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.hdr.is-stuck {
  background: rgba(8, 9, 10, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom-color: var(--hair);
}
.hdr__mark { height: 26px; width: auto; }
.hdr__nav { display: flex; align-items: center; gap: 34px; }
.hdr__link {
  font-family: var(--condensed);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  transition: color 0.2s ease;
}
.hdr__link:hover, .hdr__link:focus-visible { color: var(--ivory); }
@media (max-width: 860px) {
  .hdr__nav .hdr__link { display: none; }
}
@media (max-width: 520px) {
  .hdr { padding-left: 20px; padding-right: 20px; gap: 12px; }
  .hdr__mark { height: 22px; }
  .cta--sm { padding: 11px 16px 9px; letter-spacing: 0.14em; }
  .cta { padding: 17px 26px 15px; letter-spacing: 0.16em; }
}

/* current page in the nav */
.hdr__link[aria-current="page"] {
  color: var(--ivory);
  box-shadow: 0 1px 0 0 var(--red-lift);
  padding-bottom: 3px;
}

/* ---------- mobile navigation ---------------------------- */
/* Below 860px the header links are hidden, so without this there is
   no way to reach Our Story, or any section, from a phone. The overlay
   sits under the header so the same button closes it. */
.hdr__menu {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hdr__menu i {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s cubic-bezier(0.76, 0, 0.24, 1), top 0.2s cubic-bezier(0.76, 0, 0.24, 1);
}
.hdr__menu i:first-child { top: 18px; }
.hdr__menu i:last-child  { top: 25px; }
.hdr__menu[aria-expanded="true"] i:first-child { top: 21.5px; transform: rotate(45deg); }
.hdr__menu[aria-expanded="true"] i:last-child  { top: 21.5px; transform: rotate(-45deg); }
.hdr__menu:active { transform: scale(0.98); }
@media (max-width: 860px) {
  .hdr__menu { display: inline-block; }
}

.mnav {
  /* motion-fallback: ok closed menu, shown by nav.js; [hidden] also removes it */
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 118px 28px 36px;
  background: rgba(4, 4, 5, 0.97);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.4s cubic-bezier(0.76, 0, 0.24, 1),
              transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}
/* display:flex above outranks the browser's [hidden] rule, which left
   the closed menu as an invisible full-screen layer swallowing every
   click on the page. Hidden means gone, and while it fades out it
   must not catch taps either. */
.mnav[hidden] { display: none; }
.mnav:not(.is-open) { pointer-events: none; }
.mnav.is-open {
  opacity: 1;
  transform: none;
  transition-duration: 0.6s;
  transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}
.mnav__links { display: grid; gap: 4px; }
.mnav__links a {
  display: block;
  padding: 8px 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 9.5vw, 52px);
  line-height: 1.1;
  color: var(--ivory);
  /* motion-fallback: ok links inside the closed menu, revealed with it */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  transition-delay: calc(var(--i, 0) * 0.06s);
}
.mnav.is-open .mnav__links a { opacity: 1; transform: none; }
.mnav__links a[aria-current="page"] { color: var(--red-lift); }
.mnav__foot {
  display: grid;
  gap: 6px;
  padding-top: 26px;
  border-top: var(--rule);
  font-size: 14px;
  color: var(--ivory-dim);
}
.mnav__foot a {
  font-family: var(--condensed);
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--ivory);
}
@media (prefers-reduced-motion: reduce) {
  .mnav, .mnav__links a { transform: none !important; transition-duration: 0.01s !important; }
}
html.is-menu-open { overflow: hidden; }

/* ---------- book a table (TheFork, via book.js) ---------- */
/* A native modal dialog. Opens with a short rise and fade, closes
   faster than it opens. The widget itself is TheFork's, so it sits in
   its own light card inside the dark panel. */
.book {
  width: min(560px, calc(100% - 32px));
  height: min(880px, calc(100svh - 48px));
  max-width: none; max-height: none;
  margin: auto; padding: 0; border: 0;
  background: transparent; color: var(--ivory);
  overflow: visible;
  /* motion-fallback: ok closed dialog, display:none until showModal(); exit state only */
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.3s cubic-bezier(0.76, 0, 0.24, 1),
              transform 0.3s cubic-bezier(0.76, 0, 0.24, 1),
              display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}
.book[open] {
  opacity: 1;
  transform: none;
  transition-duration: 0.5s;
  transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}
@starting-style {
  .book[open] {
    /* motion-fallback: ok @starting-style entry frame only; the open state is opacity 1 */
    opacity: 0; transform: translateY(24px) scale(0.985);
  }
}
.book::backdrop {
  background: rgba(4, 4, 5, 0);
  transition: background-color 0.3s ease-out, backdrop-filter 0.3s ease-out,
              display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}
.book[open]::backdrop {
  background: rgba(4, 4, 5, 0.74);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
@starting-style {
  .book[open]::backdrop { background: rgba(4, 4, 5, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
}
.book__panel {
  display: flex; flex-direction: column;
  height: 100%;
  background: var(--graphite);
  border: var(--rule);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}
.book__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 16px 18px 26px;
  border-bottom: var(--rule);
}
.book__kicker {
  display: block; margin-bottom: 6px;
  font-family: var(--condensed); font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--red-lift);
}
.book__kicker i { font-style: normal; margin: 0 0.5em; }
.book__title {
  margin: 0;
  font-family: var(--serif); font-weight: 300;
  font-size: 30px; line-height: 1.05; letter-spacing: 0.01em;
}
.book__close {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: 50%;
  color: var(--ivory-dim); cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.book__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.book__close:hover, .book__close:focus-visible { color: var(--ivory); border-color: var(--hair); }
.book__close:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }
.book__close:active { transform: scale(0.96); }
.book__frame { position: relative; flex: 1; min-height: 0; background: var(--ink); }
.book__wait {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center;
  padding: 0 32px; text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 20px;
  color: var(--ivory-dim);
}
.book__frame iframe {
  position: relative; display: block;
  width: 100%; height: 100%; border: 0;
  background: #fff;
  /* motion-fallback: ok revealed on the iframe's load event; the new-tab link below is always visible */
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}
.book__frame.is-loaded iframe { opacity: 1; }
.book__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  padding: 14px 26px;
  border-top: var(--rule);
  font-size: 13px; color: var(--ivory-faint);
}
.book__foot a { color: var(--ivory-dim); border-bottom: 1px solid var(--hair); padding: 6px 0; }
.book__foot a:hover, .book__foot a:focus-visible { color: var(--ivory); border-bottom-color: var(--ivory); }
/* phones: a full-height sheet rising from the bottom */
@media (max-width: 600px) {
  .book { width: 100%; height: 100dvh; margin: 0; transform: translateY(40px); }
  @starting-style { .book[open] { transform: translateY(40px); } }
  .book__panel { border: 0; }
  .book__head { padding: 12px 10px 12px 20px; }
  .book__title { font-size: 26px; }
  .book__foot { padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .book, .book[open] { transform: none; transition-duration: 0.01s; }
  @starting-style { .book[open] { transform: none; } }
}
html.is-book-open { overflow: hidden; }

/* ---------- footer -------------------------------------- */
.ftr {
  background: var(--night); border-top: var(--rule);
  padding: 46px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  font-size: 13px; color: var(--ivory-faint);
}
.ftr__mark { height: 22px; width: auto; }
.ftr a:hover { color: var(--ivory); }
