/* === CSS CUSTOM PROPERTIES === */
:root {
  --color-bg:           #FBF6EE;
  --color-bg-alt:       #F1E9D8;
  --color-text:         #2C1810;
  --color-text-light:   #6B5544;
  --color-primary:      #722F37;
  --color-primary-dark: #561D24;
  --color-accent:       #708238;
  --color-accent-light: #A8B570;
  --color-white:        #FFFFFF;
  --color-border:       #E0D6C2;
  --color-card-bg:      #FFFFFF;

  --font-heading: 'Cormorant Garamond', serif;
  --font-body:    'DM Sans', sans-serif;
  /* Brand wordmark = designer SCRIPT face (family rule #38). Great Vibes is the
   * free Google-Fonts placeholder; at customer-fork time self-host a licensed
   * commercial face (Edwardian Script ITC / Fave Script Pro / Apple Chancery /
   * Fairwater Script). Applied to .nav-logo span + .footer-brand h3, both tiers. */
  --font-wordmark: 'Great Vibes', cursive;

  --max-width: 1280px;   /* widened from 1100 — content frame now matches the wider nav frame so the site fills wide screens instead of a narrow centred column */
  --radius-card: 6px;
  --radius-btn:  4px;

  /* Button system tokens (rule #42) — SIZE/SHAPE only; colour stays per-variant */
  --btn-pad-y: 0.85rem;
  --btn-pad-x: 1.85rem;
  --btn-min-h: 46px;
  --btn-font-size: 0.92rem;
  --btn-font-weight: 500;

  --shadow-card: 0 2px 12px rgba(44, 24, 16, 0.08);
  --shadow-card-hover: 0 8px 28px rgba(44, 24, 16, 0.16);
  --transition: 0.25s ease;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}

/* ---------- atmospheric scroll-crossfade backdrop (PREMIUM, family signature ADG 514/521) ---------- */
/* A fixed full-viewport photographic backdrop behind the whole page; sections carry
 * data-bg and an IntersectionObserver crossfades photo-to-photo as the visitor scrolls.
 * A cream radial wash (light brand) keeps dark text legible. Reduced-motion → static first photo. */
.bg-stage { position: fixed; inset: 0; z-index: -2; background: var(--color-bg); }
.bg-layer { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s cubic-bezier(.22,1,.36,1); will-change: opacity; }
.bg-layer.is-active { opacity: 1; }
.bg-wash {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%,
    rgba(251,246,238,0.78) 0%,
    rgba(251,246,238,0.72) 45%,
    rgba(251,246,238,0.60) 100%);
}
/* Content sections go transparent so the fixed photo reads as atmosphere behind them.
 * Cards stay opaque (their own background rules untouched). Hero, page-banner and
 * footer keep their own backgrounds. They are not in this transparent set. */
.specials,
.menu-preview,
.chef-story,
.booking-section,
.story-section,
.ingredients-band,
.values-section,
.contact-section { background: transparent !important; }

/* page wrappers sit above the backdrop */
.nav, main, .footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: -0.005em;
}

h1 { font-weight: 600; }
h2 { font-weight: 600; }
h3 { font-weight: 600; }

p { color: var(--color-text); }

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.85rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* === FADE-IN ANIMATION === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-fade { animation: fadeUp 0.6s ease-out both; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.4s; }

/* === NAVIGATION === */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.nav.scrolled { box-shadow: 0 2px 16px rgba(44, 24, 16, 0.08); }

.nav-inner {
  max-width: 1280px;                       /* matches --max-width content frame so nav + body share ONE width (was 1440 — made hero look narrower than nav); fluid gaps below handle compacting */
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 2.5vw, 2.5rem);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.4rem, 0.6vw, 0.75rem);      /* small edge floor between logo↔menu↔CTA; space-evenly inside .nav-links does the balancing */
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.nav-logo svg {
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-logo:hover svg { transform: rotate(360deg); }
@media (prefers-reduced-motion: reduce) {
  .nav-logo svg,
  .nav-logo:hover svg { transition: none; transform: none; }
}

.nav-logo span {
  /* Wordmark = designer SCRIPT face (family rule #38, retrofit 2026-06-29). Script
   * faces sit smaller on the body so the visual size is bumped + weight normalised. */
  font-family: var(--font-wordmark);
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: 0.005em;
  white-space: nowrap;            /* brand stays on ONE line */
  line-height: 1.04;
}

.nav-links {
  display: flex;
  flex: 1 1 auto;                          /* grow into the empty middle so the menu stretches edge-to-edge instead of clustering in the centre */
  align-items: center;
  justify-content: center;                 /* links grouped tight in the centre (dyrlege/rørlegger style), not spread edge-to-edge */
  gap: clamp(0.5rem, 1vw, 1.5rem);         /* minimum inter-item floor; space-evenly distributes the remaining width */
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  white-space: nowrap;                      /* keep multi-word links ("Om oss", "Kontakt & Booking") on one line */
  transition: color var(--transition);
}

/* Premium nav: hover + current-page state = brand-accent burgundy ONLY.
 * No underline, no border, no background-shift. Family-wide locked contract
 * (per-prototype context template §"Premium tier" 2026-05-08). The .active class is
 * applied to the current-page link by initNav() in js/main.js. Mobile menu
 * follows the same rule below. */
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

/* Top-right booking CTA — now a canonical button (rule #42): markup carries
 * `class="btn btn-accent btn--nav"`; the compact `.btn--nav` size modifier
 * lives in the === BUTTONS === section. On every page, links straight to the
 * booking iframe section on kontakt.html via the #booking anchor. */

/* Family-standard sliding-pill NO/EN language toggle (proven on dyrlege,
 * commit 4e2e25d). Mechanic is family-locked: .34s cubic-bezier + translateX(100%)
 * pill slide. Only the colour tokens are brand-tuned below (light nav map). */
.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
}

.lang-toggle .lang-pill {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--color-primary);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.34s cubic-bezier(0.34, 1.45, 0.5, 1);
}

.lang-toggle[data-lang="en"] .lang-pill {
  transform: translateX(100%);
}

.lang-opt {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.32rem 0.72rem;
  min-width: 34px;
  text-align: center;
  color: var(--color-text-light);
  transition: color 0.25s;
}

