/* =========================================================
   Rösteria: styles
   Mobile-first. Breakpoints: 720px (tablet), 1024px (desktop)
   ========================================================= */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour */
  --bg: #f6f1e9;
  --surface: #fffbf5;
  --ink: #23170f;
  --ink-soft: #4a3a2f;
  --muted: #7a6a5d;
  --line: rgba(35, 23, 15, 0.12);
  --accent: #a4462a;
  --accent-hover: #8e3a21;
  --crema: #d8b48e;
  --espresso: #1d130d;
  --espresso-2: #2a1d15;
  --on-dark: #f3e9dc;
  --on-dark-muted: rgba(243, 233, 220, 0.62);
  --open: #3f7d4f;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Layout */
  --gutter: clamp(24px, 6.4vw, 40px);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 64px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 450;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
h1 em, h2 em { font-style: italic; font-weight: 350; color: var(--accent); }

p { margin: 0 0 1em; text-wrap: pretty; }

::selection { background: var(--crema); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  text-decoration: none;
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: translateY(60px); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}
.btn:active { transform: scale(0.97); }

.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }

.btn--primary { background: var(--ink); color: var(--bg); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--light { background: var(--on-dark); color: var(--espresso); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--accent); }
  .btn--ghost:hover { border-color: var(--ink); }
  .btn--light:hover { background: #fff; }
}

/* ---------- Open / closed line ----------
   Written like a sign in the window, not a UI badge. */
.status-row { margin: 0 0 26px; }

