/* MER Parfums — soft launch
   Brand tokens: Brand assets/DESIGN.md (v1.1).
   Interface conventions taken from current luxury / niche perfume sites
   (Byredo, Frederic Malle, Maison Francis Kurkdjian, Diptyque, Aesop):
   full-bleed photography, a quiet header with a slide-out side menu,
   small tracked sans-serif for interface, serif only for display,
   underline-only form fields with an inline arrow, hairline dividers. */

:root {
  --ivory: #FDF9F3;
  --cream: #F3EBDD;
  --parchment: #EFE4D0;
  --travertine: #D8C4A4;
  --cocoa-soft: #8A6E57;
  --cocoa-deep: #6F5643;
  --walnut: #563429;
  --amber-glass: #4A2614;
  --espresso: #3A271D;
  --warm-black: #17110D;
  --gold-highlight: #E5AF47;
  --gold: #C69039;
  --gold-shadow: #A5712B;
  --champagne: #C8A96B;
  --error: #A3262A;
  --line: rgba(58, 39, 29, 0.16);
  --line-light: rgba(243, 235, 221, 0.18);

  --serif-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --names: "Bodoni Moda", Didot, serif;
  --sans: Inter, system-ui, sans-serif;

  --ease: cubic-bezier(.2, .6, .2, 1);
  --pad: clamp(24px, 5vw, 64px);
  --section: clamp(5rem, 11vw, 10rem);
  --bar: 36px;
  --head: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
::selection { background: var(--travertine); }

/* ---------- small interface type ---------- */
.ui {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.muted { color: var(--cocoa-deep); }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }

/* ---------- announcement bar ---------- */
.announce {
  position: relative; z-index: 51;
  height: var(--bar);
  display: flex; align-items: center; justify-content: center;
  background: var(--espresso); color: var(--cream);
  padding: 0 16px; text-align: center;
}
.announce a { border-bottom: 1px solid rgba(243, 235, 221, .4); padding-bottom: 1px; transition: border-color .3s var(--ease); }
.announce a:hover { border-color: var(--cream); }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--head);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--pad);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
}
.header.is-solid, .header--solid { background: rgba(243, 235, 221, .96); border-color: var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.header__left { justify-self: start; }
.header__right { justify-self: end; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
}
.menu-btn .bars { display: grid; gap: 6px; width: 22px; }
.menu-btn .bars i { display: block; height: 1px; background: currentColor; }
.header__cta { border-bottom: 1px solid var(--espresso); padding-bottom: 3px; }
@media (max-width: 640px) { .header__cta .long { display: none; } }
@media (min-width: 641px) { .header__cta .short { display: none; } }

/* Official master logo (logo/Mer logo variants/mer-parfums-logo-transparent.png),
   with the star rule removed at Rawan's request. */
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1; }
.logo img { display: block; height: 64px; width: auto; }
.footer .logo img { height: 96px; }
@media (max-width: 760px) { .logo img { height: 56px; } .footer .logo img { height: 84px; } }
.logo__mer { font-family: var(--serif-display); font-size: 22px; letter-spacing: 0.3em; padding-left: 0.3em; }
.logo__parfums { font-size: 7px; letter-spacing: 0.62em; padding-left: 0.62em; color: var(--gold-shadow); }
.logo--row { flex-direction: row; gap: 12px; }
.logo--row .logo__words { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* ---------- side menu ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(23, 17, 13, .38); opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 61;
  width: min(460px, 92vw);
  display: flex; flex-direction: column;
  padding: 28px clamp(24px, 4vw, 48px) 36px;
  background: var(--ivory);
  transform: translateX(-100%);
  transition: transform .7s var(--ease);
  overflow-y: auto;
}
.drawer__top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.drawer__close { display: inline-flex; align-items: center; gap: 12px; background: none; border: 0; cursor: pointer; min-height: 44px; padding: 0; }
.drawer__close svg { width: 14px; height: 14px; }
.drawer nav { margin-top: clamp(48px, 10vh, 112px); }
.drawer ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.drawer li { border-bottom: 1px solid var(--line); }
.drawer nav a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 22px 0;
  font-family: var(--serif-display);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  color: var(--espresso);
  transition: color .4s var(--ease), padding .5s var(--ease);
}
.drawer nav a:hover { color: var(--gold-shadow); padding-left: 6px; }
.drawer nav a .ui { color: var(--gold-shadow); white-space: nowrap; }
.drawer nav a[aria-current="page"] { color: var(--gold-shadow); }
.drawer__foot { margin-top: auto; padding-top: 48px; display: grid; gap: 20px; }
.drawer__foot .btn { width: 100%; }
body.menu-open { overflow: hidden; }
body.menu-open .drawer { transform: none; }
body.menu-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 50px; padding: 0 30px;
  border: 1px solid var(--espresso); border-radius: 0;
  background: var(--espresso); color: var(--cream);
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn:hover { background: var(--warm-black); border-color: var(--warm-black); }
.btn--line { background: transparent; color: var(--espresso); }
.btn--line:hover { background: var(--espresso); color: var(--cream); }
.btn--light { background: var(--cream); color: var(--espresso); border-color: var(--cream); }
.btn--light:hover { background: var(--ivory); border-color: var(--ivory); }
.link {
  display: inline-flex; align-items: center; gap: 10px;
  padding-bottom: 4px; border-bottom: 1px solid currentColor;
}
.arrow { display: inline-block; width: 18px; height: 10px; transition: transform .5s var(--ease); }
a:hover .arrow, button:hover .arrow { transform: translateX(4px); }

