/*
 * Harrow theme: shared styles (every page). Each block's own styles live beside it in
 * blocks/<name>/style.css and load only where the block is used.
 * Direction: "the name as a monument". One family (Switzer), five sizes, square buttons,
 * flat colour fields. No gradients (except the photo scrim), no shadows, no thin rules.
 * Brand colours and the font come from theme.json.
 */

:root {
  --bg: var(--wp--preset--color--bg, #1d2a22);
  --ink: var(--wp--preset--color--ink, #e2e4de);
  --accent: var(--wp--preset--color--accent, #e0a526);
  --deep: var(--wp--preset--color--deep, #141e18);
  --font-display: var(--wp--preset--font-family--switzer, system-ui, sans-serif);
  --font-text: var(--wp--preset--font-family--switzer, system-ui, sans-serif);

  --surface: color-mix(in srgb, var(--bg) 88%, var(--ink));
  --surface-2: color-mix(in srgb, var(--bg) 80%, var(--ink));
  --muted: color-mix(in srgb, var(--ink) 74%, var(--bg));
  --accent-ink: var(--bg);

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.75rem, 1rem + 6vw, 6.5rem);
  --step-giant: clamp(5.5rem, 12vw, 13rem);

  --margin: clamp(20px, 2.2vw, 32px);
  --section: clamp(96px, 12vw, 200px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
address { font-style: normal; }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- WordPress wrappers: the template parts and layout groups add no boxes or gaps ---------- */
.wp-site-blocks { padding: 0; }
.wp-block-template-part.part { display: contents; }
:root .wp-site-blocks > *, :root .page > *, :root .site-main > *, :root .split > * { margin-block: 0; }
.skip-link.screen-reader-text:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; clip: auto; clip-path: none;
  padding: 14px 20px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
}

/* ---------- Header ---------- */
/* ---------- Demo bar (demo mode only, inc/demo.php) ---------- */
.demo-bar { position: relative; z-index: 30; background: var(--accent); color: var(--accent-ink); padding: 10px var(--margin); font-size: var(--step-small); line-height: 1.4; }
.demo-bar p { margin: 0; }
.demo-bar a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; white-space: nowrap; }
.demo-bar a:focus-visible { outline-color: var(--accent-ink); }
@media (max-width: 760px) { .demo-bar a { white-space: normal; } }

.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: var(--margin);
}
.site-header--flow { position: relative; }
.wordmark { font-weight: 600; font-size: calc(var(--step-body) * 1.6); color: var(--accent); letter-spacing: -0.02em; text-decoration: none; }
.nav { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px clamp(14px, 1.6vw, 28px); }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current='page'] { text-decoration: underline; }
.nav .btn { min-height: 44px; padding: 0 18px; }
.nav-toggle, .nav-close { display: none; background: none; border: 0; padding: 10px 0; min-height: 44px; font-weight: 500; cursor: pointer; }
.nav-sheet[hidden] { display: none; }

@media (max-width: 760px) {
  .js .nav { display: none; }
  .js .nav-toggle { display: block; }
  .nav-sheet {
    position: fixed; inset: 0; z-index: 99999; display: flex; flex-direction: column;
    background: var(--ink); color: var(--bg); padding: 76px var(--margin) var(--margin); overflow-y: auto;
  }
  .nav-sheet nav { display: flex; flex-direction: column; gap: 4px; font-size: var(--step-head); font-weight: 600; letter-spacing: -0.035em; }
  .nav-sheet a { text-decoration: none; padding: 6px 0; }
  .nav-sheet a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 3px; }
  .nav-sheet .nav-close { display: block; position: absolute; top: var(--margin); right: var(--margin); padding: 0 4px; }
  .nav-sheet :focus-visible { outline-color: var(--bg); }
  .admin-bar .nav-sheet { top: 46px; }
}
body.nav-open { overflow: hidden; }

