/* ————————————————————————————————————————————
   MAISON VÉTIVER — design system
   Ivory blotter sheets laid over living perfume oil.
   Type: Italiana (display) · Cormorant Garamond (text) · Cormorant SC (labels)
   ———————————————————————————————————————————— */

@property --accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #5a5a28;
}
@property --accent-bright {
  syntax: '<color>';
  inherits: true;
  initial-value: #c9bc7e;
}

:root {
  --ivory: #f3eee1;
  --ivory-dim: #e7e0cd;
  --ink: #211d0f;
  --ink-soft: #4d4732;
  --accent: #5a5a28;         /* on ivory */
  --accent-bright: #c9bc7e;  /* on liquid */
  --deep: #141507;
  --sheet-w: min(1160px, 100% - clamp(28px, 6vw, 96px));
  --label-track: 0.34em;
  transition: --accent 1.1s ease, --accent-bright 1.1s ease;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--ivory);
  background: var(--deep);
  overflow-x: hidden;
}

/* liquid canvas + grain */
#liquid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
body.no-liquid #liquid { display: none; }
body.no-liquid {
  background:
    radial-gradient(120% 90% at 15% 10%, #6e6a33 0%, transparent 55%),
    radial-gradient(110% 100% at 85% 85%, #3a3d1c 0%, transparent 60%),
    #141507;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.07;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.page { position: relative; z-index: 1; }

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 4px;
}
.sheet :focus-visible { outline-color: var(--accent); }

::selection { background: var(--accent); color: var(--ivory); }

/* ————— type ————— */
.display {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 0.95;
}
.label {
  font-family: 'Cormorant SC', 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: var(--label-track);
  text-transform: lowercase; /* Cormorant SC renders lowercase as small caps */
}
.label--dim { opacity: 0.62; }

/* ————— header ————— */
.site-head {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(18px, 3vw, 34px) clamp(20px, 4vw, 56px);
}
.monogram {
  font-family: 'Italiana', serif;
  font-size: 1.7rem;
  text-decoration: none;
  border: 1px solid rgba(243, 238, 225, 0.45);
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
}
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.4rem); }
.site-nav a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}
.site-nav a:hover { opacity: 1; }

/* ————— hero ————— */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(90px, 14vh, 140px) clamp(20px, 5vw, 60px) clamp(28px, 5vh, 48px);
  position: relative;
}
.hero .label { margin-bottom: clamp(1.4rem, 3.5vh, 2.6rem); }
.hero-title {
  font-size: clamp(3.4rem, 15.5vw, 13.5rem);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 60px rgba(10, 10, 2, 0.35);
}
.hero-title .lt {
  display: inline-block;
  animation: rise 1.1s cubic-bezier(0.19, 1, 0.22, 1) both;
  animation-delay: calc(var(--i) * 70ms + 150ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.hero-rule {
  width: clamp(90px, 12vw, 170px);
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(243, 238, 225, 0.75), transparent);
  margin: clamp(1.5rem, 3.5vh, 2.6rem) auto;
}
.hero-lede {
  max-width: 34em;
  font-size: clamp(1.15rem, 1.7vw, 1.42rem);
  font-style: italic;
  text-wrap: balance;
  text-shadow: 0 1px 30px rgba(10, 10, 2, 0.5);
}
.hero-fade { animation: fadeup 1.2s ease 0.9s both; }
@keyframes fadeup {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.scroll-cue {
  position: absolute;
  bottom: clamp(20px, 4vh, 40px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.scroll-cue::after {
  content: '';
  width: 1px; height: 44px;
  background: linear-gradient(rgba(243,238,225,0.8), transparent);
  animation: drip 2.6s ease-in-out infinite;
}
@keyframes drip {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .lt, .hero-fade { animation: none; }
  .scroll-cue::after { animation: none; }
}

/* ————— sheets (ivory panels over the oil) ————— */
.sheet {
  width: var(--sheet-w);
  margin: clamp(56px, 9vh, 110px) auto;
  background: var(--ivory);
  color: var(--ink);
  padding: clamp(44px, 6vw, 92px) clamp(24px, 6vw, 96px);
  box-shadow: 0 30px 80px rgba(8, 8, 0, 0.45);
  position: relative;
}
.sheet::before, .sheet::after {
  content: '';
  position: absolute;
  left: clamp(14px, 2vw, 26px);
  right: clamp(14px, 2vw, 26px);
  height: 1px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}
.sheet::before { top: clamp(10px, 1.5vw, 18px); }
.sheet::after { bottom: clamp(10px, 1.5vw, 18px); }

.sheet .label { color: var(--accent); }
.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3.4rem);
}

/* ————— manifesto ————— */
.manifesto-line {
  font-size: clamp(2rem, 4.6vw, 3.9rem);
  line-height: 1.08;
  max-width: 17em;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  text-wrap: balance;
}
.manifesto-line em { font-style: italic; color: var(--accent); }
.manifesto-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  max-width: 62em;
  color: var(--ink-soft);
}
.manifesto-cols p + p { margin-top: 1em; }
.dropcap::first-letter {
  font-family: 'Italiana', serif;
  font-size: 3.1em;
  float: left;
  line-height: 0.8;
  padding: 0.08em 0.12em 0 0;
  color: var(--accent);
}

/* ————— collection (on the oil) ————— */
.collection {
  width: var(--sheet-w);
  margin: clamp(56px, 9vh, 110px) auto;
}
.collection-head { text-align: center; margin-bottom: clamp(2rem, 4vh, 3rem); }
.collection-head .label { display: block; margin-bottom: 1rem; color: var(--accent-bright); }
.collection-head h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); }