/* ---------- hero ---------- */
.hero { position: relative; margin-top: calc(var(--head) * -1); }
.hero__media {
  position: relative; overflow: hidden;
  height: calc(100dvh - var(--bar));
  min-height: 520px; max-height: 1000px;
  background: #cfc7bd;
}
.hero__media img {
  /* Keep the three bottles centred in the space below the header:
     crop mostly from the sand at the bottom, keep the wall above the caps. */
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1.6s var(--ease), transform 3s var(--ease);
}
.hero__media img.is-loaded { opacity: 1; transform: none; }
.hero__meta {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) {
  :root { --head: 72px; }
  .header { background: rgba(243, 235, 221, .96); border-color: var(--line); }
  body.dark .header { background: rgba(23, 17, 13, .92); border-color: var(--line-light); }
  .hero { margin-top: 0; }
  .hero__media { height: auto; min-height: 0; aspect-ratio: 1152 / 854; }
  .hero__meta { font-size: 10px; letter-spacing: .14em; }
  .hero__meta span:last-child { display: none; }
}

/* ---------- welcome + waiting list ---------- */
.welcome { padding-top: clamp(72px, 10vw, 136px); padding-bottom: var(--section); text-align: center; }
.welcome .ui.kicker { color: var(--gold-shadow); }
.welcome h1 {
  margin: 22px auto 0;
  max-width: 14ch;
  font-family: var(--serif-display);
  font-size: clamp(44px, 7vw, 104px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--amber-glass);
}
.welcome__sub { margin: 28px auto 0; max-width: 46ch; font-size: 16px; color: var(--cocoa-deep); }

.waitlist { width: 100%; max-width: 520px; margin: clamp(44px, 5vw, 64px) auto 0; text-align: left; }
.field { position: relative; display: flex; align-items: flex-end; border-bottom: 1px solid var(--espresso); transition: border-color .3s var(--ease); }
.field:focus-within { border-color: var(--gold-shadow); }
.field.is-invalid { border-color: var(--error); }
.field label { position: absolute; left: 0; top: 18px; color: var(--cocoa-deep); pointer-events: none; transition: transform .35s var(--ease), color .35s var(--ease); transform-origin: left top; }
.field input {
  flex: 1; min-width: 0;
  height: 60px; padding: 18px 0 6px;
  font-family: var(--sans); font-size: 16px; color: var(--espresso);
  background: transparent; border: 0; border-radius: 0; outline: none;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label { transform: translateY(-16px) scale(.86); color: var(--gold-shadow); }
.field button {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 0 0 20px;
  background: none; border: 0; cursor: pointer; color: var(--espresso); white-space: nowrap;
}
.field button:disabled { opacity: .5; cursor: default; }
.waitlist__msg { min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--cocoa-deep); }
.waitlist__msg.is-error { color: var(--error); }
.waitlist__fine { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--cocoa-soft); }
.waitlist__done { display: none; text-align: center; }
.waitlist.is-done form { display: none; }
.waitlist.is-done .waitlist__done { display: block; animation: rise .7s var(--ease) both; }
.waitlist__done p.serif { font-family: var(--serif-display); font-size: 30px; line-height: 1.2; color: var(--amber-glass); }
.waitlist__done p + p { margin-top: 10px; color: var(--cocoa-deep); }

