/**
 * Base — GeneratePress Luxe
 *
 * Design tokens (CSS custom properties), typographic scale, and global
 * resets that establish the luxury editorial foundation.
 *
 * All other CSS files import from this token set via var().
 * Changing a token here propagates across the entire theme.
 *
 * @package GP_Luxe
 */

/* =========================================================================
   1. Design Tokens
   ========================================================================= */

:root {

  /* --- Colour palette --- */
  --luxe-black:        #311603;   /* deepest espresso — primary text, buttons, headings */
  --luxe-white:        #fffdf9;   /* warm white — text on dark backgrounds */
  --luxe-off-white:    #F0E9DF;   /* cream — page background, card surfaces */
  --luxe-warm-grey:    #C2AB90;   /* warm sand — borders, counters, subtle UI */
  --luxe-mid-grey:     #7D6352;   /* warm brown — tertiary text, labels, meta */
  --luxe-dark-grey:    #553B2D;   /* dark brown — body copy, secondary text */
  --luxe-accent:       #7D6352;   /* accent = mid-brown — CTAs, hover states */

  /* --- Typography --- */
  --luxe-font-serif:   'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --luxe-font-script:  'Allura', cursive;          /* decorative script for taglines / section accents */
  --luxe-font-sans:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --luxe-font-mono:    'Courier New', monospace;

  /* --- Type scale --- */
  --luxe-text-xs:      0.6875rem;   /* 11px — micro labels */
  --luxe-text-sm:      0.8125rem;   /* 13px — captions, meta */
  --luxe-text-base:    1rem;        /* 16px */
  --luxe-text-md:      1.125rem;    /* 18px — body */
  --luxe-text-lg:      1.375rem;    /* 22px — sub-heading */
  --luxe-text-xl:      1.75rem;     /* 28px — section heading */
  --luxe-text-2xl:     2.5rem;      /* 40px — page heading */
  --luxe-text-3xl:     3.5rem;      /* 56px — hero heading */
  --luxe-text-4xl:     5rem;        /* 80px — display heading */

  /* --- Letter spacing (editorial / fashion convention) --- */
  --luxe-tracking-tight:  -0.02em;
  --luxe-tracking-normal:  0;
  --luxe-tracking-wide:    0.08em;
  --luxe-tracking-wider:   0.18em;
  --luxe-tracking-widest:  0.28em;

  /* --- Line height --- */
  --luxe-leading-tight:   1.1;
  --luxe-leading-snug:    1.3;
  --luxe-leading-normal:  1.6;
  --luxe-leading-loose:   1.9;

  /* --- Spacing scale --- */
  --luxe-space-1:   0.25rem;
  --luxe-space-2:   0.5rem;
  --luxe-space-3:   0.75rem;
  --luxe-space-4:   1rem;
  --luxe-space-5:   1.5rem;
  --luxe-space-6:   2rem;
  --luxe-space-8:   3rem;
  --luxe-space-10:  4rem;
  --luxe-space-12:  5rem;
  --luxe-space-16:  7rem;
  --luxe-space-20:  10rem;

  /* --- Layout --- */
  --luxe-max-width:        1320px;
  --luxe-content-width:    780px;
  --luxe-header-height:    72px;
  --luxe-offcanvas-width:  400px;

  /* --- Transitions --- */
  --luxe-ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --luxe-ease-in:     cubic-bezier(0.64, 0, 0.78, 0);
  --luxe-duration-fast:   180ms;
  --luxe-duration-base:   320ms;
  --luxe-duration-slow:   600ms;
  --luxe-duration-intro:  1200ms;

  /* --- Border / Dividers --- */
  --luxe-border-light:  1px solid rgba(49, 22, 3, 0.10);
  --luxe-border-mid:    1px solid rgba(49, 22, 3, 0.22);
  --luxe-border-dark:   1px solid rgba(49, 22, 3, 0.50);
}

/* =========================================================================
   2. Google Fonts — Cormorant Garamond + Montserrat
   Load via @import here (single request) OR enqueue via wp_enqueue_style
   in functions.php for better performance (recommended for production).

   FLAG: Replace this @import with a wp_enqueue_style call pointing to:
   https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Montserrat:wght@300;400;500&display=swap
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Allura&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Montserrat:wght@300;400;500&display=swap');

/* =========================================================================
   3. Global Reset / Base Styles
   ========================================================================= */

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

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

