/* ============================================================
   ATELIER LUX — style.css
   Plain CSS, mobile-first. Palette & type scale live in :root.
   Whole page is pure white; gold is used only for fine accents.
   ============================================================ */

:root {
  /* ---- Palette --------------------------------------------- */
  --color-bg: #FFFFFF;          /* pure white base — used everywhere */
  --color-panel: #FFFFFF;
  --color-panel-2: #FFFFFF;
  --color-gold: #A8862F;        /* antique gold — graphical accents */
  --color-gold-dim: #8A6E28;    /* deeper gold — small-caps text / labels */
  --color-text: #1F1B16;        /* near-black warm ink */
  --color-muted: #6B6157;       /* secondary text */
  --color-line: rgba(168, 134, 47, 0.35); /* hairline gold */
  --color-line-soft: rgba(31, 27, 22, 0.10);
  --color-error: #A33B28;

  --shadow-soft: 0 2px 24px rgba(31, 27, 22, 0.08);
  --shadow-lift: 0 24px 70px rgba(31, 27, 22, 0.18);

  /* ---- Typography ------------------------------------------- */
  --font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;

  --fs-xs: 0.72rem;
  --fs-sm: 0.83rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  --fs-lg: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
  --fs-xl: clamp(1.7rem, 1.3rem + 2vw, 2.6rem);
  --fs-2xl: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
  --fs-hero: clamp(2.8rem, 1.8rem + 6vw, 6rem);

  --lh-tight: 1.15;
  --lh-body: 1.7;

  /* ---- Spacing / layout ----------------------------------- */
  --space-section: clamp(5rem, 3rem + 9vw, 10rem);
  --wrap-max: 1180px;
  --wrap-narrow: 640px;
  --gutter: clamp(1.25rem, 0.5rem + 4vw, 4rem);

  /* ---- Motion -------------------------------------------- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-slow: 900ms;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;              /* never let the slideshow create a horizontal scrollbar */
  scrollbar-gutter: stable;      /* reserve the scrollbar so content stays truly centred */
}

body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--lh-tight);
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--color-gold-dim);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ============================================================
   HELPERS
   ============================================================ */
/* Clears the fixed header when a nav link jumps to a section */
section[id] { scroll-margin-top: 84px; }

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

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

.skip-link:focus {
  position: fixed;
  top: 1rem; left: 1rem;
  width: auto; height: auto;
  clip: auto; margin: 0;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-gold-dim);
  color: var(--color-text);
  z-index: 400;
}

.label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold-dim);
  margin: 0 0 1.5rem;
}

.hairline {
  display: block;
  width: 72px;
  height: 1px;
  background: var(--color-gold);
  margin: 1.75rem 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
  padding: 1rem 2rem;
  border: 1px solid var(--color-gold-dim);
  background: transparent;
  transition: background-color 400ms var(--ease), color 400ms var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background-color: rgba(168, 134, 47, 0.14);
  color: var(--color-text);
}

/* ============================================================
   STICKY HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line-soft);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease), visibility 400ms;
}

.site-header.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  min-height: 56px;
  padding-block: 0.5rem;
  flex-wrap: wrap;
}

.wordmark__name {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text);
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--color-gold-dim); }

/* ---- Language toggle ---- */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
}

.lang-toggle__btn {
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--color-muted);
  letter-spacing: inherit;
}

.lang-toggle__btn[aria-pressed="true"] { color: var(--color-gold-dim); }
.lang-toggle__sep { color: var(--color-gold-dim); }

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(4rem, 8vh, 8rem) var(--gutter);
}

/* ---- Soft cross-fade between the hero and the gallery ----------
   During .switching the hero is pinned as a full-screen white
   overlay and its opacity is eased; the gallery sits underneath,
   so it is simply revealed as the hero fades away (and vice-versa). */
body.switching .hero {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--color-bg);
  min-height: 0;
  /* ↓↓↓ CROSS-FADE SPEED — change this one value (e.g. 1600ms for slower) ↓↓↓ */
  transition: opacity 1300ms var(--ease);
  will-change: opacity;
}

body.switching.hero-hidden .hero { opacity: 0; }

body.gallery-active:not(.switching) .hero { display: none; }

.hero__lang {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 500;
  letter-spacing: 0.16em;
  margin-left: 0.16em;
  /* Words sit side by side when there is room and wrap to two centred
     lines when the screen is too narrow — so the wordmark never runs
     edge to edge on small phones. */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.4em;
  line-height: 1.12;
}

.hero .hairline {
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 clamp(2.5rem, 6vw, 3.5rem);
}