.lang-toggle[data-lang="no"] .lang-opt[data-l="no"],
.lang-toggle[data-lang="en"] .lang-opt[data-l="en"] {
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
/* Mobile menu — family-locked compact-dropdown pattern (bakery + bilverksted
 * 2026-04-xx). Replaces the previous full-screen burgundy overlay 2026-05-08.
 * 240-wide panel anchored top-right; click-outside + Escape close. Premium
 * keeps the same desktop-nav contract on .active (burgundy color, no
 * underline), applied below in the @media block via the same .mobile-menu
 * a:hover, .mobile-menu a.active selector. Mobile-specific styling lives
 * inside the @media (max-width: 768px) block at the bottom of this file. */
.mobile-menu {
  display: none;
  flex-direction: column;
}

.mobile-menu .lang-toggle {
  font-size: 1rem;
  padding: 0.5rem 1.2rem;
  margin-top: 0.4rem;
}

.mobile-menu-cta {
  display: block;
  align-self: center;              /* rule #42: content-sized + centred in the drawer, NOT stretched by the flex column's align-items:stretch */
  margin-top: 0.7rem;
  padding: 0.78rem 1rem;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 350ms cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mobile-menu-cta:hover,
.mobile-menu-cta:focus-visible {
  background: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(86, 29, 36, 0.28);
}

/* === HERO === */
.hero {
  position: relative;
  height: 78vh;
  min-height: 480px;
  max-height: 720px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 50%;
  background-repeat: no-repeat;
  transition: transform 6s ease, filter var(--transition);
}

.hero:hover .hero-bg { transform: scale(1.04); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 24, 16, 0.78) 0%, rgba(44, 24, 16, 0.32) 50%, rgba(44, 24, 16, 0.1) 100%);
}

/* Steam-rise hover effect */
.hero-steam {
  position: absolute;
  bottom: 30%;
  left: 50%;
  width: 4px;
  height: 60px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero:hover .hero-steam { opacity: 0.45; }

.hero-steam::before,
.hero-steam::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,250,240,0.55) 0%, transparent 70%);
  transform: translateX(-50%);
  animation: steamRise 3.2s ease-out infinite;
  filter: blur(6px);
}

.hero-steam::after {
  animation-delay: 1.6s;
  width: 90px;
  height: 90px;
}

@keyframes steamRise {
  0%   { transform: translateX(-50%) translateY(0) scale(0.4); opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: translateX(-50%) translateY(-180px) scale(1.4); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 2rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-content .section-label {
  color: var(--color-accent-light);
  margin-bottom: 1rem;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  color: var(--color-bg);
  max-width: 720px;
  margin-bottom: 1rem;
  line-height: 1.05;
  font-weight: 500;
  /* Deliberate 2-line break (rule #40c): the headline string carries a literal
   * \n after "mano"/"pasta"; pre-line honours it on desktop + mobile and it
   * survives the typewriter tokeniser (\n is a normal char token) + the i18n
   * swap. Both tiers, NO + EN. */
  white-space: pre-line;
}

.hero-content h1 em {
  font-style: italic;
  color: var(--color-accent-light);
  font-weight: 400;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 250, 240, 0.88);
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-family: var(--font-body);
}

/* === Hero CTA pair ===
 * Desktop: inline flex row (unchanged behaviour). Mobile equalization lives in
 * the @media (max-width: 768px) block (rule #40a). */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  min-height: var(--btn-min-h);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: var(--btn-font-weight);
  font-size: var(--btn-font-size);
  letter-spacing: 0.04em;
  transition: all var(--transition);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(114, 47, 55, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-bg);
  border-color: rgba(251, 246, 238, 0.5);
}

.btn-outline:hover {
  background: var(--color-bg);
  color: var(--color-primary);
  border-color: var(--color-bg);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-accent:hover {
  background: #5b6a2c;
  transform: translateY(-2px);
}

/* Button modifiers (rule #42) — SIZE/SHAPE only, never colour */
.btn--block { width: 100%; justify-content: center; }

.btn--nav {                       /* compact top-bar pill; same shape family */
  min-height: 0;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.btn--sm {                        /* dense in-card action (premium menu cards) */
  min-height: 0;
  padding: 0.42rem 1.1rem;
  font-size: 0.82rem;
}

.text-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: gap var(--transition);
}

.text-link:hover { gap: 0.6rem; }

/* === FLATWARE DIVIDER === */
.flatware-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2.5rem 2rem;
  color: var(--color-accent);
}

.flatware-divider::before,
.flatware-divider::after {
  content: '';
  flex: 1;
  max-width: 220px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.flatware-divider svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* === SECTION SHARED === */
.section-pad { padding: 5.5rem 2rem; }
.section-pad-sm { padding: 4rem 2rem; }

.section-heading {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-top: 0.4rem;
  font-style: italic;
  font-weight: 400;
}

.section-heading p {
  color: var(--color-text-light);
  max-width: 560px;
  margin: 1rem auto 0;
  font-size: 1rem;
}

/* === TODAY'S SPECIALS === */
.specials {
  padding: 5.5rem 2rem;
  background: var(--color-bg);
}

.specials-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.specials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.special-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}

.special-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.special-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: var(--color-primary);
  color: var(--color-bg);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  animation: pulse-badge 2.4s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(114, 47, 55, 0.5); }
  50%      { box-shadow: 0 0 0 8px rgba(114, 47, 55, 0); }
}

.special-card-img {
  height: 220px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.special-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96);
  transition: transform 0.6s ease;
}

.special-card:hover .special-card-img img { transform: scale(1.05); }

.special-card-body { padding: 1.6rem 1.6rem 1.85rem; }

.special-card-body h3 {
  font-size: 1.45rem;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
}

.special-card-body .italian-name {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-accent);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  display: block;
}

.special-card-body p {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

.special-card-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* === MENU PREVIEW === */
.menu-preview {
  padding: 5.5rem 2rem;
  background: var(--color-bg-alt);
}

.menu-preview-inner {
  max-width: 880px;
  margin: 0 auto;
}

.menu-category {
  margin-bottom: 3rem;
}

.menu-category:last-child { margin-bottom: 0; }

.menu-category-image {
  display: block;
  width: 100%;
  max-width: 520px;
  height: 240px;
  margin: 0 auto 1.5rem;
  object-fit: cover;
  object-position: center 50%;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(60, 30, 30, 0.16);
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.menu-category:hover .menu-category-image {
  transform: scale(1.012);
  box-shadow: 0 14px 36px rgba(60, 30, 30, 0.22);
}

@media (max-width: 768px) {
  .menu-category-image {
    height: 170px;
    max-width: 100%;
    border-radius: 8px;
  }
  .menu-category:hover .menu-category-image {
    transform: none;
  }
}

.menu-category-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.menu-category-heading h3 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}

.menu-category-heading .menu-category-sub {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: baseline;
}

.menu-item-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text);
  font-weight: 500;
}

.menu-item-dots {
  flex: 1;
  border-bottom: 1px dotted var(--color-border);
  margin: 0 0.5rem;
  transform: translateY(-4px);
}

.menu-item-row {
  display: flex;
  align-items: baseline;
  grid-column: 1 / 2;
}

.menu-item-price {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
  white-space: nowrap;
}

.menu-item-desc {
  grid-column: 1 / 2;
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.55;
  margin-top: 0.3rem;
}

.menu-cta-row { text-align: center; margin-top: 3rem; }

/* === CHEF STORY === */
.chef-story {
  padding: 5.5rem 2rem;
  background: var(--color-bg);
}

.chef-story-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 4rem;
  align-items: center;
}

.chef-story-image {
  position: relative;
}