/* Respect reduced motion at the HTML level */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  color: var(--luxe-dark-grey);
  font-family: var(--luxe-font-serif);
  font-size: var(--luxe-text-md);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================================
   4. Typography
   ========================================================================= */

/* Headings — serif for editorial luxury */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--luxe-font-serif);
  font-weight: 500;
  line-height: var(--luxe-leading-tight);
  letter-spacing: 0.03em;
  margin-top: 0;
  margin-bottom: var(--luxe-space-4);
  color: var(--luxe-dark-grey);
}

h1 { font-size: clamp(var(--luxe-text-2xl), 5vw, var(--luxe-text-3xl)); }
h2 { font-size: clamp(var(--luxe-text-xl), 3.5vw, var(--luxe-text-2xl)); }
h3 { font-size: clamp(var(--luxe-text-lg), 2.5vw, var(--luxe-text-xl)); }
h4 { font-size: var(--luxe-text-lg); }
h5 { font-size: var(--luxe-text-md); }
h6 { font-size: var(--luxe-text-base); letter-spacing: var(--luxe-tracking-wider); text-transform: uppercase; }

/* Body text */
p {
  margin-top: 0;
  margin-bottom: var(--luxe-space-4);
  line-height: var(--luxe-leading-normal);
}

/* Small caps / label text utility */
.luxe-label {
  font-family: var(--luxe-font-sans);
  font-size: var(--luxe-text-xs);
  font-weight: 500;
  letter-spacing: var(--luxe-tracking-widest);
  text-transform: uppercase;
}

/* Display / hero text utility — large uppercase serif */
.luxe-display {
  font-family: var(--luxe-font-serif);
  font-size: clamp(var(--luxe-text-3xl), 8vw, var(--luxe-text-4xl));
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* Script accent text — decorative calligraphic headings and taglines */
.luxe-script {
  font-family: var(--luxe-font-script);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

/* Script on light backgrounds */
.luxe-script--dark {
  color: var(--luxe-mid-grey);
}

/* Script on dark / hero backgrounds */
.luxe-script--light {
  color: var(--luxe-off-white);
}

/* Italic accent text */
.luxe-italic {
  font-style: italic;
}

/* Horizontal rule — thin divider */
hr {
  border: none;
  border-top: var(--luxe-border-light);
  margin: var(--luxe-space-8) 0;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--luxe-duration-fast) var(--luxe-ease-out);
}

a:hover {
  opacity: 0.65;
}

a:focus-visible {
  outline: 2px solid var(--luxe-black);
  outline-offset: 3px;
  border-radius: 1px;
}

/* =========================================================================
   4b. Buttons — luxury editorial style
   ========================================================================= */

/*
 * Primary button: warm cream background, dark brown serif text.
 * Matches the mockup's "Discover Chapter I" and "Shop Collection" CTAs.
 */
.luxe-btn,
button.luxe-btn,
a.luxe-btn {
  display: inline-block;
  font-family: var(--luxe-font-serif);
  font-size: var(--luxe-text-md);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--luxe-dark-grey);
  background: var(--luxe-off-white);
  border: 1px solid rgba(85, 59, 45, 0.18);
  padding: 0.85em 2.2em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background var(--luxe-duration-base) var(--luxe-ease-out),
              color var(--luxe-duration-base) var(--luxe-ease-out),
              border-color var(--luxe-duration-base) var(--luxe-ease-out),
              transform var(--luxe-duration-base) var(--luxe-ease-out);
}

.luxe-btn:hover,
button.luxe-btn:hover,
a.luxe-btn:hover {
  background: var(--luxe-warm-grey);
  color: var(--luxe-black);
  border-color: rgba(85, 59, 45, 0.25);
  opacity: 1; /* override the global a:hover opacity */
  transform: translateY(-1px);
}

.luxe-btn:focus-visible {
  outline: 2px solid var(--luxe-dark-grey);
  outline-offset: 3px;
}

/*
 * Secondary dark button: rich espresso background, cream text.
 * Matches the mockup's "Read Our Story" and "Explore Chapter II" CTAs.
 */