.status {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-style: italic;
  font-weight: 380;
  line-height: 1.4;
  color: var(--muted);
}
.status strong {
  font-style: normal;
  font-weight: 560;
  color: var(--open);
}
.status[data-state="closing"] strong { color: #b0741a; }
.status[data-state="closed"] strong { color: var(--ink); }

.status--dark { color: var(--on-dark-muted); }
.status--dark[data-state="open"] strong { color: #9fcf9b; }
.status--dark[data-state="closing"] strong { color: #e3b264; }
.status--dark[data-state="closed"] strong { color: var(--on-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 233, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); }

.nav { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-cta { display: none; }

.menu-toggle {
  position: relative;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.menu-toggle:active { transform: scale(0.94); }

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 20px; height: 1.8px;
  margin-left: -10px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 240ms var(--ease-out), opacity 160ms ease;
}
.menu-toggle-bars { top: 50%; margin-top: -1px; background: transparent; }
.menu-toggle-bars::before { content: ""; transform: translateY(-4px); left: 0; margin-left: 0; }
.menu-toggle-bars::after { content: ""; transform: translateY(4px); left: 0; margin-left: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: rotate(-45deg); }

/* Mobile nav: drops down from the header */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(35, 23, 15, 0.25);
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
  /* Closing: quicker than opening, visibility flips after the fade */
  transition:
    opacity 140ms var(--ease-out),
    transform 180ms var(--ease-drawer),
    visibility 0s linear 180ms;
}
.mobile-nav.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 200ms var(--ease-out),
    transform 280ms var(--ease-drawer),
    visibility 0s;
}

.mobile-nav nav { display: flex; flex-direction: column; padding: 8px var(--gutter) 20px; }
.mobile-nav a {
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav.is-open a {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i) * 40ms + 40ms);
}

@media (min-width: 720px) {
  .header-cta { display: inline-flex; }
}

@media (min-width: 1024px) {
  :root { --header-h: 68px; }
  .menu-toggle, .mobile-nav { display: none !important; }
  .nav {
    display: flex;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .nav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    transition: background-color 200ms ease, color 200ms ease;
  }
  .header-inner { position: relative; }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .nav a:hover { background: rgba(35, 23, 15, 0.06); color: var(--ink); }
}

/* ---------- Photo slots ----------
   If an image file is missing, a warm placeholder with the expected
   filename is shown instead, so it's obvious what to upload. */
.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #cfb194;
  background-image:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 244, 228, 0.55), transparent 60%),
    radial-gradient(100% 80% at 90% 100%, rgba(74, 44, 25, 0.55), transparent 60%),
    linear-gradient(160deg, #d9bc9c, #a57a55);
  isolation: isolate;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo.is-empty::after {
  content: attr(data-label);
  position: absolute;
  left: 14px; top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(35, 23, 15, 0.45);
  color: rgba(255, 250, 243, 0.92);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.photo.is-empty::before {
  /* Coffee bean watermark */
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22%; aspect-ratio: 2 / 3;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 250, 243, 0.4);
  transform: rotate(30deg);
}

/* ---------- Hero ---------- */
.hero { padding: 24px 0 48px; }

.hero-grid { display: grid; gap: 36px; }

.hero h1 {
  font-size: clamp(2.3rem, 8vw, 4.3rem);
  margin-bottom: 18px;
}
.lede {
  font-size: clamp(1.02rem, 2.2vw, 1.12rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 24px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { flex: 1 1 auto; }

.carousel-track .photo { aspect-ratio: 4 / 3; }

@media (min-width: 720px) {
  .hero { padding: 40px 0 64px; }
  .hero-actions .btn { flex: 0 0 auto; }
}
@media (min-width: 1024px) {
  .hero { padding: 48px 0 88px; }
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 56px;
  }
  .carousel-track .photo { aspect-ratio: 1 / 1.1; }
}

/* ---------- Hero carousel ----------
   Native scroll-snap: swipe on phones, arrows/dots/trackpad on desktop. */
.carousel { position: relative; }

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
  outline-offset: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .photo {
  border-radius: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.carousel-controls {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(29, 19, 13, 0.38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fffaf3;
}
.carousel-controls[hidden] { display: none; }

.carousel-btn {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.carousel-btn:active { transform: scale(0.9); }
@media (hover: hover) and (pointer: fine) {
  .carousel-btn:hover { background: rgba(255, 255, 255, 0.16); }
}

.carousel-dots { display: flex; gap: 2px; }
.carousel-dots button {
  position: relative;
  width: 18px; height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.carousel-dots button::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fffaf3;
  opacity: 0.45;
  transition: opacity 200ms ease, transform 240ms var(--ease-out);
}
.carousel-dots button[aria-current="true"]::before { opacity: 1; transform: scale(1.35); }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
@media (min-width: 1024px) { .section { padding: 88px 0; } }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 32px;
  margin-bottom: 28px;
}
.section-head h2,
.visit h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
.section-note { color: var(--muted); margin: 0; max-width: 28em; }

/* ---------- Menu ---------- */
.menu { background: var(--surface); border-block: 1px solid var(--line); }

/* Tabs: the active style is a second copy of the list that is
   clipped to the active tab, so the highlight slides between
   tabs and the text colour changes with it in one motion. */
.tabs {
  margin: 0 calc(var(--gutter) * -1) 28px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs-inner { position: relative; display: inline-flex; }

.tabs-list { display: flex; gap: 4px; }
.tabs-list button {
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.925rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), color 200ms ease;
}
.tabs-list button:active { transform: scale(0.97); }

.tabs-list--active {
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: inset(0 100% 0 0 round 999px);
  transition: clip-path 280ms var(--ease-out);
}
.tabs-list--active button { background: var(--ink); color: var(--bg); }
.tabs-list--active.no-transition { transition: none; }

@media (hover: hover) and (pointer: fine) {
  .tabs-list:not(.tabs-list--active) button:hover { color: var(--ink); }
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  column-gap: 72px;
}
@media (min-width: 900px) { .menu-list { grid-template-columns: 1fr 1fr; } }

.menu-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  animation: item-in 320ms var(--ease-out) both;
  animation-delay: calc(min(var(--i, 0), 10) * 35ms);
}
@keyframes item-in {
  from { opacity: 0; transform: translateY(6px); }
}

.menu-item-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.menu-item-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.menu-item-leader {
  flex: 1;
  min-width: 16px;
  border-bottom: 1px dotted rgba(35, 23, 15, 0.3);
  transform: translateY(-5px);
}
.menu-item-price {
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  white-space: nowrap;
}
.menu-item-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.925rem;
  max-width: 38em;
}
.menu-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.menu-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(164, 70, 42, 0.1);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  align-self: center;
}
.menu-item.is-soldout .menu-item-name,
.menu-item.is-soldout .menu-item-price { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.menu-tag--soldout { background: rgba(35, 23, 15, 0.08); color: var(--muted); }

.menu-empty { color: var(--muted); padding: 20px 0; }

/* Skeletons */
.menu-skeleton,
.hours-skeleton {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent) 0 0 / 50% 100% no-repeat,
    linear-gradient(rgba(35, 23, 15, 0.06), rgba(35, 23, 15, 0.06)) 0 18px / 60% 16px no-repeat,
    linear-gradient(rgba(35, 23, 15, 0.04), rgba(35, 23, 15, 0.04)) 0 42px / 80% 10px no-repeat;
  animation: shimmer 1.2s linear infinite;
}
.hours-skeleton {
  height: 48px;
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)) 0 16px / 70% 14px no-repeat;
  animation: none;
}
@keyframes shimmer {
  from { background-position: -100% 0, 0 18px, 0 42px; }
  to { background-position: 200% 0, 0 18px, 0 42px; }
}