.chef-story-image img {
  display: block;
  width: 100%;
  height: 540px;
  object-fit: cover;
  /* Same face-friendly crop as classic (see classic style.css for full
   * root-cause comment). 38% 30% keeps Lucia's eyes in the upper third
   * of the visible window. Locked 2026-05-08. */
  object-position: 38% 30%;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hover);
  filter: saturate(0.96);
}

.chef-story-text h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.chef-story-text p {
  color: var(--color-text-light);
  margin-bottom: 1.1rem;
  line-height: 1.85;
}

.chef-signature {
  margin-top: 1.75rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--color-primary);
}

/* === BOOKING SECTION === */
.booking-section {
  padding: 5.5rem 2rem;
  background: var(--color-bg-alt);
  text-align: center;
}

.booking-inner {
  max-width: 760px;
  margin: 0 auto;
}

.booking-inner > p {
  color: var(--color-text-light);
  max-width: 540px;
  margin: 0.5rem auto 2.5rem;
}

.booking-iframe-wrap {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.booking-iframe-fallback {
  text-align: center;
  padding: 2rem 1rem;
}

.booking-iframe-fallback svg {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.booking-iframe-fallback p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.booking-fork-logo {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

/* === CONTACT SECTION === */
.contact-section {
  padding: 5.5rem 2rem;
  background: var(--color-bg);
}

.contact-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.contact-info-block { margin-bottom: 1.75rem; }

.contact-info-block h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.45rem;
}

.contact-info-block p,
.contact-info-block a {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.7;
}

.contact-info-block a {
  color: var(--color-primary);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.contact-info-block a:hover { border-color: var(--color-primary); }

.hours-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--color-border);
}

.hours-row:last-child { border-bottom: none; }

.hours-day {
  color: var(--color-text);
  font-weight: 500;
}

.hours-time { color: var(--color-text-light); }

.hours-row.closed .hours-time {
  color: var(--color-primary);
  font-style: italic;
}

.contact-map {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  height: 460px;
  background: var(--color-bg-alt);
  position: relative;
}

.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* === PAGE BANNER === */
.page-banner {
  position: relative;
  height: 32vh;
  min-height: 240px;
  max-height: 360px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 55%;
}

.page-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 24, 16, 0.78) 0%, rgba(44, 24, 16, 0.35) 100%);
}

.page-banner-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 2rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.page-banner-content .section-label { color: var(--color-accent-light); }

.page-banner-content h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--color-bg);
  margin-bottom: 0.4rem;
  font-style: italic;
  font-weight: 500;
}

.page-banner-content p {
  color: rgba(251, 246, 238, 0.85);
  font-size: 1rem;
  max-width: 580px;
}

/* === ABOUT PAGE === */
.story-section { padding: 5.5rem 2rem; background: var(--color-bg); }

.story-inner {
  max-width: 720px;
  margin: 0 auto;
}

.story-inner h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-style: italic;
  margin-bottom: 2rem;
  text-align: center;
}

.story-text p {
  color: var(--color-text-light);
  line-height: 1.9;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.story-text p:first-child::first-letter {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--color-primary);
  float: left;
  line-height: 0.95;
  padding: 0.35rem 0.6rem 0 0;
  font-style: italic;
}

.ingredients-band {
  padding: 4.5rem 2rem 5rem;
  background: var(--color-bg);
  text-align: center;
}

.ingredients-band-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.ingredients-band h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-style: italic;
  font-weight: 400;
  color: var(--color-primary);
  margin: 0.4rem 0 2.6rem;
}

.ingredients-band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.ingredients-band-tile {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.ingredients-band-tile img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center 50%;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(60, 30, 30, 0.16);
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
              filter   700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ingredients-band-tile:hover img {
  transform: scale(1.018);
  box-shadow: 0 14px 36px rgba(60, 30, 30, 0.22);
}

/* === B&W → COLOR HOVER (desktop only) ============================
 * The chef-grid (4 tiles, "Kjøkkenet, råvarene og rommet") and the
 * ingredients-band (3 tiles, "Råvarene som teller") on om-oss.html
 * sit black-and-white at rest on hover-capable devices and animate
 * to full colour when the cursor lands on a tile. Tiles also animate
 * back to B&W on hover-out, so the transition is bidirectional.
 *
 * `@media (hover: hover) and (pointer: fine)` is the modern way to
 * isolate "real mouse hover" from touch screens. iOS Safari, Android
 * Chrome, etc. report `(hover: none)` / `(pointer: coarse)` so the
 * grayscale rule never applies on touch — mobile users always see
 * full colour. This is the "iOS-type touch activity" Bithun asked
 * for: no resting B&W state on touch (which would feel broken since
 * the user has no natural way to "un-hover" off a tile), and no
 * sticky-hover quirks where iOS occasionally locks into a hover
 * state after a tap.
 *
 * The transition timing matches the existing premium hover language
 * (700ms cubic-bezier(0.22, 0.61, 0.36, 1) — same easing as the
 * special-card and value-block hover overrides). Locked 2026-05-08. */
/* B&W resting state applies on every device. Desktop uses :hover.
 * Touch (iOS / Android) gets a JS-driven .is-tapped class added by
 * initChefGridTouchHover in premium-features.js — touchstart adds
 * the class (firing the moment a finger lands on a tile, even when
 * that touch is the start of a scroll), it auto-clears after 1.4s,
 * and tapping a sibling swaps focus. Same pattern as bakeri-demo's
 * .gallery-item.active. Replaced 2026-05-09 (was wrapped in
 * @media (hover: hover) which left mobile permanently colour). */
.chef-grid-item img,
.ingredients-band-tile img {
  filter: grayscale(100%);
}
.chef-grid-item:hover img,
.chef-grid-item.is-tapped img,
.ingredients-band-tile:hover img,
.ingredients-band-tile.is-tapped img {
  filter: grayscale(0%);
}

.ingredients-band-tile figcaption {
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--color-text-light);
  margin-top: 1rem;
  font-style: italic;
  line-height: 1.45;
}

.about-photos {
  padding: 0 2rem 5.5rem;
  background: var(--color-bg);
}

.about-photos-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 240px 240px;
  gap: 1rem;
}

.about-photos-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.5s ease, box-shadow var(--transition);
}

.about-photos-inner img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.about-photos-inner img:nth-child(1) { grid-row: 1 / 3; }

.values-section {
  padding: 5.5rem 2rem;
  background: var(--color-bg-alt);
}

.values-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.values-inner > h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.value-block { padding: 1rem 1rem 0; }

.value-icon {
  width: 44px;
  height: 44px;
  color: var(--color-accent);
  margin: 0 auto 1.2rem;
}