.luxe-btn--dark,
a.luxe-btn--dark {
  background: var(--luxe-dark-grey);
  color: var(--luxe-off-white);
  border-color: rgba(240, 233, 223, 0.12);
}

.luxe-btn--dark:hover,
a.luxe-btn--dark:hover {
  background: var(--luxe-mid-grey);
  color: var(--luxe-off-white);
  border-color: rgba(240, 233, 223, 0.20);
}

/*
 * Ghost / outline button: transparent with subtle border.
 * For secondary actions on light backgrounds.
 */
.luxe-btn--outline,
a.luxe-btn--outline {
  background: transparent;
  color: var(--luxe-dark-grey);
  border: 1px solid var(--luxe-warm-grey);
}

.luxe-btn--outline:hover,
a.luxe-btn--outline:hover {
  background: var(--luxe-off-white);
  border-color: var(--luxe-dark-grey);
}

/* Small button variant */
.luxe-btn--sm {
  font-size: var(--luxe-text-sm);
  padding: 0.65em 1.6em;
}

/* Large button variant — hero CTA size */
.luxe-btn--lg {
  font-size: var(--luxe-text-lg);
  padding: 0.9em 2.8em;
}

/* =========================================================================
   5. Layout utilities
   ========================================================================= */

.luxe-container {
  width: 100%;
  max-width: var(--luxe-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--luxe-space-6);
  padding-right: var(--luxe-space-6);
}

.luxe-content-width {
  max-width: var(--luxe-content-width);
  margin-left: auto;
  margin-right: auto;
}

/* Full-bleed utility — breaks out of any container */
.luxe-full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* =========================================================================
   6. GeneratePress layout adjustments
   ========================================================================= */

/*
 * GP outputs `.grid-container { max-width: <value>px }` as an inline <style> in
 * <head>, driven by Appearance → Customize → Container Width.
 * Our enqueued stylesheet loads AFTER that inline block, so this rule wins even
 * if the Customizer value was accidentally set (e.g. 13px instead of 1320px).
 * body .grid-container matches GP's own selector specificity exactly.
 */
body .grid-container {
  max-width: var(--luxe-max-width);
}

/* Remove default GP container max-width restriction on full-width pages */
.luxe-homepage .site-content .content-area,
.luxe-collection-archive .site-content .content-area,
.luxe-chapter-page .site-content .content-area {
  width: 100%;
  max-width: none;
}

/* Remove GP sidebar on WooCommerce pages (see woocommerce.php for layout filter) */
.luxe-single-product #primary,
.luxe-collection-archive #primary,
.luxe-chapter-page #primary {
  width: 100%;
  max-width: none;
  float: none;
}

/* GeneratePress wraps content in .inside-article — give it room */
.single-product .inside-article {
  padding: 0;
}

/* =========================================================================
   7. Image defaults
   ========================================================================= */

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

figure {
  margin: 0;
}

figcaption {
  font-size: var(--luxe-text-sm);
  color: var(--luxe-mid-grey);
  letter-spacing: var(--luxe-tracking-wide);
  text-transform: uppercase;
  margin-top: var(--luxe-space-2);
  text-align: center;
}

/* =========================================================================
   8. Button base styles
   ========================================================================= */

.luxe-btn {
  display: inline-block;
  font-family: var(--luxe-font-sans);
  font-size: var(--luxe-text-xs);
  font-weight: 500;
  letter-spacing: var(--luxe-tracking-widest);
  text-transform: uppercase;
  padding: 0.85em 2.2em;
  border: 1px solid var(--luxe-black);
  background: transparent;
  color: var(--luxe-black);
  cursor: pointer;
  transition:
    background var(--luxe-duration-fast) var(--luxe-ease-out),
    color var(--luxe-duration-fast) var(--luxe-ease-out);
  text-align: center;
  white-space: nowrap;
}

.luxe-btn:hover {
  background: var(--luxe-black);
  color: var(--luxe-white);
  opacity: 1;
}

.luxe-btn--filled {
  background: var(--luxe-black);
  color: var(--luxe-white);
}

