/* Shared site styles, loaded by every page. Page-specific layout stays in each page. */

/* Keyboard focus: visible on the dark palette, never removed. */
:focus-visible {
  outline: 2px solid #C8A96A;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Text selection and scrollbar follow the palette instead of browser defaults. */
::selection {
  background: rgba(200, 169, 106, .35);
  color: #F5F2EC;
}
html {
  color-scheme: dark;
  scrollbar-color: #3A342B #0D0C0B;
}

/* Reduced motion: stop the smooth scroll only. Other motion is handled in the page scripts. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Small screens: the scroll cue collides with the hero stats, so it is hidden. */
@media (max-width: 560px) {
  .scroll-cue { display: none !important; }
}

/* Small screens: the decorative ring sits behind the hero copy, so it is quieter. */
@media (max-width: 820px) {
  .hero-ring { opacity: .4; }
}

/* Type system: two families, one size scale. Inline styles reference these tokens. */
:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --fs-label: 11px;   /* uppercase tracked labels, metadata */
  --fs-small: 13px;   /* captions, secondary text */
  --fs-body: 15px;    /* body copy */
  --fs-h4: 17px;      /* small headings, card titles */
  --fs-h3: 19px;      /* sub-headings */
  --fs-h2: 26px;      /* section headings */
}

/* Language switch: fixed, bottom-right, clear of the category sidebar and the nav. */
.lang-switch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  display: flex;
  border: 1px solid rgba(200, 169, 106, .35);
  border-radius: 999px;
  background: rgba(13, 12, 11, .82);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.lang-switch a {
  display: block;
  min-width: 44px;
  min-height: 36px;
  font: 500 var(--fs-label) var(--font-body);
  line-height: 36px;
  text-align: center;
  letter-spacing: .18em;
  color: #A39A8E;
  text-decoration: none;
}
.lang-switch a[aria-current="true"] {
  background: rgba(200, 169, 106, .18);
  color: #C8A96A;
}
.lang-switch a:hover { color: #EDE8E0; }

/* Mobile menu for sub-pages: a <details> disclosure, no script. Desktop keeps the inline nav. */
.mnav { display: none; position: relative; }
.mnav > summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  cursor: pointer;
}
.mnav > summary::-webkit-details-marker { display: none; }
.mnav > summary span { display: block; width: 24px; height: 1.5px; background: var(--gold); transition: transform .35s, opacity .35s; }
.mnav[open] > summary span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mnav[open] > summary span:nth-child(2) { opacity: 0; }
.mnav[open] > summary span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mnav-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: -12px;
  min-width: 220px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  background: #0D0C0B;
  border: 1px solid rgba(200, 169, 106, .35);
  border-radius: 6px;
}
/* a[href] is needed to beat the touch rule below, which centers every link under 1024px. */
.mnav-panel a[href] {
  display: block;
  justify-content: flex-start;
  padding: 14px 22px;
  text-align: left;
  font: 400 var(--fs-label) var(--font-body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #A39A8E;
  text-decoration: none;
}
.mnav-panel a:hover, .mnav-panel a:focus-visible { color: var(--gold); background: rgba(200, 169, 106, .08); }

/* Small screens: the sub-page menu replaces the full nav. */
@media (max-width: 900px) {
  .mnav { display: block; }
  /* Keep the fixed nav clear of notches and rounded corners in landscape. */
  nav[style*='position:fixed'] {
    padding-left: max(24px, env(safe-area-inset-left)) !important;
    padding-right: max(24px, env(safe-area-inset-right)) !important;
  }
}

/* Phones: the language switch floats over content, so it stays clear of the home bar and the last footer link. */
@media (max-width: 560px) {
  .lang-switch {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  footer { padding-bottom: calc(30px + 72px) !important; }
}

/* While the filter drawer or the mobile menu is open, the language switch gets out of the way. */
body:has(.sidebar.open) .lang-switch,
body:has(.mnav[open]) .lang-switch { display: none; }

/* Touch: 44px minimum hit area on touch devices and on narrow screens. */
@media (pointer: coarse), (max-width: 1024px) {
  a[href], button, [role="button"] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
