/* Shared header, footer, mobile menu and dialog styles. Load after style.css. */
body.is-modal-open { overflow: hidden; }
.skip-link { position: fixed; z-index: 200; left: 16px; top: -80px; padding: 10px 16px; color: var(--paper); background: var(--olive); }
.skip-link:focus { top: 12px; }

/* A small ceramic mark anchors the two sides of the masthead. */
.site-header { min-height: var(--header-height); position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color 180ms ease; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { position: relative; display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; min-height: var(--header-height); }
.header-nav { display: flex; align-items: center; gap: 32px; font-size: 14px; line-height: 1.6; }
.header-nav--left { justify-content: flex-start; }
.header-nav--right { justify-content: flex-end; padding-right: 112px; }
.header-nav a { position: relative; padding-block: 12px; white-space: nowrap; }
.header-nav a::after { content: ""; position: absolute; inset: auto 0 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.header-nav a:hover::after { transform: scaleX(1); }
.masthead-logo, .footer-logo { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; }
.ceramic-mark { position: relative; display: inline-block; flex: 0 0 40px; width: 40px; height: 40px; color: currentColor; }
.ceramic-mark::before { content: ""; position: absolute; left: 5px; top: 13px; width: 30px; height: 17px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 16px 16px; }
.ceramic-mark::after { content: ""; position: absolute; left: 5px; top: 9px; width: 30px; height: 9px; border: 2px solid currentColor; border-radius: 50%; }
.ceramic-mark > span { position: absolute; bottom: 7px; left: 15px; width: 10px; height: 2px; background: currentColor; }
.header-actions { position: absolute; right: var(--gutter); top: 0; display: flex; align-items: center; gap: 24px; height: var(--header-height); }
.language-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.4; }
.language-switch > span:nth-child(2) { color: #a5a89e; }
.language-switch button { padding-block: 10px; color: var(--muted); }
.menu-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; }
.menu-toggle span { width: 22px; height: 1px; background: currentColor; }

/* The footer is an open colophon with its own type scale. */
.site-footer { padding: 80px 0 0; color: var(--paper); background: var(--ink); }
.footer-masthead { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(247, 245, 240, 0.2); }
.footer-brand { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; min-width: 0; }
.footer-brand-head { display: flex; align-items: center; gap: 16px; }
.footer-brand .footer-logo { flex: 0 0 40px; margin: 0; }
.footer-brand p { font-size: 14px; line-height: 1.8; color: rgba(247, 245, 240, 0.65); }
.footer-brand .footer-company { margin: 0; color: var(--paper); font-size: 16px; line-height: 1.5; }
.footer-brand .footer-tagline { margin: 0; }
.footer-social { width: 100%; }
.footer-social-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 280px; padding: 0; list-style: none; }
.footer-social-item { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; cursor: default; }
.footer-social-icon { display: flex; flex: 0 0 40px; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(247, 245, 240, 0.28); border-radius: 50%; }
.footer-social-icon img { width: 24px; height: 24px; }
.footer-social-item > span:last-child { color: rgba(247, 245, 240, 0.75); font-size: 14px; line-height: 1.8; white-space: nowrap; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.2fr); align-items: start; gap: clamp(24px, 3vw, 48px); padding-top: 32px; padding-bottom: 32px; }
.footer-group summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; font-size: 16px; line-height: 1.5; list-style: none; cursor: default; }
.footer-group summary::-webkit-details-marker { display: none; }
.footer-group summary > span { display: none; }
.footer-group nav, .footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-group a, .footer-contact p { font-size: 14px; line-height: 1.8; color: rgba(247, 245, 240, 0.65); }
.footer-group a:hover { color: var(--paper); }
.footer-contact p { margin-top: 4px; }
.footer-bottom { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 28px; min-height: 78px; padding-right: 56px; border-top: 1px solid rgba(247, 245, 240, 0.2); }
.footer-bottom p, .footer-bottom > span { color: rgba(247, 245, 240, 0.52); font-size: 12px; line-height: 1.6; }
.footer-bottom > span { letter-spacing: 0.08em; }
.back-top { position: absolute; right: 0; top: 50%; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(247, 245, 240, 0.35); border-radius: 50%; transform: translateY(-50%); font-size: 20px; }