.scent-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(243, 238, 225, 0.35);
  border-bottom: 1px solid rgba(243, 238, 225, 0.35);
  margin-bottom: clamp(2rem, 5vh, 3.4rem);
}
.scent-tab {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ivory);
  font: inherit;
  padding: clamp(1rem, 2.4vw, 1.6rem) 0.5rem clamp(1.1rem, 2.6vw, 1.7rem);
  cursor: pointer;
  opacity: 0.62;
  position: relative;
  transition: opacity 0.4s ease;
}
.scent-tab .label { display: block; margin-bottom: 0.45rem; }
.scent-tab .display { font-size: clamp(1.3rem, 3.4vw, 2.5rem); letter-spacing: 0.06em; }
.scent-tab::after {
  content: '';
  position: absolute;
  left: 20%; right: 20%; bottom: -1px;
  height: 2px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.scent-tab .display { transition: transform 0.2s ease; }
.scent-tab:active .display { transform: translateY(2px); }
.scent-tab[aria-selected="true"] { opacity: 1; }
.scent-tab[aria-selected="true"]::after { transform: scaleX(1); }
.scent-tab:hover { opacity: 0.9; }
.scent-tab[aria-selected="true"]:hover { opacity: 1; }

.scent-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  background: rgba(14, 13, 4, 0.38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(243, 238, 225, 0.16);
  padding: clamp(28px, 5vw, 72px);
  overflow: hidden;
}
.scent-copy .label { color: var(--accent-bright); }
.scent-motto {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.12;
  font-style: italic;
  margin: 0.9rem 0 1.3rem;
  text-wrap: balance;
}
.scent-desc { max-width: 33em; opacity: 0.92; }
.scent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.8rem 0;
}
.chip {
  border: 1px solid rgba(243, 238, 225, 0.4);
  padding: 0.42rem 0.9rem 0.34rem;
  white-space: nowrap;
}
.scent-buy {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.price { font-size: 1.9rem; font-style: italic; }
.btn {
  font-family: 'Cormorant SC', serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: var(--label-track);
  text-transform: lowercase;
  text-decoration: none;
  color: var(--deep);
  background: var(--ivory);
  border: 1px solid var(--ivory);
  padding: 0.95rem 2rem 0.8rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  display: inline-block;
}
.btn:hover { background: transparent; color: var(--ivory); }
.btn--ghost { background: transparent; color: var(--ivory); }
.btn--ghost:hover { background: var(--ivory); color: var(--deep); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.btn--ink:hover { background: transparent; color: var(--ink); }

.scent-figure { display: grid; place-items: center; position: relative; }
.figure-no {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-104%, -54%);
  font-size: clamp(16rem, 26vw, 24rem);
  line-height: 1;
  color: var(--accent-bright);
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
  transition: color 1.1s ease, opacity 0.45s ease;
}
.figure-no.is-out { opacity: 0; }
.bottle { width: clamp(120px, 16vw, 180px); height: auto; filter: drop-shadow(0 24px 40px rgba(5, 5, 0, 0.5)); position: relative; z-index: 1; }
.bottle .liquid-fill stop { transition: stop-color 1.1s ease; }

/* crossfade between scent texts */
.scent-swap { transition: opacity 0.45s ease, transform 0.45s ease; }
.scent-swap.is-out { opacity: 0; transform: translateY(8px); }
.figure-no.scent-swap.is-out { transform: translate(-104%, -54%); }
@media (prefers-reduced-motion: reduce) {
  .scent-swap { transition: opacity 0.45s ease; }
  .scent-swap.is-out { transform: none; }
}

/* ————— pyramid ————— */
.pyramid-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.stratum {
  appearance: none;
  border: 0;
  font: inherit;
  color: var(--ivory);
  background: var(--accent);
  cursor: pointer;
  padding: 1.1rem 1rem 1rem;
  text-align: center;
  transition: filter 0.35s ease, width 0.5s cubic-bezier(0.19, 1, 0.22, 1), background-color 1.1s ease;
  position: relative;
}
.stratum .label { color: var(--ivory); }
.stratum small {
  display: block;
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.85;
  margin-top: 0.2rem;
}
.stratum--tete { width: 56%; clip-path: polygon(19.6% 0, 80.4% 0, 100% 100%, 0 100%); }
.stratum--coeur { width: 78%; clip-path: polygon(14.1% 0, 85.9% 0, 100% 100%, 0 100%); }
.stratum--fond { width: 100%; clip-path: polygon(11% 0, 89% 0, 100% 100%, 0 100%); }
.stratum--tete { filter: brightness(1.28); }
.stratum--coeur { filter: brightness(1.08); }
.stratum--fond { filter: brightness(0.86); }
.stratum:hover, .stratum[aria-expanded="true"] { filter: brightness(1.45); }
.pyramid-base-line {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-top: 0.7rem;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1rem;
}

.pyramid-notes { min-height: 15rem; }
.note-block { display: none; }
.note-block.is-open { display: block; animation: fadeup 0.5s ease both; }
@media (prefers-reduced-motion: reduce) {
  .note-block.is-open { animation: none; }
}
.note-block .label { display: block; margin-bottom: 0.4rem; }
.note-when { font-style: italic; color: var(--ink-soft); margin-bottom: 1.1rem; }
.note-list { list-style: none; }
.note-list li {
  padding: 0.55rem 0 0.45rem;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.note-list li span:last-child { font-style: italic; color: var(--ink-soft); white-space: nowrap; }
.pyramid-foot { margin-top: 1.6rem; font-size: 1rem; font-style: italic; color: var(--ink-soft); max-width: 30em; }

/* ————— method ledger ————— */
.ledger { border-top: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.ledger-row {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;
  gap: 1rem 2.5rem;
  align-items: baseline;
  padding: clamp(1.2rem, 2.6vw, 1.9rem) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.ledger-num {
  font-family: 'Italiana', serif;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;
}
.ledger-num small {
  font-family: 'Cormorant SC', serif;
  font-size: 0.4em;
  letter-spacing: 0.22em;
  margin-left: 0.4em;
}
.ledger-row h3 { font-size: 1.35rem; font-weight: 500; margin-bottom: 0.25rem; }
.ledger-row p { color: var(--ink-soft); max-width: 46em; }

/* ————— coffret ————— */
.coffret { text-align: center; }
.coffret .label { color: var(--accent-bright); display: block; margin-bottom: 1rem; }
.coffret h2 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); margin-bottom: 0.8rem; }
.coffret-sub { font-style: italic; opacity: 0.9; max-width: 36em; margin: 0 auto; }
.coffret-bottles {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(1.4rem, 5vw, 4.5rem);
  margin: clamp(2.4rem, 5vh, 4rem) 0;
}
.coffret-bottle {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ivory);
  font: inherit;
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.coffret-bottle:hover { transform: translateY(-8px); }
@media (prefers-reduced-motion: reduce) {
  .coffret-bottle, .coffret-bottle:hover { transition: none; transform: none; }
}
.coffret-bottle .bottle { width: clamp(84px, 10vw, 120px); }
.coffret-bottle .label { display: block; margin-top: 1rem; }
.coffret-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.coffret-note { margin-top: 1.4rem; font-size: 1rem; font-style: italic; opacity: 0.75; }

/* ————— footer ————— */
.site-foot {
  width: var(--sheet-w);
  margin: 0 auto;
  padding: clamp(40px, 7vh, 70px) 0 clamp(28px, 4vh, 44px);
  border-top: 1px solid rgba(243, 238, 225, 0.28);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem 2rem;
  align-items: center;
}
.site-foot .monogram { justify-self: center; }
.foot-left { font-style: italic; opacity: 0.85; font-size: 1.05rem; }
.foot-right { justify-self: end; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.foot-right a { text-decoration: none; opacity: 0.85; }
.foot-right a:hover { opacity: 1; }
.foot-legal {
  width: var(--sheet-w);
  margin: 0 auto;
  padding-bottom: clamp(24px, 4vh, 40px);
  text-align: center;
  opacity: 0.55;
  font-size: 0.95rem;
  font-style: italic;
}

/* ————— guide page ————— */
.guide-hero {
  min-height: 46svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: var(--sheet-w);
  margin: 0 auto;
  padding: clamp(120px, 18vh, 180px) 0 clamp(30px, 5vh, 50px);
}
.guide-hero h1 { font-size: clamp(2.6rem, 8vw, 6.4rem); margin-top: 1rem; }
.guide-hero .label { color: var(--accent-bright); }

.swatch-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 1.6vw, 1.2rem);
  margin: 1.2rem 0 2rem;
}
.swatch {
  aspect-ratio: 5 / 4;
  display: flex;
  align-items: flex-end;
  padding: 0.6rem 0.7rem;
  color: var(--ivory);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.swatch--light { color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.swatch-title { margin-top: 1.6rem; }

pre {
  background: var(--ink);
  color: #d8d2b8;
  font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  margin: 1.2rem 0 1.8rem;
}
code { font-family: inherit; }
p code, li code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.82em;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 0.1em 0.35em;
}

.guide-section h2 {
  font-family: 'Italiana', serif;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin: 0 0 1.2rem;
}
.guide-section h3 { font-size: 1.3rem; margin: 1.6rem 0 0.5rem; font-weight: 600; }
.guide-section p, .guide-section li { color: var(--ink-soft); max-width: 62em; }
.guide-section p + p { margin-top: 0.8em; }
.guide-section ol, .guide-section ul { padding-left: 1.4em; margin: 0.8em 0; }
.guide-section li + li { margin-top: 0.55em; }
.guide-section li strong { color: var(--ink); font-weight: 600; }

.pass-list { list-style: none; padding: 0; counter-reset: pass; }
.pass-list li {
  counter-increment: pass;
  padding: 1.2rem 0 1.2rem 4.4rem;
  position: relative;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  margin: 0 !important;
}
.pass-list li::before {
  content: counter(pass, upper-roman);
  position: absolute;
  left: 0; top: 1rem;
  font-family: 'Italiana', serif;
  font-size: 2.2rem;
  color: var(--accent);
}

/* ————— responsive ————— */
@media (max-width: 900px) {
  .scent-panel { grid-template-columns: 1fr; }
  .scent-figure { order: -1; }
  .scent-figure .bottle { width: clamp(110px, 24vw, 150px); }
  .pyramid-wrap { grid-template-columns: 1fr; }
  .manifesto-cols { grid-template-columns: 1fr; }
  .site-foot { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot-right { justify-self: center; justify-content: center; }
}
@media (max-width: 620px) {
  body { font-size: 1.12rem; }
  .site-nav { display: none; }
  .scent-tab .label { display: none; }
  .scent-tab .display { font-size: 1.5rem; }
  .pyramid-notes { min-height: 0; }
  .ledger-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .swatch-row { grid-template-columns: repeat(2, 1fr); }
  .coffret-bottles { gap: 1rem; }
  .scent-buy { gap: 1rem; }
  .hero-title { letter-spacing: 0.02em; }
}