/* ---------- Footer: columns above, the name below; revealed from under the page ---------- */
.page { position: relative; z-index: 1; background: var(--bg); overflow-x: clip; }
.site-footer {
  position: sticky; bottom: 0; z-index: 0;
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto;
  background: var(--ink); color: var(--bg); padding: 40px var(--margin) 20px;
}
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--margin); font-size: var(--step-body); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li, .footer-cols address { color: color-mix(in srgb, var(--bg) 78%, var(--ink)); }
.footer-head { font-size: var(--step-body); font-weight: 500; letter-spacing: -0.01em; line-height: 1.5; color: var(--bg); }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-word { display: block; width: 100%; height: auto; margin-top: 24px; fill: var(--bg); }
.footer-word text { font: 600 100px var(--font-display); letter-spacing: -0.04em; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 20px; font-size: var(--step-small); }
.site-footer :focus-visible { outline-color: var(--bg); }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons: one shape (square), one fill. ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 var(--step-body)/1 var(--font-text); letter-spacing: -0.01em;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.text-link { font-weight: 500; text-decoration: underline; }
/* ---------- Inner page hero: title + one dominant picture ---------- */
.page-hero { padding: calc(var(--margin) + 72px) var(--margin) 0; }
.page-hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--margin); align-items: end; }
.page-hero h1 { grid-column: 1 / span 8; font-size: var(--step-display); }
.page-hero__sub { grid-column: 9 / -1; margin: 0; max-width: 36ch; }
.page-hero__sub .btn { margin-top: 20px; }
.page-hero__pic { margin: clamp(32px, 4vw, 64px) calc(-1 * var(--margin)) 0; }
.page-hero__pic img { width: 100%; height: min(78svh, 56vw); object-fit: cover; }
@media (max-width: 760px) {
  .page-hero h1, .page-hero__sub { grid-column: 1 / -1; }
  .page-hero__sub { margin-top: 16px; }
  .page-hero__pic img { height: 62svh; }
}

/* ---------- Prose from the block editor ---------- */
.prose { max-width: 100%; }
:root .prose > :where(p, h2, h3, ul, ol, blockquote, .wp-block-quote, .wp-block-buttons) { max-width: 62ch; }
.prose h2 { font-size: var(--step-lead); margin: 1.6em 0 0.5em; }
:root .prose > :first-child { margin-top: 0; }
/* ---------- List: giant word, filled bar rows ---------- */
.list-section { padding: var(--section) var(--margin); }
.list-col { max-width: 640px; container-type: inline-size; }
.list-section--wide .list-col { margin-left: auto; margin-right: max(0px, calc((100% - 1280px) / 2)); }
.giant-word { font-size: min(var(--giant, 34cqw), var(--step-giant)); line-height: 0.8; letter-spacing: -0.06em; margin: 0 0 20px -0.04em; white-space: nowrap; }
.bars { display: grid; gap: 6px; }
.bar { background: var(--surface); }
.bar > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 0 18px; cursor: pointer; list-style: none; font-weight: 500;
  transition: background-color 160ms;
}
.bar > summary::-webkit-details-marker { display: none; }
.bar > summary:hover { background: var(--surface-2); }
.bar > summary::after { content: '+'; font-size: 1.4em; line-height: 1; transition: transform 200ms var(--ease-out); }
.bar[open] > summary::after { transform: rotate(45deg); }
.bar__meta { margin-left: auto; color: var(--muted); font-weight: 400; }
.bar__panel { padding: 4px 18px 20px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 7px 0; }
.item + .item { margin-top: 7px; }
.item__name { font-weight: 500; }
.item__price { text-align: right; font-variant-numeric: tabular-nums; }
.item__desc { grid-column: 1 / -1; color: var(--muted); font-size: var(--step-small); }
.item__tags { font-size: var(--step-small); color: var(--muted); margin-left: 6px; font-weight: 400; }
.bar__link { display: inline-block; margin-top: 12px; }
@media (max-width: 760px) { .list-section { padding-inline: 16px; } }
/* ---------- Address in display rows ---------- */
.rows { padding: 0; margin: 0; list-style: none; }
.rows li {
  display: flex; align-items: flex-end; min-height: clamp(84px, 10vw, 150px);
  padding: 0 var(--margin) 0.18em; font-size: var(--step-display); line-height: 1; letter-spacing: -0.04em;
}
.rows li:nth-child(odd) { background: var(--surface); }
.rows a { text-decoration: none; }
.rows a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.rows .greet { gap: 24px; align-items: center; padding-bottom: 0; }
.round-btn {
  display: inline-grid; place-items: center; width: 0.9em; height: 0.9em; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-size: 1em;
  transition: transform 180ms var(--ease-out);
}
.round-btn:hover { transform: rotate(-35deg) scale(1.05); text-decoration: none !important; }
.round-btn svg { width: 46%; height: 46%; }
@media (max-width: 760px) {
  .rows li { font-size: 8.2vw; min-height: 84px; padding-inline: 16px; }
  .rows li.greet { background: var(--accent); color: var(--accent-ink); justify-content: space-between; }
  .rows .greet .round-btn { background: var(--bg); color: var(--ink); width: 56px; height: 56px; }
}