/* ---------- section scaffolding ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.display {
  font-family: var(--serif-display);
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--amber-glass);
}
section[id] { scroll-margin-top: var(--head); }

/* ---------- brand story ---------- */
.story { padding-bottom: var(--section); }
.story__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px;
  padding-top: clamp(56px, 7vw, 112px);
  border-top: 1px solid var(--line);
}
.story__title { grid-column: 1 / span 5; }
.story__body { grid-column: 7 / span 6; }
.story__lead { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 25px); line-height: 1.55; color: var(--amber-glass); }
.story__text { margin-top: 36px; columns: 2; column-gap: 32px; }
.story__text p { break-inside: avoid; margin-bottom: 1.1em; color: var(--espresso); }
.story__close {
  grid-column: 1 / -1;
  margin-top: clamp(64px, 8vw, 120px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap;
}
.story__close p.serif { font-family: var(--serif-display); font-size: clamp(30px, 3.6vw, 52px); line-height: 1.1; color: var(--amber-glass); max-width: 22ch; }
.story__close .ui { color: var(--gold-shadow); }
@media (max-width: 1100px) { .story__text { columns: 1; } }
@media (max-width: 860px) {
  .story__grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .story__title, .story__body { grid-column: 1 / -1; }
  .story__body { margin-top: 32px; }
}

/* ---------- about (split) ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; background: var(--parchment); }
.about__media { position: relative; min-height: 640px; overflow: hidden; }
.about__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.about__text { padding: clamp(56px, 7vw, 120px) var(--pad); display: flex; flex-direction: column; justify-content: center; }
.about__text .display { margin-top: 20px; }
.about__text .lead { margin-top: 32px; font-family: var(--serif); font-size: clamp(19px, 1.6vw, 22px); line-height: 1.6; color: var(--amber-glass); max-width: 34ch; }
.about__text .lead em { font-style: italic; }
.about__text p.body { margin-top: 20px; max-width: 52ch; }
.about__meta { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 48px; flex-wrap: wrap; }
.about__meta dt { color: var(--cocoa-soft); }
.about__meta dd { margin: 6px 0 0; font-family: var(--serif-display); font-size: 22px; color: var(--amber-glass); }
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__media { min-height: 0; aspect-ratio: 4 / 4.4; }
}

/* ---------- olfactory pyramid ---------- */
.pyramid { padding-block: var(--section); text-align: center; }
.pyramid .ui.kicker { color: var(--gold-shadow); }
.pyramid h2 { margin-top: 18px; font-family: var(--names); font-size: clamp(26px, 3vw, 40px); letter-spacing: .12em; padding-left: .12em; text-transform: uppercase; color: var(--amber-glass); }
.pyramid__intro { margin: 16px auto 0; max-width: 52ch; color: var(--cocoa-deep); }
.tiers { list-style: none; margin: clamp(48px, 6vw, 80px) auto 0; padding: 0; max-width: 960px; display: grid; justify-items: center; }
.tiers li {
  width: 100%;
  padding: 26px 24px 28px;
  border-top: 1px solid var(--line);
}
.tiers li:nth-child(1) { width: 48%; }
.tiers li:nth-child(2) { width: 74%; }
.tiers li:nth-child(3) { border-bottom: 1px solid var(--line); }
.tiers .ui { color: var(--gold-shadow); }
.tiers .notes { margin-top: 10px; font-family: var(--serif); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--espresso); }
.tiers .role { margin-top: 8px; font-size: 13px; color: var(--cocoa-deep); }
@media (max-width: 760px) { .tiers li { width: 100% !important; } }