.value-block h3 {
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.value-block p {
  font-size: 0.93rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* === FOOTER === */
.footer {
  background: var(--color-text);
  color: rgba(251, 246, 238, 0.78);
  padding: 4rem 2rem 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand h3 {
  /* Footer wordmark = designer SCRIPT face (family rule #38, retrofit 2026-06-29).
   * Enlarged + non-italic; Great Vibes already reads as a flowing script. */
  font-family: var(--font-wordmark);
  font-size: 2.6rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-bg);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgba(251, 246, 238, 0.6);
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer-address {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: rgba(251, 246, 238, 0.55);
  font-style: normal;
}

/* Footer social row — same structure/branding as classic (family rule #31:
 * footer wordmark + social row identical across tiers; only hover-effects
 * differ). Premium adds the hover lift + brand-colour fill. Restaurant =
 * Instagram + Facebook. */
.footer-social-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}
.footer-social { display: flex; gap: 0.7rem; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 246, 238, 0.08);
  color: rgba(251, 246, 238, 0.72);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.footer-social a:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}
.footer-social svg { width: 18px; height: 18px; }

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(251, 246, 238, 0.5);
  margin-bottom: 1rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: rgba(251, 246, 238, 0.72);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--color-bg); }

.footer-contact p {
  color: rgba(251, 246, 238, 0.72);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-contact a {
  color: var(--color-accent-light);
  transition: color var(--transition);
}

.footer-contact a:hover { color: var(--color-bg); }

.footer-contact .response-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(251, 246, 238, 0.45);
  font-style: italic;
}

.footer-bottom {
  border-top: 1px solid rgba(251, 246, 238, 0.1);
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-bottom span,
.footer-bottom a {
  font-size: 0.8rem;
  color: rgba(251, 246, 238, 0.4);
}

.footer-bottom a:hover { color: rgba(251, 246, 238, 0.7); }

/* === DEMO MODAL (shared backdrop + close button; checkout uses .checkout-box) === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.72);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--color-bg);
  border-radius: 8px;
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
  box-shadow: 0 20px 60px rgba(44, 24, 16, 0.3);
}

.modal-backdrop.open .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-box h2 {
  font-size: 1.6rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.modal-box p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.modal-box p:last-of-type { margin-bottom: 1.75rem; }

.modal-box a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Modal close button — canonical `btn btn-accent btn--block` (rule #42);
 * the bespoke .modal-close-btn class was retired 2026-07-01. */

/* === 404 PAGE === */
.not-found {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
}

.not-found-inner h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--color-accent-light);
  margin-bottom: 0;
  line-height: 1;
  font-style: italic;
}

.not-found-inner h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: var(--color-text);
  font-style: italic;
}