/* ---------- Inverted close ---------- */
.close { background: var(--ink); color: var(--bg); min-height: 90svh; display: grid; grid-template-rows: 1fr auto; padding: var(--section) var(--margin) 40px; }
.close h2 { font-size: var(--step-giant); line-height: 0.9; max-width: 12ch; letter-spacing: -0.05em; }
.close__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.close__foot p { margin: 0; max-width: 40ch; font-size: var(--step-lead); line-height: 1.3; }
.close .btn { min-height: 56px; }
@media (max-width: 760px) {
  .close { min-height: 80svh; }
  .close h2 { font-size: 14vw; }
  .close__foot { flex-direction: column; align-items: stretch; }
  .close__foot p { font-size: var(--step-body); }
}
/* ---------- Generic two-column blocks for inner pages ---------- */
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px var(--margin); padding: var(--section) var(--margin); }
.split__head { grid-column: 1 / span 5; }
.split__head h2 { font-size: var(--step-head); }
.split__body { grid-column: 7 / -1; }
@media (max-width: 760px) { .split__head, .split__body { grid-column: 1 / -1; } }
.feature-list { list-style: none; padding: 0; margin: 0; font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.015em; }
.feature-list li + li { margin-top: 6px; }

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 34vw); gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; }
.strip img { width: 100%; height: 56svh; object-fit: cover; scroll-snap-align: start; }
/* Hours block */
.hours { font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.015em; }
.hours p { margin: 0 0 4px; }
/* ---------- Editor blocks (the allowed set in wp-plugin/harrow-site/includes/blocks.php) ----------
   Content comes from WordPress with inline styles and colour classes stripped, so these rules
   are the whole design of a block. Columns sit side by side only when there is room. */
.prose { container-type: inline-size; }
:root .prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
:root .prose h2, :root .prose h3 { margin: 1.4em 0 0.4em; }
.prose h3 { font-size: var(--step-body); letter-spacing: -0.015em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0; }
.prose li + li { margin-top: 0.3em; }
.prose a { text-decoration: underline; }
.prose .wp-block-quote { margin: 1.6em 0; padding: 0; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.02em; }
.prose .wp-block-quote cite { display: block; margin-top: 0.6em; font-size: var(--step-small); font-style: normal; letter-spacing: 0; color: var(--muted); }
.prose .wp-block-image { margin: 1.6em 0; }
.prose .wp-block-image img { width: 100%; height: auto; }
.prose figcaption { margin-top: 8px; font-size: var(--step-small); color: var(--muted); }
.prose .wp-block-columns { display: grid; gap: 24px var(--margin); margin: 2em 0; }
.prose .wp-block-column > :first-child { margin-top: 0; }
.prose .wp-block-column > * + * { margin-top: 1em; }
.prose .wp-block-column .wp-block-image { margin: 0; }
.prose .wp-block-column .wp-block-image:not([class*='h-shape-']) img, .prose .wp-block-column .wp-block-image.h-shape-original img { aspect-ratio: 4 / 3; object-fit: cover; }
@container (min-width: 520px) {
  .prose .wp-block-columns { grid-auto-flow: column; grid-auto-columns: 1fr; align-items: start; }
}
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0; }
.prose .wp-block-button__link {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
  transition: background-color 160ms;
}
.prose .wp-block-button__link:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.prose .wp-block-embed { margin: 1.6em 0; }
.prose .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.prose .wp-block-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* ---------- Layout options (harrow_block_rules() in wp-plugin/harrow-site/includes/blocks.php) ----------
   The editor's "Layout" panel adds h-<option>-<value> classes. Every value maps to this design:
   the spacing scale below, the brand colours, fixed photo shapes. */
