/* Static component styles. Image crop variables belong to the media frame. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + var(--space-6)); }
body { margin: 0; background: var(--color-background); color: var(--color-text); font: 400 var(--text-body)/1.7 var(--font-body); -webkit-font-smoothing: antialiased; }
main { min-height: 50vh; }
h1,h2,h3,h4,p,figure { margin: 0; }
h1,h2,h3,h4 { font-weight: 500; line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--text-h1); letter-spacing: -.035em; }
h2 { font-size: var(--text-h2); letter-spacing: -.025em; }
h3 { font-size: 1.125rem; line-height: 1.4; }
h4 { font-size: var(--text-small); }
p { max-width: 65ch; color: var(--color-muted); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a,button { -webkit-tap-highlight-color: transparent; }
a:hover { color: var(--color-accent); }
button,a { transition: color var(--motion), background-color var(--motion), border-color var(--motion); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
iframe { display: block; width: 100%; height: 100%; border: 0; }
[hidden] { display: none; }
.container { width: min(var(--container-width), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: var(--section-space); }
.section + .section { border-top: 1px solid var(--color-border); }
.stack { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-6); min-width: 0; }
.split { display: grid; gap: var(--space-12); align-items: center; }
.split > * { min-width: 0; }
.prose { max-width: 65ch; }
.prose p + p, .prose h1 + p, .prose h2 + div, .prose p + div { margin-top: var(--space-6); }
.section-heading { margin-bottom: var(--space-8); }
.section-heading p { margin-top: var(--space-3); }
.section-action { margin-top: var(--space-12); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 11px 24px; border: 1px solid var(--color-accent); border-radius: var(--radius); background: transparent; color: var(--color-text); font-size: var(--text-small); font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; }
.button:hover { background: var(--color-surface); color: var(--color-text); }
.button--solid { background: var(--color-text); border-color: var(--color-text); color: var(--color-background); }
.button--solid:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-background); }
.button img { width: 20px; height: 20px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.skip-link { position: fixed; left: var(--gutter); top: -100px; z-index: 100; padding: 12px 24px; background: var(--color-background); }
.skip-link:focus { top: 12px; }
/* Header remains in normal flow; its container owns stickiness. */
#shared-header { position: sticky; top: 0; z-index: 30; }
.site-header { background: var(--color-background); border-bottom: 1px solid var(--color-border); }
.header-inner { min-height: var(--header-size); display: flex; align-items: center; gap: var(--space-6); }
.brand { flex-shrink: 0; }
.brand img { width: 120px; height: 52px; object-fit: contain; }
.desktop-nav { display: none; margin-inline: auto; gap: var(--space-8); }
.nav-link { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; font-size: var(--text-small); white-space: nowrap; }
.nav-link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 8px; }
.header-actions { display: flex; gap: var(--space-3); align-items: center; margin-left: auto; }
.lang-links { display: flex; gap: var(--space-1); }
.lang-links a { display: inline-flex; min-width: 36px; min-height: 44px; align-items: center; justify-content: center; font-size: .8125rem; text-decoration: none; }
.lang-links a[aria-current] { text-decoration: underline; font-weight: 500; }
.menu-toggle { min-width: 44px; min-height: 44px; background: transparent; border: 1px solid var(--color-border); border-radius: var(--radius); }
dialog { color: var(--color-text); background: var(--color-background); border: 1px solid var(--color-border); }
dialog::backdrop { background: rgb(40 39 32 / .45); }
.mobile-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(340px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; padding: var(--space-8); }
.mobile-drawer[open] { display: flex; flex-direction: column; gap: var(--space-8); }
.drawer-close { align-self: flex-end; }
.mobile-drawer nav { display: flex; flex-direction: column; gap: var(--space-3); }
.static-navigation { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-block: 12px; }
@media (min-width: 900px) { .static-navigation { display: none; } }
.mobile-drawer .nav-link { border-bottom: 1px solid var(--color-border); padding-block: 12px; }
.drawer-address { margin-top: auto; font-size: var(--text-small); }
/* Reusable image slots: override --media-fit / --media-position per frame. */
.media-frame { overflow: hidden; background: var(--color-surface); aspect-ratio: var(--ratio-story); border-radius: var(--radius); }
.media-frame img { width: 100%; height: 100%; object-fit: var(--media-fit, cover); object-position: var(--media-position-mobile, var(--media-position, 50% 50%)); }
.product-card__media { aspect-ratio: var(--ratio-product); }
.hero__media { aspect-ratio: var(--ratio-hero); }
.story__media { aspect-ratio: var(--ratio-story); }
.hero { display: grid; gap: var(--space-8); padding-block: var(--space-8) var(--space-16); align-items: center; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-8); }
.hero h1 { font-family: var(--font-display); font-weight: 400; }
.hero p { max-width: 46ch; }
.product-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--space-12) var(--space-8); }
.product-card { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.product-card__media { margin-bottom: var(--space-1); }
.product-card p { font-size: var(--text-small); line-height: 1.7; }
.product-card__heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.product-card__heading h3 { min-width: 0; }
.product-card__price { flex: 0 0 auto; white-space: nowrap; font-size: var(--text-small); color: var(--color-muted); }
.product-card--text { padding-block: var(--space-6); border-bottom: 1px solid var(--color-border); }
.brew { background: var(--color-surface); }
.brew h2 { font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); }
.brew .story__media { max-height: 340px; }
.visit .stack { gap: var(--space-6); }
.visit h2 { margin-bottom: var(--space-8); }
.visit h4 { margin-bottom: var(--space-2); }
.map-container { aspect-ratio: 4 / 3; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.page-intro { padding-block: var(--space-12); }
.page-intro h1 { margin-bottom: var(--space-6); }
.category-nav { position: sticky; top: var(--header-height); z-index: 20; background: var(--color-background); border-block: 1px solid var(--color-border); }
.category-nav__scroll { display: flex; gap: var(--space-6); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--color-accent) var(--color-surface); padding-block: var(--space-2); }
.menu-anchor { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; font-size: var(--text-small); text-decoration: none; border-bottom: 2px solid transparent; }
.menu-anchor[aria-current] { border-color: var(--color-accent); }
.menu-content { padding-bottom: var(--section-space); }
.menu-section { padding-top: var(--space-16); scroll-margin-top: calc(var(--header-height) + var(--subnav-height) + var(--space-6)); }
.menu-section .section-heading { border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-6); }
html:has(.category-nav) { scroll-padding-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-4); }
.gallery-button { padding: 0; border: 0; aspect-ratio: 1; }
.gallery-button:hover { outline: 1px solid var(--color-accent); outline-offset: 3px; }
.lightbox { width: min(1200px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: var(--space-4); }
.lightbox__toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.lightbox__image { margin: auto; max-height: calc(100dvh - 170px); object-fit: contain; }
.lightbox__caption { text-align: center; padding-top: var(--space-3); font-size: var(--text-small); }
.contact-layout { align-items: start; }
.contact-details { display: grid; gap: var(--space-8); padding-block: var(--space-8); border-block: 1px solid var(--color-border); }
.contact-details h2 { font-size: 1.125rem; }
.contact-details .stack { gap: var(--space-3); }
.contact-layout a { overflow-wrap: anywhere; }
.site-footer { padding-block: var(--space-16) var(--space-28); background: var(--color-surface); border-top: 1px solid var(--color-border); font-size: var(--text-small); }
.footer-grid { display: grid; gap: var(--space-12); }
.footer-brand img { width: 135px; height: 60px; object-fit: contain; margin-bottom: var(--space-6); }
.site-footer h2 { font-size: 1rem; margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { text-decoration: underline; color: var(--color-text); }
.footer-bottom { border-top: 1px solid var(--color-border); margin-top: var(--space-12); padding-top: var(--space-6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
.floating-contact { position: fixed; bottom: var(--space-4); right: var(--gutter); z-index: 25; }
.contact-options { position: absolute; bottom: calc(100% + 8px); right: 0; width: 180px; padding: 8px; background: var(--color-background); border: 1px solid var(--color-accent); border-radius: var(--radius); }
.contact-options a { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 8px; text-decoration: none; }
.contact-options img { width: 20px; height: 20px; }
@media (min-width: 640px) {
 .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .contact-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .footer-brand { grid-column: 1/-1; }
 .media-frame img { object-position: var(--media-position-desktop, var(--media-position, 50% 50%)); }
}
@media (min-width: 900px) {
 .desktop-nav { display: flex; }
 .menu-toggle { display: none; }
 .header-actions { margin-left: 0; }
 .hero { grid-template-columns: minmax(0,45fr) minmax(0,55fr); gap: var(--space-12); padding-block: var(--space-12) var(--space-20); }
 .split { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .brew__layout { grid-template-columns: 1.2fr .8fr; }
 .gallery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-6); }
 .footer-grid { grid-template-columns: 1.1fr .9fr 1fr; }
 .footer-brand { grid-column: auto; }
}
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 *,*::before,*::after { transition-duration: 0s; animation: none; }
}

/* Editorial text rhythm inside retained story content. */
.about-page .stack > div > h2 { margin-block: var(--space-3) var(--space-8); }
.about-page h3 + p, .contact-layout h4 + p { margin-top: var(--space-3); }
.about-page .prose a, .contact-layout h4 ~ a { margin-top: var(--space-6); }
.prose .stack > p + p { margin-top: 0; }

.floating-contact.is-obstructing { visibility: hidden; }

/* Native cross-document transitions preserve real links, history and hash navigation.
   Unsupported browsers keep their normal navigation; content is always visible. */
@media (prefers-reduced-motion: no-preference) {
 @view-transition { navigation: auto; }
 .site-header { view-transition-name: site-header; }
 ::view-transition-group(root) { animation-duration: var(--page-motion); }
 ::view-transition-old(root) {
  animation: page-fade-out var(--page-motion) ease-in-out both;
 }
 ::view-transition-new(root) {
  animation: page-fade-in var(--page-motion) ease-in-out both;
 }
 /* Keep the navigation steady while the page content crossfades. */
 ::view-transition-group(site-header),
 ::view-transition-old(site-header),
 ::view-transition-new(site-header) { animation: none; }
 ::view-transition-old(site-header) { display: none; }
}
@keyframes page-fade-out { to { opacity: 0; } }
@keyframes page-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
 @view-transition { navigation: none; }
 ::view-transition-group(*),
 ::view-transition-old(*),
 ::view-transition-new(*) { animation: none; }
}