.not-found-inner p {
  color: var(--color-text-light);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  font-style: italic;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .specials-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { gap: 1.5rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  /* Rule #43 (2026-07-01): the language toggle is a persistent global control —
   * it stays in the NAV BAR next to the hamburger on mobile, NOT inside the drawer.
   * Keep the nav-bar #lang-toggle visible; hide the in-drawer #mobile-lang-toggle. */
  .nav-right #lang-toggle { display: inline-flex; }
  .mobile-menu #mobile-lang-toggle { display: none; }
  .btn--nav {
    font-size: 0.7rem;
    padding: 0.42rem 0.78rem;
    letter-spacing: 0.04em;
  }
  .hamburger { display: flex; }

  /* === Mobile menu — family-locked floating glass-card pattern ===
   * 2026-05-08 (third polish iteration): upgraded from the previous solid-bg
   * compact-dropdown to the bakery-premium glass-card pattern after Bithun's
   * second smoke walk. Mirrors `bakeri-demo/demo-bakeri-premium/css/style.css`
   * lines 2008-2042: 240-wide panel, cream tinted at ~70% opacity,
   * `backdrop-filter: blur(20px) saturate(170%)` so page content blurs through
   * it, subtle olive-tinted border, soft shadow, transform + opacity easing
   * on open. Premium keeps the locked .active = burgundy contract (NO
   * underline) below. Click-outside + Escape close behaviour wired in
   * js/main.js initNav(). */
  .mobile-menu {
    display: flex !important;
    position: fixed !important;
    top: 72px !important;
    right: 1rem !important;
    left: auto !important;
    bottom: auto !important;
    inset: 72px 1rem auto auto !important;
    width: 240px !important;
    max-width: calc(100vw - 2rem) !important;
    height: auto !important;
    background: rgba(251, 246, 238, 0.7) !important;
    -webkit-backdrop-filter: blur(20px) saturate(170%) !important;
    backdrop-filter: blur(20px) saturate(170%) !important;
    border: 1px solid rgba(112, 130, 56, 0.2) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(58, 38, 24, 0.15) !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0.4rem 0 !important;
    overflow: hidden !important;
    z-index: 1001 !important;
    transform: translateY(-8px) scale(0.97) !important;
    transform-origin: top right !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.16, 1),
                opacity 0.22s ease !important;
  }
  .mobile-menu.open {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
    pointer-events: all !important;
  }
  .mobile-menu a {
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    color: var(--color-text) !important;
    text-decoration: none !important;
    padding: 0.8rem 1.2rem !important;
    border-bottom: 1px solid var(--color-border) !important;
    text-align: left !important;
    line-height: 1.3 !important;
  }
  .mobile-menu a:last-of-type { border-bottom: none !important; }
  /* Premium nav contract: hover + .active = brand burgundy, NO underline.
   * Rule #42/#43 (2026-07-09, S68 wave 3): the drawer CTA (.mobile-menu-cta) is
   * an accent-FILLED button, so the burgundy active/hover text colour rendered
   * invisible on the burgundy fill (dark var(--color-text) from the base
   * .mobile-menu a rule already won via !important, and .active made it worse on
   * the booking page). Exclude the CTA from the recolour and force its text
   * white in EVERY state via the dedicated rule below. */
  .mobile-menu a:not(.mobile-menu-cta):hover,
  .mobile-menu a.active:not(.mobile-menu-cta) {
    background: var(--color-bg-alt, transparent) !important;
    color: var(--color-primary) !important;
  }
  .mobile-menu a.mobile-menu-cta {
    color: #fff !important;
  }

  .hero { height: 70vh; min-height: 420px; }
  .hero-content h1 { font-size: clamp(1.9rem, 7vw, 2.5rem); }

  /* Hero CTAs equalized to the wider label via a max-content grid column
   * (rule #40a): content-sized, NOT viewport-wide; both buttons match. */
  .hero-actions {
    display: grid;
    grid-template-columns: max-content;
    gap: 0.85rem;
    justify-content: start;
  }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .specials-grid { grid-template-columns: 1fr; }

  .menu-item-name { font-size: 1.05rem; }
  .menu-item-price { font-size: 1rem; }

  .chef-story-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .chef-story-image img { height: 380px; }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-map { height: 320px; }

  .about-photos-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .about-photos-inner img {
    height: 240px;
  }

  .about-photos-inner img:nth-child(1) { grid-row: auto; }

  .ingredients-band {
    padding: 3.2rem 1.5rem 3.6rem;
  }
  .ingredients-band-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .ingredients-band-tile img {
    height: 210px;
  }
  .ingredients-band-tile:hover img {
    transform: none;
  }

  .values-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Footer stays 2-up on tablet + phone (rule #40b): brand spans the top row,
   * Pages (nav) LEFT + Contact RIGHT on the second row, never an all-left 1-col
   * stack. Both tiers identical at rest (rule #31). */
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    column-gap: 1.6rem;
    row-gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .flatware-divider { padding: 1.5rem 1rem; }
  .flatware-divider::before,
  .flatware-divider::after { max-width: 80px; }

  .section-pad { padding: 3.5rem 1.25rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .nav-inner { padding: 0 1.25rem; gap: 1rem; }
  .hero-content { padding: 2.5rem 1.25rem 3rem; }

  /* iPhone 12 mini (375px) hamburger-crop fix — 2026-05-09:
   * At 480px and below, the top-right "Reserver bord" CTA is duplicated inside
   * the mobile-menu drawer (.mobile-menu-cta on every page), so hiding the nav
   * pill costs the user nothing — they reach booking via hamburger → CTA in
   * one tap instead of zero. The trade-off is the four-element row
   * (logo + CTA + lang + hamburger) no longer competes for space and the
   * hamburger stops getting pushed off the right edge of the viewport.
   * Bug reported 2026-05-09 from Bithun's father's iPhone 12 mini; reproduced
   * locally at DevTools 375px.
   * (Selector retargeted .nav-cta → .btn--nav 2026-07-01, rule #42 —
   * do NOT drop this narrow-nav hide; locked 2026-05-09.) */
  .btn--nav { display: none; }
}

/* ============================================ */
/* === PREMIUM-ONLY ADDITIONS                === */
/* ============================================ */

/* Premium hero refinement — gold underline */
.hero-content h1 em {
  position: relative;
  display: inline-block;
}
.hero-content h1 em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1.5px;
  background: var(--color-accent-light);
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineSweep 1.2s ease-out 0.6s forwards;
}
@keyframes underlineSweep { to { transform: scaleX(1); } }

/* === ALLERGEN FILTER === */
.allergen-filter {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.allergen-filter-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}

.allergen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.allergen-chip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.allergen-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.allergen-chip.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

.allergen-chip.active:hover {
  background: #5b6a2c;
  border-color: #5b6a2c;
}

.allergen-chip svg { flex-shrink: 0; }

.allergen-clear {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.5rem;
  margin-top: 0.75rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.allergen-clear:hover { border-color: var(--color-primary); }

.allergen-active-summary {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 0.85rem;
  font-style: italic;
}

/* Menu item — extended for tags + pairing.
 *
 * Source-of-truth fix 2026-05-08: pin both .menu-item-tags AND .menu-item-
 * pairing to `grid-column: 1 / 2`. The parent .menu-item is a grid with
 * `grid-template-columns: 1fr auto`; .menu-item-row + .menu-item-desc are
 * already pinned to col 1, leaving col 2 empty in classic (only 2 children,
 * both pinned). Premium's renderMenu() in premium-features.js adds
 * .menu-item-tags + .menu-item-pairing as additional children — without an
 * explicit grid-column they auto-placed into col 2 row 1, materialising the
 * `auto` column with their content width and shrinking col 1. The shrunken
 * .menu-item-row could no longer fit name + dotted-leader + price on one
 * line — the dish name wrapped to two lines, with the price below. Pinning
 * tags + pairing to col 1 keeps col 2 unused (as classic always intended)
 * and the row stays one-liner.
 *
 * Premium-only fix; classic's static .menu-item children never trigger the
 * latent bug, so classic's CSS is intentionally untouched. */
.menu-item-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  grid-column: 1 / 2;
}

.menu-item-tag {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 3px;
  background: rgba(112, 130, 56, 0.12);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.menu-item-tag.tag-allergen {
  background: rgba(114, 47, 55, 0.08);
  color: var(--color-primary);
}

/* Hide menu item smoothly when filter doesn't match */
.menu-item.hidden {
  display: none;
}

.menu-category.hidden { display: none; }

/* Wine pairing inline — same grid-column pin as .menu-item-tags above (see
 * the source-of-truth comment there for the full root-cause analysis). */
.menu-item-pairing {
  margin-top: 0.6rem;
  padding: 0.7rem 0.95rem;
  background: linear-gradient(to right, rgba(168, 181, 112, 0.08), transparent);
  border-left: 2px solid var(--color-accent);
  border-radius: 0 4px 4px 0;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  grid-column: 1 / 2;
}

.menu-item-pairing-icon {
  flex-shrink: 0;
  color: var(--color-accent);
  margin-top: 1px;
}

.menu-item-pairing-label {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.15rem;
}

.menu-item-pairing-text {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.menu-item-pairing-text strong {
  font-weight: 600;
  color: var(--color-primary);
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

/* === HOVER-REVEAL PHOTO GRID (premium om-oss) === */
.chef-grid-section {
  padding: 5.5rem 2rem;
  background: var(--color-bg);
}

.chef-grid-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.chef-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 280px 280px;
  gap: 1rem;
  margin-top: 2.5rem;
}

.chef-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.chef-grid-item.span-2 { grid-column: span 2; }
.chef-grid-item.row-2  { grid-row: span 2; }

.chef-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Tile2 (Lucia portrait) and tile3 (cheese close-up) both have the subject
   * in the upper-left quadrant of the source. With cover into a square-ish
   * tile, default `center` clipped her face at the chin and parked the
   * cheese rind off-frame. 38% 30% biases the crop upward + slightly left
   * so face / subject stays in the safe area on every tile (the other tiles
   * are wide-context shots that tolerate the bias). Locked 2026-05-08. */
  object-position: 38% 30%;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1), filter 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  /* Default state on touch devices: full color (no grayscale, no desaturation).
   * Desktop B&W → color treatment is applied below in a @media (hover: hover)
   * block so iOS / Android don't lock into a grayscale resting state when the
   * user can't naturally hover-out of it. Locked 2026-05-08 per Bithun's
   * "iOS-type touch activity" directive on the premium chef-grid. */
}

.chef-grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 24, 16, 0.92) 0%, rgba(44, 24, 16, 0.55) 50%, rgba(44, 24, 16, 0.05) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.chef-grid-item:hover img,
.chef-grid-item.is-tapped img {
  transform: scale(1.06);
}

.chef-grid-item:hover .chef-grid-overlay,
.chef-grid-item.is-tapped .chef-grid-overlay {
  opacity: 1;
}

.chef-grid-overlay-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 0.5rem;
  transform: translateY(10px);
  transition: transform 0.45s ease 0.05s;
}

.chef-grid-overlay h3 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-bg);
  margin-bottom: 0.55rem;
  line-height: 1.2;
  transform: translateY(10px);
  transition: transform 0.5s ease 0.1s;
}

.chef-grid-overlay p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(251, 246, 238, 0.85);
  line-height: 1.55;
  transform: translateY(10px);
  transition: transform 0.55s ease 0.15s;
}