:root {
  --space-s: 12px;
  --space-m: clamp(24px, 3vw, 40px);
  --space-l: clamp(40px, 5vw, 72px);
  --space-xl: clamp(64px, 8vw, 120px);
}
.prose .h-space-none.h-space-none { margin-top: 0; }
.prose .h-space-s.h-space-s { margin-top: var(--space-s); }
.prose .h-space-m.h-space-m { margin-top: var(--space-m); }
.prose .h-space-l.h-space-l { margin-top: var(--space-l); }
.prose .h-space-xl.h-space-xl { margin-top: var(--space-xl); }

.prose .h-align-center { text-align: center; margin-left: auto; margin-right: auto; }
.prose .wp-block-buttons.h-align-center { justify-content: center; }

/* Column vertical alignment: WordPress's own top / middle / bottom control. */
.prose .wp-block-columns.are-vertically-aligned-center { align-items: center; }
.prose .wp-block-columns.are-vertically-aligned-bottom { align-items: end; }
.prose .wp-block-column.is-vertically-aligned-top { align-self: start; }
.prose .wp-block-column.is-vertically-aligned-center { align-self: center; }
.prose .wp-block-column.is-vertically-aligned-bottom { align-self: end; }
@container (min-width: 520px) {
  .prose .wp-block-columns.h-cols-wide-left:has(> .wp-block-column:nth-child(2):last-child) { grid-template-columns: 2fr 1fr; grid-auto-flow: row; }
  .prose .wp-block-columns.h-cols-wide-right:has(> .wp-block-column:nth-child(2):last-child) { grid-template-columns: 1fr 2fr; grid-auto-flow: row; }
}


.prose .wp-block-group.h-panel-soft, .prose .wp-block-group.h-panel-contrast { padding: clamp(24px, 4vw, 48px); }
.prose .wp-block-group.h-panel-soft { background: var(--surface); }
.prose .wp-block-group.h-panel-contrast { background: var(--ink); color: var(--bg); }
.prose .wp-block-group.h-panel-contrast .muted, .prose .wp-block-group.h-panel-contrast figcaption { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); }
.prose .wp-block-group > :first-child { margin-top: 0; }
.prose .wp-block-group > * + * { margin-top: 1em; }

:root .prose > .wp-block-image.h-shape-original img { aspect-ratio: auto; object-fit: initial; }
.prose .wp-block-image.h-shape-4-3 img { aspect-ratio: 4 / 3; object-fit: cover; }
.prose .wp-block-image.h-shape-3-2 img { aspect-ratio: 3 / 2; object-fit: cover; }
.prose .wp-block-image.h-shape-1-1 img { aspect-ratio: 1; object-fit: cover; }
:root .prose > .h-width-normal { max-width: 62ch; }
:root .prose > .h-width-wide { max-width: none; width: 100%; }

.prose .wp-block-button.h-button-secondary .wp-block-button__link { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.prose .wp-block-button.h-button-secondary .wp-block-button__link:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

/* ---------- Bits used by several templates ---------- */
.page-hero--404 { min-height: 70svh; }
.hours__head { font-size: inherit; letter-spacing: -0.015em; line-height: 1.35; margin: 20px 0 4px; }
.hours__head:first-child { margin-top: 0; }
.menu-key { margin-top: 16px; font-size: var(--step-small); }
.menu-pdf { margin-top: 8px; font-size: var(--step-small); }
.menu-pdf a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; }
.rows__email { font-size: clamp(1.5rem, 1rem + 3vw, 4rem) !important; }
.strip:focus-visible { outline-offset: -3px; }
.strip--spaced { margin-top: var(--section); }
.split__body > .wp-block-post-content, .split__body.wp-block-post-content { margin: 0; }

/* ---------- Motion: section entrances (content stays visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] > * { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .js [data-reveal].is-in > * { opacity: 1; transform: none; }
  .js [data-reveal].is-in > :nth-child(2) { transition-delay: 80ms; }
  .js [data-reveal].is-in > :nth-child(3) { transition-delay: 160ms; }
  .js [data-reveal].is-in > :nth-child(4) { transition-delay: 240ms; }
  .js [data-reveal].is-in > :nth-child(n+5) { transition-delay: 300ms; }
  /* The hero photo settles once as the page opens (no endless motion). */
  .page-hero__pic { overflow: hidden; }
  .page-hero__pic img { animation: settle 1600ms var(--ease-out) both; }
  @keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
}

@media print {
  .site-header nav, .nav-toggle, .site-footer { display: none; }
  .page { overflow: visible; }
  body { background: #fff; color: #000; }
}