/* Native modal dialogs keep all long content inside a scrollable viewport. */
dialog { width: min(1040px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 64px); padding: 0; margin: auto; border: 0; color: var(--ink); background: var(--paper); overflow: auto; overscroll-behavior: contain; }
dialog:modal { position: fixed; inset: 0; }
dialog::backdrop { background: rgba(23, 31, 25, 0.62); }
.modal-close { position: absolute; z-index: 2; right: 20px; top: 16px; display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; background: var(--paper); font-size: 26px; line-height: 1; }
.menu-dialog { inset: 0 0 0 auto !important; width: min(480px, 100%); height: 100svh; max-height: 100svh; margin: 0 0 0 auto; }
.mobile-menu { padding: 28px 32px 36px; }
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.menu-head p { font-size: 16px; }
.menu-head .modal-close { position: static; flex: 0 0 40px; }
.mobile-menu nav { display: flex; flex-direction: column; }
.menu-link { display: grid; grid-template-columns: 32px 1fr 20px; align-items: center; gap: 18px; padding-block: 18px; border-bottom: 1px solid var(--line); font-size: 18px; }
.menu-link > span:first-child { color: var(--muted); font-size: 14px; }
.menu-link > span:last-child { font-size: 18px; }
.menu-phone { display: inline-flex; margin-top: 32px; border-bottom: 1px solid currentColor; font-size: 18px; }

@media (max-width: 1439px) {
  .header-nav { gap: 24px; }
}

@media (max-width: 1099px) {
  .header-nav { display: none; }
  .masthead-logo { grid-column: 2; }
  .menu-toggle { display: flex; }
  .header-actions { gap: 16px; }
  .footer-top { gap: 24px; }
  .footer-social-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 160px; }
}

@media (max-width: 767px) {
  .header-actions { gap: 10px; }
  .language-switch { gap: 6px; font-size: 14px; }
  .site-footer { padding-top: 44px; }
  .footer-masthead { flex-direction: column; align-items: flex-start; gap: 28px; padding-bottom: 28px; }
  .footer-brand { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-brand .footer-tagline { margin-left: 56px; }
  .footer-brand .footer-company { font-size: 16px; }
  .footer-brand p { font-size: 14px; }
  .footer-social { padding-bottom: 22px; }
  .footer-social-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 280px; }
  .footer-social-item { flex-direction: column; gap: 8px; }
  .footer-social-item > span:last-child { font-size: 14px; }
  .footer-top { display: block; padding: 0; }
  .footer-group { border-bottom: 1px solid rgba(247, 245, 240, 0.2); }
  .footer-top > .footer-group:last-child { border-bottom: 0; }
  .footer-group summary { min-height: 56px; margin-bottom: 0; padding-block: 16px; cursor: pointer; font-size: 16px; }
  .footer-group summary > span { display: inline-block; width: 20px; font-size: 20px; line-height: 1; text-align: center; }
  .footer-group[open] summary > span { font-size: 0; }
  .footer-group[open] summary > span::after { content: "−"; font-size: 20px; }
  .footer-group nav, .footer-contact { gap: 11px; padding-bottom: 22px; }
  .footer-group:not([open]) nav, .footer-group:not([open]) .footer-contact, .footer-group:not([open]) .footer-social { display: none; }
  .footer-group a, .footer-contact p { font-size: 14px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; min-height: 104px; padding-block: 20px; }
  .footer-bottom p, .footer-bottom > span { font-size: 12px; }
  .back-top { width: 40px; height: 40px; font-size: 20px; }
  dialog { width: calc(100% - 32px); max-height: calc(100dvh - 32px); }
  .modal-close { top: 10px; right: 10px; font-size: 26px; }
  .mobile-menu { padding: 20px 24px 28px; }
  .menu-head { margin-bottom: 12px; padding-bottom: 16px; }
  .menu-head .modal-close { top: auto; right: auto; }
  .menu-link { gap: 14px; padding-block: 17px; font-size: 18px; }
}

@media (max-width: 374px) {
  .language-switch { gap: 5px; }
  .header-actions { gap: 6px; }
}

.header-nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-link[aria-current="page"] { color: var(--olive); }