.chef-grid-item:hover .chef-grid-overlay-label,
.chef-grid-item:hover .chef-grid-overlay h3,
.chef-grid-item:hover .chef-grid-overlay p {
  transform: translateY(0);
}

/* Premium menu page intro */
.allergen-info-banner {
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem;
  background: rgba(168, 181, 112, 0.12);
  border-radius: var(--radius-card);
  border-left: 3px solid var(--color-accent);
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-style: italic;
}

.allergen-info-banner strong {
  font-style: normal;
  font-weight: 600;
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .chef-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .chef-grid-item.span-2,
  .chef-grid-item.row-2 {
    grid-column: auto;
    grid-row: auto;
  }
  .chef-grid-item { height: 240px; }

  /* Mobile: reveal overlay always visible */
  .chef-grid-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(44, 24, 16, 0.85) 0%, rgba(44, 24, 16, 0.3) 60%, transparent 100%);
  }
  .chef-grid-overlay-label,
  .chef-grid-overlay h3,
  .chef-grid-overlay p {
    transform: translateY(0);
  }
  .chef-grid-overlay p { display: none; }

  .allergen-chips { gap: 0.4rem; }
  .allergen-chip { font-size: 0.78rem; padding: 0.42rem 0.85rem; }
}

/* === Premium hero ===
 * The smoke video already contains the full plated scene with steam motion.
 * We use the video alone (with hero-pasta.png as <video poster> for the freeze
 * frame and graceful fallback if autoplay is blocked). The static .hero-bg
 * div and the CSS .hero-steam puff are both hidden on premium so the live
 * video isn't competing with two fake-steam layers underneath. */
.hero-premium .hero-bg    { display: none; }
.hero-premium .hero-steam { display: none; }

.hero-premium .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero-premium .hero-overlay { z-index: 1; }
.hero-premium .hero-content { z-index: 2; }

/* === Mobile hero: WHOLE-FRAME DYRLEGE-STYLE OVERLAY (rule #37, Bithun 2026-07-01) ===
 * SUPERSEDES the 2026-06-30 CARD-STACK (video in a box on top, ALL hero text on a
 * dark panel BELOW it) — Bithun REJECTED that: "the video looks blank and you scroll
 * to see the text." Also supersedes the earlier hard desktop-crop and the 2026-06-28
 * scrim-emerge draft. The treatment Bithun approves (copied verbatim from dyrlege):
 * the WHOLE 16:9 video shows UNCROPPED at the top, and the hero TEXT is overlaid on
 * the LEFT — the eyebrow + headline sit OVER the top of the video, and the sub + buttons
 * flow DOWN past the video onto the dark .hero background. Text is visible immediately,
 * whole video shows, NO scroll. Panel/scrim token = --color-text (#2C1810 → rgb
 * 44,24,16) — the footer / desktop hero band colour. Both tiers identical at rest
 * (rule #31): premium = hero <video>, classic = static .hero-bg; the same overlay
 * applies to both. The `.hero.hero-premium`-prefixed child selectors out-specify the
 * earlier base `.hero-premium .hero-video { position:absolute; height:100% }` (0,2,0)
 * so the whole-frame media wins. The KEY LINE is the .hero-content negative margin-top,
 * which pulls the text up over the video's top-left. Desktop focal crop unchanged;
 * video focus is on the RIGHT, text + buttons on the LEFT (both desktop + mobile). */
@media (max-width: 768px) {
  .hero.hero-premium {
    display: block; height: auto; min-height: 0; max-height: none;
    padding: 0 0 2.4rem; background: var(--color-text);
  }
  .hero.hero-premium .hero-video {
    position: relative; inset: auto; z-index: 0;
    width: 100%; height: auto; aspect-ratio: 16 / 9;
    object-fit: cover; object-position: center;
  }
  /* Scrim over the top of the video: darkens the LEFT so the overlaid eyebrow +
   * headline stay legible, and fades the media's lower edge into the dark bg so
   * there's no hard seam where the sub/buttons cross onto the panel. */
  .hero.hero-premium .hero-overlay {
    display: block; position: absolute; top: 0; left: 0; right: 0; bottom: auto;
    width: 100%; aspect-ratio: 16 / 9; z-index: 1; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(44,24,16,0) 40%, rgba(44,24,16,0.55) 76%, rgba(44,24,16,0.92) 100%),
      linear-gradient(96deg, rgba(44,24,16,0.9) 0%, rgba(44,24,16,0.58) 38%, rgba(44,24,16,0.12) 66%, rgba(44,24,16,0) 86%);
  }
  /* THE KEY LINE — pull the text UP so the eyebrow + headline sit OVER the top of
   * the video on the LEFT; the sub + buttons flow DOWN past the video onto the dark
   * .hero background. Text visible immediately, whole video shown, NO scroll. */
  .hero.hero-premium .hero-content {
    position: relative; z-index: 2; width: 100%; max-width: 100%;
    margin: calc(-1 * (100vw * 9 / 16) + 1.4rem) 0 0; padding: 0 1.25rem;
    background: transparent;
  }
}

/* === Hero typewriter ===
 * Locked premium contract (per-prototype context template §"Premium tier" 2026-05-08):
 * the hero <h1> gets a one-shot typewriter animation on page load. Letter-
 * flip was considered and rejected — typewriter fits the trattoria's quiet
 * craftsmanship mood (handwritten menu / hand-rolled pasta / family-recipe
 * card) better than a more theatrical letter cascade. Pure CSS caret with a
 * JS-driven character stream so the headline can carry inline <em> markup
 * (the "siden 2003" italic accent) and replay on NO ↔ EN language toggle.
 * The blink uses opacity (no animation on layout) so it is GPU-cheap; the
 * caret fades out 1s after the headline completes. Reduced-motion guard
 * below disables the caret animation; initHeroTypewriter() in main.js skips
 * the character stream entirely under reduced-motion so the full headline
 * is rendered immediately. */
.hero-content h1[data-typewriter] {
  /* Empty stable slot — hero h1 inherits its font-size + colour from the
   * .hero-content cascade. The data-typewriter attribute is a JS hook only;
   * if JS is unavailable the headline still renders normally. */
}

.hero-content h1.typewriter-active::after,
.hero-content h1.typewriter-done::after {
  content: '|';
  display: inline-block;
  margin-left: 4px;
  color: var(--color-accent-light);
  font-weight: 300;
  vertical-align: baseline;
}

.hero-content h1.typewriter-active::after {
  animation: typewriter-caret 0.85s step-end infinite;
}

.hero-content h1.typewriter-done::after {
  animation: typewriter-caret-fade 1.1s ease-out forwards;
}