/* ---------- Visit ---------- */
.visit { background: var(--espresso); color: var(--on-dark); }
.visit .eyebrow { color: var(--on-dark-muted); }
.visit h2 { margin-bottom: 20px; }
.visit h2 em { color: var(--crema); }

.visit-grid { display: grid; gap: 40px; }

.hours {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  max-width: 460px;
}
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--on-dark-muted);
  font-variant-numeric: tabular-nums;
}
.hours li.is-today { color: var(--on-dark); font-weight: 550; }
.hours li.is-today .hours-day::after {
  content: "Today";
  margin-left: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--crema);
  color: var(--espresso);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.hours-note { display: block; font-size: 0.8rem; opacity: 0.8; font-weight: 400; }
.hours-time { text-align: right; }

.address {
  font-style: normal;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--on-dark);
}

.map {
  position: relative;
  min-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255, 255, 255, 0.04) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, 0.04) 39px 40px),
    var(--espresso-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  color: var(--on-dark-muted);
  font-size: 0.9rem;
}
.map-consent p { max-width: 26em; margin: 0; }
.map-consent svg { color: var(--crema); }
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 400ms ease;
}
.map iframe.is-loaded { opacity: 1; }

@media (min-width: 1024px) {
  .visit-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: stretch; }
  .map { min-height: 100%; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.contact-card--wide { grid-column: 1 / -1; min-height: 96px; } /* long email address */
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .contact-card--wide { grid-column: auto; min-height: 100px; }
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
  min-height: 100px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms var(--ease-out),
    border-color 200ms ease,
    background-color 200ms ease;
}
.contact-card:active { transform: scale(0.98); }
.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.4vw, 1.18rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
  .contact-card:hover { border-color: rgba(35, 23, 15, 0.35); background: #fff; }
}

/* Form */
.contact-form {
  margin-top: 40px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.contact-form h3 { font-size: 1.6rem; margin-bottom: 20px; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 720px) {
  .contact-form { padding: 36px; }
  .field-row { grid-template-columns: 1fr 1fr; }
}
.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 550; color: var(--ink-soft); }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px stops iOS zooming on focus */
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(35, 23, 15, 0.08);
}
.field [aria-invalid="true"] { border-color: var(--accent); }

.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-hint { margin: 0; font-size: 0.8rem; color: var(--muted); max-width: 32em; }
.form-status { margin: 14px 0 0; font-size: 0.9rem; min-height: 1.4em; }
.form-status[data-tone="error"] { color: var(--accent); }
.form-status[data-tone="ok"] { color: var(--open); }

.btn-label { transition: filter 200ms ease, opacity 200ms ease; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn-label { filter: blur(2px); opacity: 0.6; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-end; }
.brand--footer { margin: 0 0 4px; }
.footer-muted { color: var(--muted); font-size: 0.875rem; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 0.875rem; }
.footer-links a { color: var(--ink-soft); text-underline-offset: 3px; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 600ms var(--ease-out),
    transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.legal { padding: 48px 0 96px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin-bottom: 28px; }
.legal h2 { font-size: 1.5rem; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .todo {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(164, 70, 42, 0.08);
  border: 1px solid rgba(164, 70, 42, 0.25);
  color: var(--accent);
  font-size: 0.9rem;
}
.back-link { display: inline-block; margin-bottom: 24px; color: var(--muted); text-decoration: none; }

/* ---------- Reduced motion ----------
   Keep fades (they help comprehension), drop movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 300ms ease; }
  .menu-item { animation-name: fade-only; }
  .menu-skeleton { animation: none; }
  .mobile-nav, .mobile-nav a { transform: none !important; }
  .btn:active, .contact-card:active, .tabs-list button:active { transform: none; }
}
@keyframes fade-only { from { opacity: 0; } }