/* ---------- vision & mission ---------- */
.purpose { background: var(--espresso); color: var(--cream); }
.purpose__grid { display: grid; grid-template-columns: 1fr 1fr; }
.purpose__item { padding: clamp(56px, 7vw, 112px) var(--pad); }
.purpose__item + .purpose__item { border-left: 1px solid var(--line-light); }
.purpose .ui { color: var(--gold-highlight); }
.purpose p.statement { margin-top: 28px; font-family: var(--serif-display); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.3; max-width: 26ch; }
@media (max-width: 860px) {
  .purpose__grid { grid-template-columns: 1fr; }
  .purpose__item + .purpose__item { border-left: 0; border-top: 1px solid var(--line-light); }
}

/* ---------- gemstone teaser ---------- */
.gem { padding-block: clamp(72px, 9vw, 128px); text-align: center; border-bottom: 1px solid var(--line); }
.gem .ui.kicker { color: var(--gold-shadow); }
.gem h2 { margin-top: 18px; font-family: var(--names); font-size: clamp(30px, 4vw, 54px); letter-spacing: .12em; padding-left: .12em; text-transform: uppercase; color: var(--amber-glass); }
.gem p.status { margin-top: 14px; color: var(--cocoa-deep); }
.gem__cta { margin-top: 36px; display: flex; justify-content: center; gap: 28px; align-items: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.footer { background: var(--warm-black); color: var(--cream); padding: clamp(56px, 7vw, 96px) 0 28px; }
.footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer .logo__parfums { color: var(--gold-highlight); }
.footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.footer nav a { color: var(--travertine); transition: color .3s var(--ease); }
.footer nav a:hover { color: var(--cream); }
.footer__bottom { margin-top: clamp(48px, 6vw, 80px); padding-top: 20px; border-top: 1px solid var(--line-light); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--cocoa-soft); }

/* ---------- coming soon (dark) ---------- */
body.dark { background: var(--warm-black); color: var(--cream); }
body.dark .header { color: var(--cream); }
body.dark .header.is-solid { background: rgba(23, 17, 13, .92); border-color: var(--line-light); }
body.dark .header__cta { border-color: var(--cream); }
body.dark .logo__parfums { color: var(--gold-highlight); }
.soon {
  min-height: calc(100dvh - var(--bar) - var(--head));
  display: grid; place-items: center; text-align: center;
  padding: 64px var(--pad) 96px;
}
.soon .ui.kicker { color: var(--gold-highlight); }
.soon h1 { margin-top: 26px; font-family: var(--names); font-size: clamp(34px, 6vw, 80px); line-height: 1.1; letter-spacing: .12em; padding-left: .12em; text-transform: uppercase; }
.soon__rule { width: 1px; height: 64px; margin: 36px auto; background: var(--gold); }
.soon p.status { font-family: var(--serif-display); font-size: clamp(26px, 3vw, 40px); line-height: 1.2; color: var(--travertine); }
.soon p.sub { margin: 16px auto 0; max-width: 40ch; color: var(--travertine); opacity: .85; }
.soon__actions { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.countdown { display: flex; align-items: center; gap: 14px; color: var(--cocoa-soft); }
.countdown__bar { width: 120px; height: 1px; background: var(--line-light); position: relative; overflow: hidden; }
.countdown__bar i { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.countdown__bar.is-running i { transform: scaleX(1); transition: transform var(--count, 8s) linear; }
body.dark .drawer { color: var(--espresso); }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero__media img { opacity: 1 !important; transform: none !important; transition: none !important; }
  .drawer, .scrim { transition: none; }
  * { animation: none !important; }
}