@keyframes typewriter-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes typewriter-caret-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
 * CARD-FLOAT + ICON-DRIFT (NEW 2026-05-08, third polish iteration)
 * ============================================================
 * Locked premium contract per the family per-prototype context template §"Premium
 * tier" — every premium prototype's floating card sections get a vertical
 * translateY bob, every icon-bearing card additionally gets an icon-only
 * horizontal translateX drift. The 2026-05-08 polish-pass C2 audit marked
 * card-icon translateX as "🚫 N/A for restaurant" because it only checked
 * meny.html allergen chips + om-oss chef-grid tiles. That was a miss: the
 * specials grid on index.html (3 .special-card cards: Tagliatelle, Burrata,
 * Osso Buco) and the values grid on om-oss.html (3 .value-block cards each
 * with a .value-icon SVG) BOTH belong under the contract. Fixed retroactively
 * here. Source-template selector lists in the family per-prototype context template
 * §"Premium tier" should be widened so kafeteria + future prototypes don't
 * repeat the omission — flagged in BUILD_PROGRESS.md for root architect
 * propagation.
 *
 * Pure translateY / translateX (no rotate per family-wide rule). Staggered
 * 4.0–5.4s × 0.7–1.6s delays so neighbours stay out of sync. Both pause on
 * card hover. Reduced-motion guard below disables both.
 * ============================================================ */
@keyframes card-float {
  0%,  100% { transform: translateY(0px) scale(1); }
  45%        { transform: translateY(-12px) scale(1.012); }
  72%        { transform: translateY(-5px) scale(1.006); }
}

@keyframes value-icon-drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(5px); }
}

/* Today's Specials (index.html) — 3 dish cards bob with staggered delays. */
.specials-grid .special-card { will-change: transform; }
.specials-grid .special-card:nth-child(1) { animation: card-float 4.4s ease-in-out 0.9s infinite; }
.specials-grid .special-card:nth-child(2) { animation: card-float 5.2s ease-in-out 1.1s infinite; }
.specials-grid .special-card:nth-child(3) { animation: card-float 4.0s ease-in-out 1.3s infinite; }

/* Hva vi tror på (om-oss.html) — 3 value-block cards bob with staggered
 * delays. Icons inside drift independently on a separate axis. */
.values-grid .value-block { will-change: transform; }
.values-grid .value-block:nth-child(1) { animation: card-float 4.7s ease-in-out 1.0s infinite; }
.values-grid .value-block:nth-child(2) { animation: card-float 5.4s ease-in-out 1.2s infinite; }
.values-grid .value-block:nth-child(3) { animation: card-float 4.2s ease-in-out 1.4s infinite; }

.values-grid .value-block .value-icon { will-change: transform; }
.values-grid .value-block:nth-child(1) .value-icon { animation: value-icon-drift 4.0s ease-in-out 0.3s infinite; }
.values-grid .value-block:nth-child(2) .value-icon { animation: value-icon-drift 4.6s ease-in-out 0.7s infinite; }
.values-grid .value-block:nth-child(3) .value-icon { animation: value-icon-drift 3.8s ease-in-out 1.1s infinite; }

/* Pause-on-hover. Source-order rule per family contract: hover overrides
 * MUST come AFTER the :nth-child shorthand or the shorthand resets
 * animation-play-state to running. !important guards against any future
 * generic .card:hover rule landing later in the cascade. */
.specials-grid .special-card:hover { animation-play-state: paused !important; }
.values-grid .value-block:hover { animation-play-state: paused !important; }
.values-grid .value-block:hover .value-icon { animation-play-state: paused !important; }

/* ============================================================
 * REDUCED-MOTION GUARD
 * ============================================================
 * Family contract: every infinite-loop @keyframes animation must respect
 * the OS-level reduced-motion preference. Steam-rise and pulse-badge are
 * the two infinite loops in this tier; one-shot fades and the underline
 * sweep are also disabled to keep the experience fully static for users
 * who request reduced motion. Hero video is paused via attribute on the
 * video element if needed; CSS alone can't pause it.
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .hero-steam,
  .specials-badge,
  .specials-grid .special-card,
  .values-grid .value-block,
  .values-grid .value-block .value-icon {
    animation: none !important;
    transform: none !important;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Typewriter caret hidden under reduced-motion. The JS init function also
   * short-circuits in this mode, leaving the headline rendered as-is. */
  .hero-content h1.typewriter-active::after,
  .hero-content h1.typewriter-done::after {
    display: none !important;
  }
}

/* ============================================================
   PREMIUM — TAKEAWAY CART + MOCK STRIPE CHECKOUT (Wave 3, 2026-05-31)
   Vanilla in-page demo checkout (no Stripe.js, no key, no backend) +
   sessionStorage-backed ephemeral takeaway cart. Pattern adapted from
   bakeri-demo/demo-bakeri-premium. Restaurant palette: burgundy primary.
   ============================================================ */

/* faux Stripe wordmark */
.stripe-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #635BFF; /* Stripe brand violet */
  font-size: 1.15rem;
  line-height: 1;
}
.stripe-badge--sm { font-size: 0.82rem; }

/* takeaway intro note on meny.html */
.takeaway-note {
  max-width: 760px;
  margin: 0 auto 2rem;
  padding: 0.9rem 1.2rem;
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text);
  text-align: center;
}

/* pre-order button on each takeaway-eligible dish — canonical
 * `btn btn-accent btn--sm` since 2026-07-01 (rule #42); only the positioning
 * and the --done state (a legitimate colour-swap state) remain bespoke. */
.cart-add { margin-top: 0.7rem; }
.cart-add.cart-add--done { background: #E3F4E9; color: #1F7A45; border-color: #BEE3CC; }

/* --- checkout box (reuses .modal-backdrop) --- */
.checkout-box {
  position: relative;
  background: var(--color-bg);
  border-radius: 10px;
  padding: 2rem 1.9rem 1.7rem;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
  box-shadow: 0 24px 70px rgba(44, 24, 16, 0.34);
  -webkit-overflow-scrolling: touch;
}
.modal-backdrop.open .checkout-box { transform: translateY(0) scale(1); opacity: 1; }
.checkout-x {
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 0.1rem 0.5rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.checkout-x:hover { color: var(--color-primary); background: var(--color-bg-alt); }
.co-brand { margin-bottom: 0.9rem; }
.checkout-box h2 { font-size: 1.45rem; font-weight: 600; margin-bottom: 1rem; }

/* summary */
.co-summary {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.2rem;
  text-align: left;
}
.co-summary-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  margin-bottom: 0.35rem;
}
.co-lines { margin: 0.2rem 0; }
.co-line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; font-size: 0.9rem; padding: 0.18rem 0;
}
.co-line > span:first-child { color: var(--color-text); }
.co-line > span:last-child { color: var(--color-text-light); white-space: nowrap; }
.co-line--total {
  margin-top: 0.45rem; padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
}
.co-line--total > span { font-weight: 600; color: var(--color-text); }
.co-line--total > strong { font-family: var(--font-heading); font-size: 1.25rem; color: var(--color-primary); }

