/* ==========================================================================
   base.css — reset, structural primitives, and shared components.
   Everything visual (type, colour, layout rhythm) lives in the concept
   stylesheets: editorial.css, rustico.css, boutique.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Utilities ----------------------------------------------------------- */

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0; top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: #111;
  color: #fff;
  text-decoration: none;
  transform: translateY(-120%);
}
.skip:focus { transform: translateY(0); }

/* Images that fill their frame. Concepts set the frame's aspect-ratio. */
.fill picture, .fill img { width: 100%; height: 100%; }
.fill img { object-fit: cover; }

/* --- Scroll reveal ------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* No JS, or reduced motion: never leave content invisible. */
.no-js .reveal,
:where(html:not(.js)) .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* --- Lightbox ------------------------------------------------------------ */

.lb {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(12, 11, 10, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.lb[open], .lb.is-open { opacity: 1; visibility: visible; }

.lb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  color: #f4f1ec;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lb__stage {
  display: grid;
  place-items: center;
  padding: 0 clamp(0.5rem, 3vw, 3rem);
  min-height: 0;
}
.lb__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lb__cap {
  padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
  color: #cfc8bd;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  max-width: 70ch;
  margin-inline: auto;
}

.lb__btn {
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  color: #f4f1ec;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}
.lb__btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb__btn svg { width: 1.25rem; height: 1.25rem; }

.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.lb__nav--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lb__nav--next { right: clamp(0.5rem, 2vw, 1.5rem); }

body.lb-open { overflow: hidden; }

/* --- Concept switcher (review aid — removed at cutover) ------------------ */

.cswitch {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: calc(100vw - 2rem);
  overflow-x: auto;
  scrollbar-width: none;
}
.cswitch::-webkit-scrollbar { display: none; }

.cswitch__label {
  display: grid;
  place-items: center;
  padding: 0 0.75rem 0 1rem;
  color: rgba(244, 241, 236, 0.5);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cswitch a {
  display: grid;
  gap: 1px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: rgba(244, 241, 236, 0.72);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.cswitch a b { font-size: 0.82rem; font-weight: 600; }
.cswitch a span { font-size: 0.62rem; opacity: 0.6; }
.cswitch a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.cswitch a[aria-current="page"] { background: #f4f1ec; color: #1a1714; }
.cswitch a[aria-current="page"] span { opacity: 0.55; }

.cswitch__all {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  margin-left: 2px;
  font-size: 0.72rem;
  align-content: center;
}

@media print {
  .cswitch, .skip { display: none; }
}