.luxe-btn--filled:hover {
  background: var(--luxe-dark-grey);
  border-color: var(--luxe-dark-grey);
  color: var(--luxe-white);
  opacity: 1;
}

.luxe-btn--ghost {
  border-color: var(--luxe-white);
  color: var(--luxe-white);
}

.luxe-btn--ghost:hover {
  background: var(--luxe-white);
  color: var(--luxe-black);
  opacity: 1;
}

/* =========================================================================
   9. Accessibility helpers
   ========================================================================= */

.screen-reader-text,
.sr-only {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Skip link — visible on focus for keyboard users */
.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  left: 6px;
  overflow: visible;
  position: absolute;
  top: 7px;
  width: auto;
  z-index: 999999;
  padding: var(--luxe-space-2) var(--luxe-space-4);
  background: var(--luxe-black);
  color: var(--luxe-white);
  font-size: var(--luxe-text-sm);
}

/* =========================================================================
   10. Intro overlay — book page-turn
   =========================================================================
   Architecture:
     .luxe-intro              Perspective stage: fixed, transparent.
       ::after                Dim veil cast by the lifting page.
     .luxe-intro__page        The physical page — wipes right-to-left via clip-path.
       ::before               Bottom-right corner curl (affordance, pure CSS).
       ::after                Fold lighting gradient (clipped with the page).
     .luxe-intro__crease      Fold crease line — SIBLING of page, sweeps R→L
                              independently (not affected by page clip-path).
     .luxe-intro__inner       Centered brand content.
     .luxe-intro__brand-name  Ink-reveal entrance animation.
       ::after                Thin decorative rule.

   HOW THE BOOK PAGE TURN WORKS:
     clip-path on .luxe-intro__page wipes the visible area from right to left,
     progressively revealing the site beneath — exactly like a page turning.
     .luxe-intro__crease sweeps in sync to show the fold crease crossing the
     viewport. A subtle rotateY tilts the remaining spine strip for depth.
   ========================================================================= */

/* --- Perspective stage -------------------------------------------------- */
.luxe-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: all;
  /* No perspective needed — clip-path wipe handles the visual entirely */
  overflow: hidden;
}

/*
 * Dim backdrop cast by the lifting page onto the site beneath.
 * As the page peels up it obscures light — this veil fades in during the turn
 * and clears the instant the page is gone, giving the site reveal a "breath".
 */
.luxe-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(49, 22, 3, 0);
  pointer-events: none;
  z-index: 1; /* above site, below .luxe-intro__page (z-index 2) */
}

.luxe-intro.is-turning::after {
  animation: luxePageCastShadow 1100ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- The physical page -------------------------------------------------- */
.luxe-intro__page {
  position: absolute;
  inset: 0;

  /* Photo background: image from --luxe-intro-img (set inline by PHP) under a
   * dark scrim so the brand name remains legible on any photo.
   * Fallback: deep warm near-black in case the image fails to load. */
  background-color: #311603;
  background-image:
    linear-gradient(rgba(49, 22, 3, 0.42), rgba(49, 22, 3, 0.42)),
    var(--luxe-intro-img, none);
  background-size: cover;
  background-position: center center;

  /* Spine: hairline on left edge */
  box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.18);

  will-change: clip-path;
  z-index: 2;
}

/* --- Corner curl — decorative affordance at bottom-right ---------------- */
.luxe-intro__page::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 54px;
  height: 54px;
  /* Triangle via clip-path; gradient fakes the folded underside of the page */
  background: linear-gradient(
    to top-left,
    rgba(148, 143, 135, 0.28) 0%,
    rgba(200, 196, 189, 0.10) 45%,
    transparent 46%
  );
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  transform-origin: bottom right;
  transform: scale(0);
  /* Curl appears after name settles — at 1 100ms */
  animation: luxeCornerCurl 550ms cubic-bezier(0.34, 1.42, 0.64, 1) 1100ms forwards;
  z-index: 5;
  pointer-events: none;
  /* Tiny shadow under the fold makes it read as lifted paper */
  filter: drop-shadow(-2px -2px 4px rgba(49, 22, 3, 0.12));
}

/* Curl disappears the instant the page starts turning */
.luxe-intro.is-turning .luxe-intro__page::before {
  animation: none;
  transform: scale(0);
}