/* form fields */
.co-form { text-align: left; }
.co-field { display: block; margin-bottom: 0.85rem; }
.co-field > span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.32rem;
}
.co-field input,
.co-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.co-field input:focus,
.co-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.16);
}
.co-field-row { display: flex; gap: 0.75rem; }
.co-field-row .co-field { flex: 1; }
.co-hint { display: block; font-size: 0.76rem; color: var(--color-text-light); margin-top: 0.32rem; }
.co-error {
  color: #B0322B;
  background: #FBEAE8;
  border: 1px solid #F0C5BF;
  border-radius: 8px;
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  margin: 0.4rem 0 0.85rem;
}
.co-error[hidden] { display: none; }
.co-pay { margin-top: 0.3rem; }  /* full-width via .btn--block (rule #42) */
.co-secured {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 1.1rem;
}
.co-demo-phrase {
  font-size: 0.78rem;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.7rem;
  line-height: 1.5;
}

/* success screen */
.co-check { width: 60px; height: 60px; margin: 0.3rem auto 0.85rem; }
.co-check svg { width: 100%; height: 100%; }
.co-check-circle { fill: none; stroke: #2E9E5B; stroke-width: 3; opacity: 0.85; }
.co-check-mark {
  stroke: #2E9E5B;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: co-check-draw 0.5s ease-out 0.12s forwards;
}
@keyframes co-check-draw { to { stroke-dashoffset: 0; } }
.co-ok-badge {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}
.co-ok-sub { color: var(--color-text-light); font-size: 0.92rem; line-height: 1.6; margin-bottom: 1.1rem; }
.co-receipt {
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}
.co-receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--color-border);
}
.co-receipt-row:last-child { border-bottom: none; }
.co-receipt-row > span { color: var(--color-text-light); }
.co-receipt-row > strong { color: var(--color-text); font-weight: 600; text-align: right; word-break: break-word; }

/* "what the restaurant sees" panel */
.restaurant-panel {
  text-align: left;
  background: var(--color-white);
  border: 1px dashed var(--color-accent-light);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  margin-bottom: 1.3rem;
}
.restaurant-panel > h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.restaurant-panel-intro { font-size: 0.8rem; color: var(--color-text-light); line-height: 1.5; margin-bottom: 0.9rem; }
.restaurant-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 9px;
  padding: 0.8rem;
  margin-bottom: 0.75rem;
}
.restaurant-card:last-child { margin-bottom: 0; }
.restaurant-card-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: 0.6rem;
}
.restaurant-mail-row { display: flex; gap: 0.6rem; font-size: 0.82rem; padding: 0.15rem 0; }
.restaurant-mail-row > span:first-child { flex: 0 0 42px; color: var(--color-text-light); }
.restaurant-mail-row > span:last-child { color: var(--color-text); word-break: break-word; }
.restaurant-mail-body {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: var(--color-text);
  line-height: 1.55;
  word-break: break-word;
}
.restaurant-stripe { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.restaurant-stripe td { padding: 0.28rem 0; vertical-align: top; }
.restaurant-stripe td:first-child { color: var(--color-text-light); width: 38%; }
.restaurant-stripe td:last-child { color: var(--color-text); word-break: break-word; }
.restaurant-status {
  display: inline-block;
  background: #E3F4E9;
  color: #1F7A45;
  font-weight: 600;
  font-size: 0.74rem;
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
}
.restaurant-charge { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.7rem; color: var(--color-text-light); }
.restaurant-meta { font-size: 0.68rem; color: var(--color-text-light); font-style: italic; }

/* --- floating cart button (shown via JS when basket non-empty) --- */
.cart-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1500;
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(44, 24, 16, 0.32);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.cart-fab:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(44, 24, 16, 0.4); }
.cart-fab svg { flex-shrink: 0; }
.cart-fab--pulse { animation: cart-pop 0.32s ease-out; }
@keyframes cart-pop { 0% { transform: scale(1); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* --- cart drawer --- */
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(44, 24, 16, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  justify-content: flex-end;
}
.cart-backdrop.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  width: 100%;
  max-width: 390px;
  height: 100%;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(44, 24, 16, 0.25);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.16, 1);
}
.cart-backdrop.open .cart-drawer { transform: translateX(0); }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.cart-head h2 { font-size: 1.3rem; font-weight: 600; }
.cart-x {
  background: none; border: none;
  font-size: 1.7rem; line-height: 1;
  color: var(--color-text-light); cursor: pointer;
  padding: 0.1rem 0.4rem; border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.cart-x:hover { color: var(--color-primary); background: var(--color-bg-alt); }
.cart-lines { flex: 1; overflow-y: auto; padding: 0.5rem 1.5rem; -webkit-overflow-scrolling: touch; }
.cart-empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--color-text-light); }
.cart-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--color-border);
}
.cart-line:last-child { border-bottom: none; }
.cart-line-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.cart-line-name { font-weight: 600; font-size: 0.92rem; color: var(--color-text); }
.cart-line-price { font-size: 0.82rem; color: var(--color-text-light); }
.cart-qty { display: flex; align-items: center; gap: 0.5rem; }
.cart-qty-btn {
  width: 28px; height: 28px;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  border-radius: 8px;
  font-size: 1rem; line-height: 1;
  color: var(--color-primary); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.cart-qty-btn:hover { border-color: var(--color-primary); background: var(--color-bg-alt); }
.cart-qty-val { min-width: 1.2rem; text-align: center; font-weight: 600; font-size: 0.9rem; }
.cart-line-x {
  background: none; border: none;
  font-size: 1.2rem; color: var(--color-text-light);
  cursor: pointer; padding: 0 0.2rem; line-height: 1;
  transition: color var(--transition);
}
.cart-line-x:hover { color: #B0322B; }
.cart-foot { padding: 1.1rem 1.5rem 1.4rem; border-top: 1px solid var(--color-border); background: var(--color-bg-alt); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.9rem; }
.cart-total-label { font-size: 0.92rem; color: var(--color-text-light); }
.cart-total-val { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; color: var(--color-primary); }
/* .cart-checkout full-width now via .btn--block (rule #42) — bespoke rule retired 2026-07-01 */
.cart-continue {
  width: 100%; margin-top: 0.6rem;
  background: none; border: none;
  color: var(--color-text-light); font-family: var(--font-body);
  font-size: 0.88rem; cursor: pointer; padding: 0.5rem;
  transition: color var(--transition);
}
.cart-continue:hover { color: var(--color-primary); text-decoration: underline; }

@media (max-width: 600px) {
  .checkout-box { padding: 1.6rem 1.2rem 1.4rem; border-radius: 12px; }
  .co-field-row { flex-direction: column; gap: 0; }
  .co-field-row .co-field { margin-bottom: 0.85rem; }
  .cart-drawer { max-width: 100%; }
  .cart-fab { right: 1rem; bottom: 1rem; padding: 0.7rem 1.1rem; font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .co-check-mark { animation: none !important; stroke-dashoffset: 0 !important; }
  .cart-fab--pulse { animation: none !important; }
}
