/* House of Kairos — Restaurant menu (QR landing)
   Self-contained: declares its own faces and tokens so the page loads
   without pulling the marketing stylesheet. */

@font-face {
  font-family: "Marques";
  src: url("/assets/fonts/marques-medium.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Neue Haas";
  src: url("/assets/fonts/neue-haas-roman.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Neue Haas";
  src: url("/assets/fonts/neue-haas-medium.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

/* House of Kairos official palette (Brand Guidelines 2024 v1.0, 03 Colour).
   Jungle Green is the signature and leads; the page is built from Rice White
   and its tints. The two pinks are deliberately unused. */
:root {
  --jungle: #1c4534;              /* Jungle Green - signature, primary ink */
  --jungle-soft: #496a5d;         /* Jungle 80% tint - secondary ink, 5.7:1 */
  --surf: #e5e0da;                /* Rice White - page field and masthead */
  --surf-soft: #eeebe7;           /* Rice White 65% tint - tab bar */
  --paper: #faf9f8;               /* Rice White 20% tint - reading surface */
  --rule: rgba(28, 69, 52, 0.16);
  --rule-strong: rgba(28, 69, 52, 0.3);

  --serif: "Marques", "Times New Roman", Georgia, serif;
  --sans: "Neue Haas", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5.6vw, 40px);
  --price-cell: 3.1rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--surf);
}

body {
  background: var(--surf);
  color: var(--jungle);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

/* Masthead ---------------------------------------------------------- */
/* The mark sits reversed-out over the dining room photo. A Night Green
   scrim sits between them so the white mark holds whatever part of the
   image the crop lands on at a given viewport width. */
.masthead {
  align-items: center;
  background: var(--surf);
  display: grid;
  height: clamp(280px, 40vw, 560px);
  overflow: hidden;
  place-items: center;
  position: relative;
}

.masthead-photo {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center 58%;
  position: absolute;
  width: 100%;
}

.masthead::after {
  /* Weighted to the centre so the mark always has a quiet field behind it,
     while the edges of the photo stay open. */
  background:
    radial-gradient(
      ellipse 62% 58% at 50% 50%,
      rgba(19, 44, 31, 0.62) 0%,
      rgba(19, 44, 31, 0.44) 60%,
      rgba(19, 44, 31, 0.32) 100%
    );
  content: "";
  inset: 0;
  position: absolute;
}

.masthead-name {
  margin: 0;
  position: relative;
  z-index: 1;
}

.masthead-mark {
  filter: brightness(0) invert(1) drop-shadow(0 1px 8px rgba(8, 23, 16, 0.4));
  height: auto;
  width: clamp(84px, 20vw, 128px);
}

/* Tabs -------------------------------------------------------------- */
.tabs {
  background: var(--surf-soft);
  padding: 0 var(--gutter);
  position: sticky;
  top: 0;
  z-index: 5;
}

.tabs-inner {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 620px;
}

.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--rule);
  color: var(--jungle-soft);
  /* warm grey, not a tint: tinted green on cream measured only 2:1 */
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 16px 4px 14px;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease;
}

.tab:hover {
  color: var(--jungle);
}

.tab[aria-selected="true"] {
  border-bottom-color: var(--jungle);
  color: var(--jungle);
}

.tab:focus-visible {
  outline: 2px solid var(--jungle);
  outline-offset: -4px;
}

/* Paper surface ----------------------------------------------------- */
.sheet {
  background: var(--paper);
  margin: 0 auto;
  min-height: 100vh;
  max-width: 1080px;
  padding: clamp(30px, 7vw, 56px) var(--gutter) clamp(44px, 8vw, 72px);
}

.menu[hidden] {
  display: none;
}

/* The tab bar already names the active menu, so the head is print-only
   (there every menu prints on its own page with no tab bar to name it). */
.menu-head {
  border-bottom: 1px solid var(--rule-strong);
  display: none;
  margin: 0 0 clamp(26px, 5vw, 40px);
  padding-bottom: clamp(16px, 3vw, 22px);
}

.menu-title {
  font-family: var(--serif);
  font-size: clamp(38px, 11vw, 62px);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 0.94;
  margin: 0;
  text-transform: uppercase;
}

/* Columns ----------------------------------------------------------- */
.menu-body {
  display: block;
}

.menu-col > .section:last-child {
  margin-bottom: clamp(34px, 6vw, 48px);
}

/* Sections ---------------------------------------------------------- */
.section {
  margin: 0 0 clamp(34px, 6vw, 48px);
}

.section:last-child {
  margin-bottom: 0;
}

.section-head {
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 0 18px;
  padding-bottom: 10px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(26px, 6.6vw, 34px);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.section-meta {
  margin: 0;
  color: var(--jungle-soft);
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Column labels (HOT / ICED, 380 ml / 750 ml) mirror the price grid */
.section-cols {
  margin: 0;
  display: flex;
  flex: none;
  gap: 10px;
}

.section-cols span {
  color: var(--jungle-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
  width: var(--price-cell);
}

/* Items ------------------------------------------------------------- */
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item {
  align-items: baseline;
  display: grid;
  gap: 0 14px;
  grid-template-columns: 1fr auto;
  margin: 0 0 16px;
}

.item:last-child {
  margin-bottom: 0;
}

.item-name {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 600;
  gap: 0 8px;
  line-height: 1.25;
  margin: 0;
}

/* The data voice: gram weights and macros, quiet and precise */
.qty {
  color: var(--jungle-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.tags {
  color: var(--jungle-soft);
  flex: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.item-desc {
  color: var(--jungle-soft);
  font-size: 13.5px;
  grid-column: 1 / 2;
  line-height: 1.45;
  margin: 4px 0 0;
  max-width: 46ch;
}

.item-price {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  grid-row: 1;
  grid-column: 2;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

/* Two-price rows keep their cells aligned with the column labels */
.item-prices {
  display: flex;
  gap: 10px;
  grid-row: 1;
  grid-column: 2;
  margin: 0;
}

.item-prices span {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
  width: var(--price-cell);
}

.item-prices .empty {
  color: rgba(19, 44, 31, 0.35);
  font-weight: 500;
}

/* Macro strip — the point of this menu, so it gets real estate and a rigid
   grid. Fixed ch columns (not padded strings) keep protein/carbs/fat aligned
   down the page whatever the digit count. The kcal cell is left-aligned so
   the line starts flush with the dish name and description above it; the
   label columns are still fixed, so KCAL lines up too. Sized for three
   digits (885 is the highest on the menu). */
.macros {
  align-items: baseline;
  display: grid;
  font-family: var(--mono);
  font-size: clamp(9.5px, 2.95vw, 12px);
  grid-column: 1 / -1;
  text-transform: uppercase;
  grid-template-columns:
    3.6ch 5.5ch   /* kcal    */
    3.6ch 8.5ch   /* protein */
    3.6ch 6.5ch   /* carbs   */
    3.6ch 4.5ch   /* fat     */
    3.6ch 5ch;    /* fibre   */
  margin: 7px 0 0;
}

.macros b {
  color: var(--jungle);
  font-weight: 600;
  padding-right: 0.6ch;
  text-align: right;
}

/* Flush with the text above rather than right-aligned into the margin */
.macros b:first-child {
  text-align: left;
}

.macros span {
  color: var(--jungle-soft);
  letter-spacing: 0.04em;
}

/* Sub-groups inside a section (PROTEIN, CARBS …) */
.group {
  margin: 0 0 26px;
}

/* A group heading following the section rule needs a little air */
.section-head + .group {
  margin-top: 8px;
}

/* A group following an item list needs its own breathing room */
.items + .group {
  margin-top: 34px;
}

.group:last-child {
  margin-bottom: 0;
}

.group-head {
  align-items: baseline;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 0 14px;
}

/* Marques is the heading voice on this page. A group label sits between the
   section above it and the dishes below, so it takes the display face at a
   size that clears the dish names it heads. */
.group-title {
  font-family: var(--serif);
  font-size: clamp(21px, 5vw, 23px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
}

.group-price {
  margin: 0;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.group-note {
  color: var(--jungle-soft);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* Footer ------------------------------------------------------------ */
.legend {
  border-top: 1px solid var(--rule-strong);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: clamp(38px, 6vw, 56px) 0 0;
  padding-top: 18px;
}

.legend span {
  color: var(--jungle-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legend b {
  color: var(--jungle);
  font-weight: 600;
}

.fineprint {
  color: var(--jungle-soft);
  font-size: 12px;
  line-height: 1.5;
  margin: 14px 0 0;
}

/* Wide screens: mirror the printed A5 two-column arrangement --------- */
@media (min-width: 900px) {
  .menu-body {
    align-items: start;
    display: grid;
    gap: 0 clamp(44px, 5vw, 76px);
    grid-template-columns: 1fr 1fr;
  }

  .menu-col {
    min-width: 0;
  }

  .menu-col > .section:last-child {
    margin-bottom: 0;
  }
}

/* Motion ------------------------------------------------------------ */
.menu:not([hidden]) {
  animation: rise 260ms ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu:not([hidden]) {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* Print: staff reference — show every menu, drop the chrome ---------- */
@media print {
  html,
  body {
    background: #fff;
  }

  .tabs,
  .masthead-photo {
    display: none;
  }

  .masthead::after {
    display: none;
  }

  .masthead {
    background: none;
    color: var(--jungle);
    height: auto;
    padding: 0 0 8px;
  }

  .masthead-mark {
    filter: none;
  }

  .sheet {
    background: #fff;
  }

  .menu[hidden] {
    display: block;
  }

  .menu-head {
    display: block;
  }

  .menu {
    break-before: page;
  }

  .menu:first-of-type {
    break-before: auto;
  }

  .section {
    break-inside: avoid;
  }
}