/* --- Fold shadow — deepens as the page tilts away from viewer ----------- */
.luxe-intro__page::after {
  content: '';
  position: absolute;
  inset: 0;
  /*
   * Three-zone gradient:
   *  left  0–4%  : faint specular highlight at the spine / crease
   *  left  4–16% : immediate dark shadow just off the spine (fold crease)
   *  mid  16–60% : page surface, tapering to light
   *  right 60–100%: right portion tilting away from light source — darker
   * Opacity-only animation (no gradient interpolation) for cross-browser reliability.
   */
  /*
   * As clip-path narrows the visible strip, this gradient compresses with it.
   * The spine highlight + crease shadow dominate on the narrow final strip,
   * which looks exactly like the spine area of a book page mid-turn.
   */
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.09)  0%,
    rgba(10,  10,  10,  0.22)  3%,
    rgba(10,  10,  10,  0.06) 14%,
    transparent                32%,
    rgba(10,  10,  10,  0.16) 100%
  );
  opacity: 0;
  z-index: 4;
  pointer-events: none;
}

/* Fold lighting: on during full sweep, clears as strip reaches zero width */
.luxe-intro.is-turning .luxe-intro__page::after {
  animation: luxePageTurnShadow 1100ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- Page-turn trigger (JS adds .is-turning to .luxe-intro) ------------- */
.luxe-intro.is-turning .luxe-intro__page {
  animation: luxePageTurn 1100ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- Fold crease — sweeps RIGHT → LEFT independently of the page clip ---- */
/*
 * .luxe-intro__crease is a SIBLING of .luxe-intro__page.
 * The page's clip-path does NOT affect it.
 * Gradient simulates the fold line:
 *   left dark   = shadow on the already-turned side
 *   centre bright = paper catching light at the bend peak
 *   right dark  = shadow cast onto the still-flat page ahead of the crease
 */
.luxe-intro__crease {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%; /* begins off-screen right */
  width: 80px;
  background: linear-gradient(
    to right,
    rgba(10,  10,  10,  0.28)   0%,
    rgba(10,  10,  10,  0.10)  22%,
    rgba(255, 255, 255, 0.24)  48%,
    rgba(10,  10,  10,  0.10)  72%,
    transparent                100%
  );
  opacity: 0;
  z-index: 3; /* above page (z-index 2) so it reads as the fold line on top */
  pointer-events: none;
}

.luxe-intro.is-turning .luxe-intro__crease {
  animation: luxeCreaseSweep 1100ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Fully hidden once JS adds .is-dismissed */
.luxe-intro.is-dismissed {
  display: none;
}

/* --- Page-turn keyframes ----------------------------------------------- */

/*
 * luxePageTurn
 * ─────────────────────────────────────────────────────────────────────────
 * Phase 1 (0–18%):  Page flat, rotateY lifts gently to 12° — the "peel"
 *                   moment where paper peeks up before committing.
 * Phase 2 (18–95%): clip-path sweeps the visible area from 100%→0% (right
 *                   to left). rotateY continues to 22° so the remaining
 *                   spine strip tilts in perspective — matches how a real
 *                   page looks just before it clears the spine.
 * Phase 3 (95–100%): Held at zero clip / 22° (page fully gone).
 *
 * The SITE IS REVEALED PROGRESSIVELY from right to left as the clip moves.
 */
@keyframes luxePageTurn {
  0%   { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  18%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  95%  { clip-path: polygon(0 0, 0%   0, 0%   100%, 0 100%); }
  100% { clip-path: polygon(0 0, 0%   0, 0%   100%, 0 100%); }
}

/*
 * luxeCreaseSweep
 * ─────────────────────────────────────────────────────────────────────────
 * Synced to luxePageTurn using identical duration + easing.
 * The crease tracks the clip's right boundary:
 *   At 18% both are at the right edge of the viewport.
 *   At 95% both have cleared the left edge.
 */
@keyframes luxeCreaseSweep {
  0%   { left: 100%;              opacity: 0; }
  14%  { left: calc(100% - 80px); opacity: 1; }
  18%  { left: calc(100% - 80px); opacity: 1; }
  95%  { left: -80px;             opacity: 1; }
  100% { left: -80px;             opacity: 0; }
}

/* Fold lighting on the page: full during sweep, clears as strip hits zero */
@keyframes luxePageTurnShadow {
  0%   { opacity: 0;    }
  16%  { opacity: 0.85; }
  88%  { opacity: 0.85; }
  100% { opacity: 0;    }
}

/* Dim veil cast on site beneath the lifting page */
@keyframes luxePageCastShadow {
  0%   { background: rgba(49, 22, 3, 0);    }
  20%  { background: rgba(49, 22, 3, 0.08); }
  80%  { background: rgba(49, 22, 3, 0.03); }
  100% { background: rgba(49, 22, 3, 0);    }
}

/* Corner curl grows from zero */
@keyframes luxeCornerCurl {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* --- Brand content ------------------------------------------------------- */

.luxe-intro__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  pointer-events: none;
  /* Counter-rotate slightly so content reads flat while page begins to tilt */
  /* (no counter-rotation needed — content is child of page, moves with it) */
}

/*
 * Brand name: "ink on paper" entrance.
 * Starts blurred (like wet ink) + very slightly enlarged, then sharpens.
 * The 250ms delay lets the page "settle" before the name appears.
 */
.luxe-intro__brand-name {
  display: block;
  font-family: var(--luxe-font-serif);
  font-size: clamp(var(--luxe-text-2xl), 6vw, var(--luxe-text-4xl));
  font-weight: 300;
  letter-spacing: var(--luxe-tracking-wide);
  color: var(--luxe-white);

  opacity: 0;
  filter: blur(9px);
  transform: scale(1.04);
  animation: luxeInkReveal 950ms cubic-bezier(0.22, 1, 0.36, 1) 250ms forwards;
}

/*
 * Thin rule beneath the name — grows from center outward like a pen stroke.
 * Starts at 1 000ms (after name is ~70% revealed).
 */
.luxe-intro__brand-name::after {
  content: '';
  display: block;
  height: 1px;
  width: 0;
  background: rgba(255, 255, 255, 0.30);
  margin: var(--luxe-space-5) auto 0;
  animation: luxeRuleGrow 700ms cubic-bezier(0.22, 1, 0.36, 1) 1000ms forwards;
}

@keyframes luxeInkReveal {
  0%   { opacity: 0;   filter: blur(9px);  transform: scale(1.04); }
  55%  { opacity: 1;   filter: blur(0px);  transform: scale(1.00); }
  100% { opacity: 1;   filter: blur(0px);  transform: scale(1.00); }
}

@keyframes luxeRuleGrow {
  from { width: 0; }
  to   { width: 56px; }
}

/* --- Reduced motion: no 3D, just a clean cross-fade -------------------- */
@media (prefers-reduced-motion: reduce) {
  .luxe-intro {
    perspective: none;
  }
  .luxe-intro__page {
    will-change: auto;
  }
  .luxe-intro__crease {
    display: none;
  }
  .luxe-intro__page::before {
    animation: none;
    transform: scale(0); /* hide curl entirely */
  }
  .luxe-intro__page::after {
    display: none;
  }
  .luxe-intro__brand-name {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
  .luxe-intro__brand-name::after {
    animation: none;
    width: 56px;
  }
  /* Replace page-turn with a simple fade for reduced-motion users */
  .luxe-intro.is-turning .luxe-intro__page {
    animation: luxePageFadeOut 400ms ease forwards;
  }
  .luxe-intro.is-turning .luxe-intro__page::after,
  .luxe-intro.is-turning .luxe-intro__crease,
  .luxe-intro.is-turning::after {
    animation: none;
  }
  @keyframes luxePageFadeOut {
    to { opacity: 0; }
  }
}

/* =========================================================================
   11. Responsive base
   ========================================================================= */

@media (max-width: 768px) {
  :root {
    --luxe-header-height: 60px;
    --luxe-offcanvas-width: 100vw;
  }

  .luxe-container {
    padding-left: var(--luxe-space-5);
    padding-right: var(--luxe-space-5);
  }
}

@media (max-width: 480px) {
  .luxe-container {
    padding-left: var(--luxe-space-4);
    padding-right: var(--luxe-space-4);
  }
}