/* ============================================================
   2. GALLERY — coverflow slideshow
   ============================================================ */
.gallery {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(3.5rem, 8vh, 6rem);
  overflow-x: clip;
}

.gallery > .wrap { width: 100%; }

.section-head { margin-bottom: clamp(1.5rem, 4vh, 2.75rem); text-align: center; }
/* Heading text is hidden but its space is kept so the slideshow does not shift up */
.section-head h2 { font-size: var(--fs-2xl); letter-spacing: 0.02em; visibility: hidden; }

.slideshow {
  /* Sized by viewport height so the whole slideshow + arrows fit on screen */
  --slide-h: min(54vh, 30rem);
  --slide-w: calc(var(--slide-h) / 1.34);
  width: 100%;
}

.slideshow[aria-busy="true"] .slideshow__stage { opacity: 0; }

.slideshow__stage {
  position: relative;
  height: var(--slide-h);
  margin-inline: auto;
  perspective: 1600px;
  transform-style: preserve-3d;
  transition: opacity 500ms var(--ease);
  touch-action: pan-y;
}

.slideshow__slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--slide-w);
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  transform: translateX(-50%);
  transition: transform 620ms var(--ease), opacity 620ms var(--ease), filter 620ms var(--ease);
  will-change: transform, opacity;
}

.slideshow__slide img {
  width: 100%;
  height: var(--slide-h);
  object-fit: cover;
  background: var(--color-bg);
  border-radius: 5px;
  box-shadow: 0 26px 60px rgba(31, 27, 22, 0.22), 0 8px 20px rgba(31, 27, 22, 0.14);
}

.slideshow__slide.is-side { cursor: pointer; }
.slideshow__slide.is-active { cursor: zoom-in; }
.slideshow__slide.is-hidden { pointer-events: none; }

.slideshow__controls {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-top: clamp(2.25rem, 5.5vh, 4rem);
}

.slideshow__nav {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-line-soft);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 300ms var(--ease), color 300ms var(--ease), background-color 300ms var(--ease);
}

.slideshow__nav:hover,
.slideshow__nav:focus-visible {
  border-color: var(--color-gold-dim);
  color: var(--color-gold-dim);
}

.slideshow__nav svg { width: 20px; height: 20px; }

.gallery__status {
  margin-top: 3rem;
  color: var(--color-muted);
  font-size: var(--fs-sm);
  text-align: center;
}

.gallery__status[hidden] { display: none; }

/* ============================================================
   3. ABOUT — text only
   ============================================================ */
.about {
  padding-block: var(--space-section);
  border-block: 1px solid var(--color-line-soft);
}

.about__inner { text-align: center; }

/* A discrete centred column so the block sits over the page centre,
   exactly like the gallery image */
.about__text {
  max-width: 46rem;
  margin-inline: auto;
}

.about__text h2 {
  font-size: var(--fs-xl);
}

.about__text .hairline { margin: 1.5rem auto 2rem; }

.about__body {
  color: var(--color-muted);
  font-size: var(--fs-md);
}

.about__body + .about__body { margin-top: 1.5rem; }

/* ============================================================
   4. CONTACT — plain details
   ============================================================ */
.contact {
  padding-block: var(--space-section);
}

.contact__inner { text-align: center; }

.contact__inner h2 {
  font-size: var(--fs-xl);
  margin-bottom: 0;
}

.contact__inner .hairline { margin: 1.5rem auto 1.75rem; }

.contact__intro {
  color: var(--color-muted);
  font-size: var(--fs-sm);
  margin-bottom: 3rem;
}

.contact__details {
  margin: 0;
  display: grid;
  gap: 2rem;
  justify-items: center;
}

@media (min-width: 560px) {
  .contact__details {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, max-content);
    justify-content: center;
    gap: 3.5rem;
  }
}

.contact__item dt { margin-bottom: 0.6rem; }

.contact__item dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
}

.contact__item a:hover,
.contact__item a:focus-visible { color: var(--color-gold-dim); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--color-line-soft);
  background: var(--color-bg);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  justify-content: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible { color: var(--color-gold-dim); }

.site-footer__mark {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--color-gold-dim);
}

.site-footer__copy {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

/* ============================================================
   LIGHTBOX MODAL — image only
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--color-bg);
  box-shadow: var(--shadow-lift);
  max-width: 960px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-gold-dim);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.modal__close:hover,
.modal__close:focus-visible {
  color: var(--color-gold-dim);
  border-color: var(--color-gold-dim);
}

.modal__close svg { width: 20px; height: 20px; }

.modal__media {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__media img {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
