/* ============================================================
   bento-base.css
   ────────────────────────────────────────────────────────────
   Reset + global typography + page chrome (header/footer/buttons).
   Loaded on every page after bento-tokens.css.
   ============================================================ */

/* ── 1. Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote {
  margin: 0; padding: 0;
}
ul, ol { list-style: none; }
img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
input, button, textarea, select { font: inherit; color: inherit; }

/* ── 2. Page chrome / globals ──────────────────────────────── */
html {
  background: var(--paper-bone);
  scroll-behavior: smooth;
  color-scheme: light;
  /* The "paper grain" — a very faint, repeating noise made entirely
     out of stacked radial gradients. Zero image weight; just adds
     a touch of organic warmth so big tiles don't read as flat blocks. */
  background-image:
    radial-gradient(circle at 12% 18%, rgba(31,64,17,0.025), transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(200,49,42,0.018), transparent 38%);
}

body {
  background: transparent;
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: calc(var(--header-h) + 16px);
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

/* Selection & focus */
::selection { background: var(--matcha-300); color: var(--ink-900); }
:focus-visible {
  outline: 2px solid var(--matcha-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Skip link */
.skip-link {
  position: fixed;
  top: -100px; left: 16px;
  background: var(--ink-900);
  color: var(--paper-bone);
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-weight: 500;
  z-index: 100;
  transition: top var(--dur-1) var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* ── 3. Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;        /* Instrument Serif looks best at regular weight */
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--ink-900);
}
h1 { font-size: var(--t-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p  { color: var(--ink-700); }

em, .italic { font-style: italic; }
strong { font-weight: 500; }

/* Editorial italic — used inline inside large headlines */
.italic-display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-500);
}

/* Eyebrow / section tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-ui);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--ink-500);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--ink-500);
  display: inline-block;
}
.eyebrow--matcha { color: var(--matcha-700); }
.eyebrow--matcha::before { background: var(--matcha-500); }

/* Tabular numerals everywhere we show prices / stats */
.tnum {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ── 4. Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-5);
  background: rgba(246,240,225,0.85);
  backdrop-filter: blur(14px) saturate(110%);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  border-bottom: var(--rule);
}

/* The right-hand CTA cluster — two buttons: ghost "Book" + filled
   "Order online". At narrow widths the ghost button hides (the nav
   carries the Book link there). */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
@media (max-width: 1080px) {
  /* Drop the ghost Book button at tablet — nav still has the link */
  .header-cta .btn--ghost { display: none; }
}

/* Brand — a circular tile around the logo placeholder.
   Because we have no logo yet, this is a real bento tile: a small
   filled circle with the letters "sc" set in display italic. When a
   real logo arrives, swap the inner contents and keep the chip. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.brand__mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ink-900);
  color: var(--paper-bone);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  flex: 0 0 auto;
  /* Tiny inset highlight to keep the chip looking like ceramic, not flat. */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 1px 2px rgba(80,60,30,0.18);
}
.brand__wordmark {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink-900);
  white-space: nowrap;
}
.brand__wordmark em {
  font-style: italic;
  color: var(--ink-500);
}

/* Primary nav */
.primary-nav ul {
  display: flex;
  gap: var(--s-6);
  justify-content: center;
}
.primary-nav a {
  position: relative;
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--ink-700);
  padding: 6px 0;
  transition: color var(--dur-1) var(--ease-out);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--matcha-500);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-2) var(--ease-out);
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--ink-900); }
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 760px) {
  .primary-nav { display: none; }
  .site-header { grid-template-columns: auto 1fr; }
}

/* ── 5. Buttons / CTAs ─────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--paper-bone);
  background: var(--ink-900);
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform var(--dur-2) var(--ease-spring),
              background var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out);
}
.btn--lg { padding: 14px 26px; font-size: 1rem; }

.btn--matcha {
  background: var(--matcha-500);
  color: var(--paper-bone);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-900);
  border: 1px solid var(--paper-edge);
}
.btn--ghost:hover {
  background: var(--ink-900);
  color: var(--paper-bone);
  border-color: var(--ink-900);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: 80ms; }
.btn:hover.btn--matcha { background: var(--matcha-700); }
.btn:hover.btn:not(.btn--matcha):not(.btn--ghost) { background: var(--shoyu); }

.btn__arrow {
  display: inline-block;
  transition: transform var(--dur-2) var(--ease-spring);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Small chip — used in nav strips, category filters, location chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-700);
  background: var(--paper-cream);
  border: 1px solid var(--paper-edge);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  cursor: pointer;
}
.chip:hover { background: var(--ink-900); color: var(--paper-bone); border-color: var(--ink-900); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--matcha-500);
  color: var(--paper-bone);
  border-color: var(--matcha-500);
}
.chip__count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-feature-settings: "tnum";
  opacity: 0.7;
}

/* ── 6. Page-shell layout ──────────────────────────────────── */
.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-7) var(--gutter) var(--s-9);
}
.page--tight { padding-top: var(--s-6); }

/* Section header pattern (eyebrow + headline + lede)
   We use line-height 1.0 instead of --lh-tight (0.95) here because
   the H2 wraps over two lines often, and italic descenders + the
   dot on "tight." need a hair of breathing room to clear the lede
   paragraph below. */
.section-head {
  display: grid;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
  max-width: 64ch;
}
.section-head__title {
  font-size: var(--t-h2);
  line-height: 1.02;
  /* Pull-down nudge so a wrapped italic line never crashes into the lede. */
  padding-bottom: 0.06em;
}
.section-head__title em {
  color: var(--ink-500);
}
.section-head__lede {
  font-size: var(--t-lede);
  color: var(--ink-700);
  line-height: var(--lh-snug);
  max-width: 52ch;
}

/* ── 7. Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--ink-900);
  color: var(--paper-bone);
  padding: var(--s-9) var(--gutter) var(--s-6);
  margin-top: var(--s-9);
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-7);
}
@media (max-width: 800px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: 40ch;
}
.site-footer__brand .brand__mark {
  width: 56px; height: 56px;
  font-size: 1.6rem;
  background: var(--paper-bone);
  color: var(--ink-900);
}
.site-footer__brand h2 {
  font-size: 1.6rem;
  color: var(--paper-bone);
}
.site-footer__brand p {
  font-size: 0.94rem;
  color: rgba(246,240,225,0.7);
  line-height: 1.55;
}
.site-footer__nav h3 {
  font-family: var(--font-ui);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: rgba(246,240,225,0.5);
  margin-bottom: var(--s-4);
}
.site-footer__nav ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer__nav a {
  color: var(--paper-bone);
  font-size: 0.96rem;
  font-weight: 400;
  position: relative;
  display: inline-block;
  transition: color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.site-footer__nav a:hover { color: var(--matcha-300); transform: translateX(3px); }

.site-footer__rule {
  max-width: var(--maxw);
  margin: var(--s-8) auto var(--s-5);
  height: 1px;
  background: rgba(246,240,225,0.12);
}
.site-footer__fine {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: rgba(246,240,225,0.45);
}
@media (max-width: 560px) {
  .site-footer__fine { flex-direction: column; gap: var(--s-2); }
}

/* ── 8. Reveal-on-scroll primitive ─────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity var(--dur-4) var(--ease-out),
    transform var(--dur-4) var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-revealed { opacity: 1; transform: translate3d(0,0,0); }
[data-reveal].is-settled  { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
