/* ==========================================================================
   Sophie Mireille — brand stylesheet
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost.woff2") format("woff2");
  font-weight: 300 500; font-style: normal; font-display: swap;
}

:root {
  /* Palette */
  --ivoire:      #F8F3EC;  /* page — warm ivory paper */
  --perle:       #FCFAF6;  /* surfaces — pearl white */
  --poudre:      #F1E4DC;  /* powder blush */
  --rose-ancien: #C9A59B;  /* antique rose */
  --or:          #B6925E;  /* champagne gold — ornament */
  --or-profond:  #8C6A3C;  /* deep gold — gold text on light */
  --or-pale:     #D9BC8C;  /* pale gold — gold on dark */
  --encre:       #2E2421;  /* ink — warm brown-black */
  --taupe:       #6E615A;  /* secondary text */
  --line:        rgba(46, 36, 33, .14);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans:  "Jost", "Futura", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivoire);
  color: var(--encre);
  font: 300 clamp(17px, 1.15vw + 10px, 20px)/1.65 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* a whisper of paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .14 0 0 0 0 .13 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--poudre); color: var(--encre); }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--perle); padding: 8px 14px; }

:focus-visible { outline: 1px solid var(--or-profond); outline-offset: 4px; }

/* ---------- small type ---------- */
.eyebrow, .label, .chapter__num, .topbar, .link-cta, .button, .field label, .interests legend, .interests span, .footer__line, .footer__links, .footer__legal, .hero__soon, .rituals li {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: .32em;
  text-transform: uppercase;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  height: 64px; padding: 0 var(--gutter);
  font-size: 10.5px; color: var(--taupe);
  transition: background .6s var(--ease), box-shadow .6s var(--ease);
}
.topbar.is-scrolled { background: rgba(248, 243, 236, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }

/* the signature that travels into the top bar (positioned by main.js) */
.brandmark { display: none; }
.js .brandmark {
  display: block; position: fixed; top: 0; left: 0; z-index: 55;
  color: var(--encre);
}
.brandmark:focus-visible { outline: 1px solid var(--or-profond); outline-offset: 6px; }
.js .hero__sig .sig { visibility: hidden; }
.topbar__lang { display: flex; gap: 10px; align-items: center; }
.topbar__lang button {
  all: unset; cursor: pointer; letter-spacing: .32em; padding: 6px 2px; color: var(--taupe);
  border-bottom: 1px solid transparent; transition: color .3s, border-color .3s;
}
.topbar__lang button[aria-pressed="true"] { color: var(--encre); border-bottom-color: var(--or); }
.topbar__lang button:focus-visible { outline: 1px solid var(--or-profond); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 120px var(--gutter) 110px; overflow: hidden;
}
.hero__glow {
  position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(42% 38% at 50% 46%, rgba(241, 228, 220, .95), transparent 70%),
    radial-gradient(30% 30% at 82% 18%, rgba(217, 188, 140, .16), transparent 70%),
    radial-gradient(35% 30% at 14% 86%, rgba(201, 165, 155, .14), transparent 70%);
}
.hero__inner { position: relative; width: 100%; max-width: 900px; }
.eyebrow { font-size: 11px; color: var(--or-profond); margin: 0 0 clamp(26px, 4vh, 44px); }
.hero__sig { margin: 0; color: var(--encre); }
.sig { width: 100%; height: auto; overflow: visible; }
.sig--hero { width: min(760px, 100%); margin-inline: auto; }

/* the signature writes itself, left to right */
.js .sig--write {
  -webkit-mask-image: linear-gradient(100deg, #000 45%, transparent 55%);
          mask-image: linear-gradient(100deg, #000 45%, transparent 55%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
  animation: write 3.4s .5s cubic-bezier(.45, .05, .35, 1) forwards;
}
@keyframes write { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }

.rule { display: block; width: 1px; height: 44px; margin: clamp(22px, 4vh, 40px) auto 20px; background: linear-gradient(var(--or), transparent); }
.hero__soon { font-size: 11px; color: var(--or-profond); margin: 0 0 14px; letter-spacing: .5em; }

/* countdown to the opening */
.countdown { display: none; justify-content: center; align-items: flex-start; gap: clamp(14px, 3vw, 34px); margin: 4px 0 30px; }
.js .countdown { display: flex; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 3.2ch; }
.countdown__n {
  font: 300 clamp(38px, 2.4vw + 22px, 58px)/1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums; color: var(--encre);
}
.countdown__l { font: 300 9.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--taupe); margin-top: 12px; padding-left: .3em; }
.countdown i { width: 4px; height: 4px; border-radius: 50%; background: var(--or); margin-top: clamp(18px, 1.2vw + 10px, 28px); opacity: .8; }
.countdown.is-open { display: none; }
.hero__lede { font-style: italic; font-size: clamp(20px, 1.6vw + 12px, 28px); line-height: 1.45; margin: 0 0 36px; color: var(--encre); }
.js .hero .eyebrow, .js .hero .rule, .js .hero__soon, .js .countdown, .js .hero__lede, .js .hero .link-cta {
  opacity: 0; transform: translateY(10px);
  animation: rise 1.4s var(--ease) forwards;
}
.js .hero .eyebrow { animation-delay: .2s; }
.js .hero .rule { animation-delay: 3.0s; }
.js .hero__soon { animation-delay: 3.3s; }
.js .countdown { animation-delay: 3.45s; }
.js .hero__lede { animation-delay: 3.65s; }
.js .hero .link-cta { animation-delay: 3.9s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.link-cta {
  display: inline-block; font-size: 11px; text-decoration: none; color: var(--encre);
  padding: 4px 0 10px; position: relative;
}
.link-cta::after {
  content: ""; position: absolute; left: 0; right: .32em; bottom: 0; height: 1px; background: var(--or);
  transform-origin: left; transition: transform .6s var(--ease);
}
.link-cta:hover::after { transform: scaleX(.35); }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 1px; height: 48px; overflow: hidden; }
.scroll-cue span { position: absolute; inset: 0; background: linear-gradient(transparent, var(--or), transparent); animation: cue 2.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* ---------- the pearl ---------- */
.pearl {
  display: block; border-radius: 50%; position: relative;
  background:
    radial-gradient(circle at 32% 28%, #fff 0 6%, rgba(255,255,255,.85) 11%, rgba(255,255,255,0) 30%),
    radial-gradient(circle at 70% 78%, rgba(214, 196, 220, .55), transparent 45%),
    radial-gradient(circle at 25% 75%, rgba(231, 205, 190, .6), transparent 50%),
    radial-gradient(circle at 50% 50%, #f7f1ea 0%, #ece2d9 52%, #d8c8bd 78%, #b9a79c 100%);
  box-shadow:
    inset -6px -8px 18px rgba(120, 96, 84, .22),
    inset 4px 5px 12px rgba(255, 255, 255, .7),
    0 18px 30px -12px rgba(46, 36, 33, .28);
}
.pearl::after { /* faint orient / iridescence */
  content: ""; position: absolute; inset: 0; border-radius: 50%; mix-blend-mode: soft-light; opacity: .55;
  background: conic-gradient(from 200deg, rgba(255,214,222,.0), rgba(255,214,222,.8), rgba(212,232,236,.7), rgba(236,226,255,.7), rgba(255,214,222,0));
}

.pendant {
  position: absolute; top: 0; right: clamp(24px, 13vw, 220px);
  display: flex; flex-direction: column; align-items: center;
  transform-origin: top center; animation: sway 7s ease-in-out infinite alternate;
}
.pendant__chain {
  width: 6px; height: clamp(120px, 30vh, 300px);
  background:
    repeating-linear-gradient(180deg, transparent 0 1px, var(--or) 1px 2.2px, transparent 2.2px 6px) center / 1.3px 100% no-repeat,
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(140, 106, 60, .9) 3px 4px, transparent 4px 6px) center / 4px 100% no-repeat;
}
.pendant__bail { width: 9px; height: 12px; margin-top: -1px; border: 1.2px solid var(--or); border-radius: 50% 50% 45% 45%; }
.pearl--pendant { width: clamp(30px, 3.2vw, 46px); height: clamp(30px, 3.2vw, 46px); margin-top: -2px; }
@keyframes sway { from { transform: rotate(1.6deg); } to { transform: rotate(-1.6deg); } }

/* ---------- sections ---------- */
section { position: relative; }
.maison, .collection, .cercle { padding: clamp(96px, 15vh, 180px) var(--gutter); text-align: center; }
.numeral { font: italic 300 15px/1 var(--serif); color: var(--or-profond); margin-bottom: 14px; letter-spacing: .1em; }
.numeral--light { color: var(--or-pale); }
.label { font-size: 11px; margin: 0 0 clamp(40px, 6vh, 64px); color: var(--taupe); }
.label--light { color: rgba(248, 243, 236, .66); }
.section-lede { font-style: italic; color: var(--taupe); max-width: 34ch; margin: -24px auto 64px; font-size: clamp(19px, 1vw + 13px, 23px); }

.letter { max-width: 740px; margin: 0 auto; }
.letter__lead { font-size: clamp(26px, 2.4vw + 12px, 42px); line-height: 1.3; font-weight: 300; margin: 0 0 32px; letter-spacing: -.005em; }
.letter p:not(.letter__lead) { color: var(--taupe); max-width: 56ch; margin: 0 auto 44px; }
.sig--small { width: 220px; margin: 0 auto; color: var(--encre); }

/* collection */
.collection { background: linear-gradient(var(--ivoire), var(--perle) 30%, var(--perle) 70%, var(--ivoire)); }
.chapters { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); }
.chapter__art {
  aspect-ratio: 4 / 5; display: grid; place-items: center; margin-bottom: 28px;
  background: radial-gradient(70% 60% at 50% 45%, var(--perle), var(--poudre));
  position: relative; overflow: hidden;
}
.chapter__art::before { /* fine inset frame */
  content: ""; position: absolute; inset: 12px; border: 1px solid rgba(182, 146, 94, .35); pointer-events: none;
}
.chapter__art svg { width: 70%; }
.pearl--hero { width: 34%; aspect-ratio: 1; }
.chapter__num { font-size: 10px; color: var(--or-profond); margin: 0 0 10px; }
.chapter__title { font: italic 300 clamp(30px, 2vw + 16px, 40px)/1.1 var(--serif); margin: 0 0 12px; }
.chapter__text { color: var(--taupe); max-width: 30ch; margin: 0 auto; font-size: .95em; }

.chapter__art svg .drape { animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { stroke-dashoffset: -54; } }

/* écrin */
.ecrin { background: var(--encre); color: var(--ivoire); padding: clamp(96px, 16vh, 180px) var(--gutter); text-align: center; overflow: hidden; }
.ecrin::before { /* silk ribbon light */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 0%, rgba(217, 188, 140, .12), transparent 70%), radial-gradient(40% 40% at 90% 100%, rgba(201, 165, 155, .1), transparent 70%);
}
.ecrin__inner { position: relative; max-width: 980px; margin: 0 auto; }
.ecrin__quote { font: italic 300 clamp(30px, 3vw + 14px, 54px)/1.2 var(--serif); margin: 0 0 64px; }
.rituals { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(217, 188, 140, .25); }
.rituals li { font-size: 10.5px; line-height: 1.9; color: rgba(248, 243, 236, .78); padding: 30px 14px 0; position: relative; }
.rituals li::before { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--or-pale); margin: 0 auto 18px; }

/* cercle privé */
.cercle__title { font: italic 300 clamp(36px, 3.4vw + 16px, 64px)/1.1 var(--serif); margin: 0 0 40px; }
.invite { max-width: 560px; margin: 0 auto; text-align: left; }
.field { margin-bottom: 30px; }
.field label { display: block; font-size: 10px; color: var(--taupe); margin-bottom: 4px; }
.field input {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0;
  font: 400 21px/1.6 var(--serif); color: var(--encre); padding: 8px 0 10px; outline: none;
  transition: border-color .4s var(--ease);
}
.field input:focus { border-bottom-color: var(--or); }
.field input[aria-invalid="true"] { border-bottom-color: #A2574A; }

.interests { border: 0; padding: 0; margin: 8px 0 40px; display: flex; flex-wrap: wrap; gap: 10px; }
.interests legend { font-size: 10px; color: var(--taupe); margin-bottom: 14px; padding: 0; }
.interests label { cursor: pointer; }
.interests input { position: absolute; opacity: 0; pointer-events: none; }
.interests span {
  display: inline-block; font-size: 10px; padding: 11px 16px 10px 19px; border: 1px solid var(--line); color: var(--taupe);
  transition: all .35s var(--ease);
}
.interests label:hover span { border-color: var(--or); color: var(--encre); }
.interests input:checked + span { background: var(--encre); border-color: var(--encre); color: var(--ivoire); }
.interests input:focus-visible + span { outline: 1px solid var(--or-profond); outline-offset: 3px; }

.hp { position: absolute; left: -9999px; }

.button {
  all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; text-align: center;
  font-size: 11px; padding: 21px 24px 20px; background: var(--encre); color: var(--ivoire);
  position: relative; overflow: hidden; transition: background .5s var(--ease);
}
.button::after { /* a slow gleam */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(217, 188, 140, .35) 50%, transparent 70%);
  transition: transform 1.1s var(--ease);
}
.button:hover::after, .button:focus-visible::after { transform: translateX(120%); }
.button:focus-visible { outline: 1px solid var(--or-profond); outline-offset: 4px; }
.button[disabled] { opacity: .6; cursor: progress; }
.invite__note { font-style: italic; color: var(--taupe); font-size: 16px; text-align: center; margin: 22px 0 0; }
.invite__status { min-height: 1.6em; text-align: center; color: #A2574A; font-size: 17px; margin: 10px 0 0; }

.merci { max-width: 520px; margin: 0 auto; }
.merci__word { font: italic 300 clamp(64px, 6vw + 30px, 110px)/1 var(--serif); margin: 0 0 18px; color: var(--encre); }
.merci p:not(.merci__word) { color: var(--taupe); font-style: italic; }
.merci:not([hidden]) { animation: rise 1.4s var(--ease) both; }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 80px var(--gutter) 56px; border-top: 1px solid var(--line); }
.sig--footer { width: 180px; margin: 0 auto 22px; color: var(--encre); }
.footer__line { font-size: 10px; color: var(--or-profond); margin: 0 0 26px; }
.footer__links { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; font-size: 10px; }
.footer__links a { text-decoration: none; color: var(--taupe); transition: color .3s; overflow-wrap: anywhere; }
.footer__links a:hover { color: var(--encre); }
.footer__legal { font-size: 9.5px; color: var(--taupe); opacity: .8; margin: 0; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .chapters .reveal:nth-child(2) { transition-delay: .15s; }
.js .chapters .reveal:nth-child(3) { transition-delay: .3s; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .chapters { grid-template-columns: 1fr; max-width: 420px; gap: 72px; }
  .rituals { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
}
@media (max-width: 560px) {
  .countdown { gap: 20px; }
  .countdown__l { font-size: 8.5px; letter-spacing: .2em; }
  .pendant { right: 112px; }
  .pendant__chain { height: 92px; }
  .rituals { grid-template-columns: 1fr; }
  .rituals li { padding-top: 22px; }
  .interests span { padding: 10px 12px 9px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .sig--write { -webkit-mask: none; mask: none; }
  .js .reveal, .js .hero * { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
