/* =============================================================
   ATHAR — Global Styles
   Following the design laws. No deviations.
   ============================================================= */

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

:root {
  /* ===========================================================
     PARCHMENT THEME — deeper, more saturated cream with
     stronger ink contrast. The previous palette read too pale.
     =========================================================== */
  /* Surface */
  --bg:            #E4D4B0;   /* warm parchment — deeper than the prior cream */
  --bg-ink:        #13100A;   /* near-black for inverted text on gold-filled buttons */

  /* Dark accent surfaces — visual rhythm between editorial sections */
  --bg-dark:       #1B1410;   /* deep espresso — used for pull-quote, press, letter blocks */
  --bg-burgundy:   #4A1A1A;   /* oxblood — gift-sets feature surface */
  --bg-sage:       #2F3A2D;   /* deep moss — alternative accent (Atelier optional) */

  /* Brand */
  --gold:          #A8862E;   /* saturated antique gold — stronger contrast on parchment */
  --gold-bright:   #C9A84C;   /* lifted gold for dark surfaces */
  --gold-on-dark:  #D4B25C;   /* warmer gold against deep espresso/burgundy */
  --gold-soft:     #6E5417;
  /* Type (semantic names retained) */
  --cream:         #13100A;   /* primary text on parchment — almost black, warm */
  --cream-light:   #F2E6CB;   /* primary text on dark surfaces */
  --muted:         #4A3F2D;   /* secondary text on parchment */
  --muted-on-dark: #B8A98A;   /* secondary text on dark surfaces */
  --muted-dim:     #877959;
  /* Hairline / divider colors */
  --line:          #B19972;
  --line-dark:     #3A2E22;   /* divider on dark surfaces */
  /* Fonts */
  --serif:         'Cormorant Garamond', 'EB Garamond', Garamond, serif;
  --arabic:        'Tajawal', 'Noto Sans Arabic', sans-serif;
  /* Motion */
  --ease:          cubic-bezier(0.25, 0.0, 0.0, 1.0);
  --dur:           400ms;
  --dur-slow:      2500ms;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--cream);
  margin: 0;
  padding: 0;
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  min-height: 100vh;
}

::selection { background: rgba(168,134,46,0.30); color: var(--cream); }

input, textarea {
  background: transparent;
  color: var(--cream);
  outline: none;
  border: none;
  border-bottom: 1px solid var(--line);
  font-family: inherit;
  font-size: 20px;
  width: 100%;
  padding: 16px 0;
  border-radius: 0;
  transition: border-bottom-color var(--dur) var(--ease);
}
input:focus, textarea:focus { border-bottom-color: var(--gold); }
input::placeholder, textarea::placeholder {
  color: var(--muted-dim);
  font-style: italic;
}
textarea { resize: none; line-height: 1.6; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* =============================================================
   Buttons — canonical
   ============================================================= */
.btn {
  display: inline-block;
  padding: 18px 44px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease);
  text-align: center;
  line-height: 1;
}
.btn:hover { background: var(--gold); color: var(--bg-ink); }
.btn--full { display: block; width: 100%; }

/* =============================================================
   Rule (1px gold divider) — only permitted decoration
   ============================================================= */
.rule {
  display: block;
  height: 0;
  border: 0;
  border-top: 1px solid var(--gold);
  width: 60px;
  margin: 32px auto;
}
.rule--wide { width: 80px; }
.rule--full { width: 100%; }

/* =============================================================
   Eyebrow / labels
   ============================================================= */
.eyebrow {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* =============================================================
   Page container — always visible.
   (Tried CSS entry fade via @keyframes and @starting-style;
   both frozen-at-0 in static capture contexts. The key={pageKey}
   remount gives a fresh paint on route change without the risk.)
   ============================================================= */
.page {
  opacity: 1;
  min-height: 100vh;
}

/* =============================================================
   Shared nav (pages 1–5 only)
   ============================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(24px, 4vw, 64px);
  background: transparent;
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.nav__back {
  justify-self: start;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  font-family: var(--serif);
  transition: color var(--dur) var(--ease);
}
.nav__back:hover { color: var(--gold); }
.nav__brand {
  justify-self: center;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1;
}
.nav__spacer { justify-self: end; }
.has-nav { padding-top: 72px; }

/* =============================================================
   PAGE 1 — Landing
   ============================================================= */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 80px 24px;
}
.landing__brand-ar {
  font-family: var(--serif);
  font-size: clamp(72px, 10vw, 96px);
  color: var(--gold);
  letter-spacing: -0.02em;
  font-weight: 400;
  line-height: 1;
  margin: 0;
}
.landing__brand-en {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--muted);
  margin-top: 24px;
  text-transform: uppercase;
  font-weight: 500;
}
.landing__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--cream);
  font-weight: 400;
  text-align: center;
  max-width: 480px;
  line-height: 1.5;
}
.landing__cta { margin-top: 48px; }
.landing__scroll {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-dim);
  font-weight: 500;
}

/* =============================================================
   Editorial sections (Landing below the fold, About, Process)
   ============================================================= */
.section {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 4vw, 64px);
  max-width: 1280px;
  margin: 0 auto;
}
.section--narrow { max-width: 760px; }
.section--bordered { border-top: 1px solid var(--line); }
.section__eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  font-family: var(--serif);
  text-align: center;
  display: block;
}
.section__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(32px, 4.5vw, 52px);
  color: var(--cream);
  text-align: center;
  font-weight: 400;
  line-height: 1.15;
  margin-top: 24px;
  text-wrap: balance;
}
.section__lede {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
  color: var(--cream);
  text-align: center;
  margin: 40px auto 0;
  max-width: 56ch;
  text-wrap: pretty;
}
.section__body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
  text-align: center;
  margin: 24px auto 0;
  max-width: 52ch;
  text-wrap: pretty;
}
.section__cta { display: flex; justify-content: center; margin-top: 56px; }

/* How it works — three numbered steps */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 80px;
}
@media (max-width: 760px) {
  .process { grid-template-columns: 1fr; }
}
.process__step {
  background: var(--bg);
  padding: 56px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.process__num {
  font-family: var(--serif);
  font-size: 56px;
  color: var(--gold);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.process__title {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
  font-weight: 500;
}
.process__body {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 28ch;
  text-wrap: pretty;
}

/* The Six — horizontal preview row on Landing */
.collection {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  margin-top: 64px;
  align-items: end;
}
@media (max-width: 1000px) { .collection { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .collection { grid-template-columns: repeat(2, 1fr); } }
.collection__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 16px 8px;
  transition: filter var(--dur) var(--ease);
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.collection__item:hover { filter: brightness(1.08); }
.collection__item svg { height: 180px; width: auto; max-width: 100%; }
.collection__ar {
  font-family: var(--arabic);
  font-size: 18px;
  color: var(--cream);
  margin-top: 4px;
  direction: rtl;
}
.collection__mood {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
  font-family: var(--serif);
}

/* =============================================================
   PAGE 2 — Select grid
   ============================================================= */
.select-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) clamp(24px, 4vw, 64px) 120px;
}
.select-wrap__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(36px, 5vw, 48px);
  color: var(--cream);
  text-align: center;
  font-weight: 400;
  line-height: 1.15;
}
.select-wrap__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
  margin-bottom: 80px;
  font-weight: 400;
}
.select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 900px) {
  .select-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .select-grid { grid-template-columns: 1fr; }
}
.num-card {
  position: relative;
  background: var(--bg);
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 24px 36px;
  text-align: center;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  color: inherit;
  transition: background var(--dur) var(--ease);
  gap: 0;
}
.num-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color var(--dur) var(--ease);
}
.num-card:hover::after { border-color: var(--gold); }
.num-card__bottle {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  transition: filter var(--dur) var(--ease);
}
.num-card__bottle svg { height: 100%; max-height: 280px; width: auto; }
.num-card:hover .num-card__bottle { filter: brightness(1.15); }
.num-card__ar {
  font-family: var(--arabic);
  font-size: 20px;
  color: var(--cream);
  margin-top: 24px;
  font-weight: 400;
  direction: rtl;
  flex: 0 0 auto;
}
.num-card__mood {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
  font-weight: 500;
  font-family: var(--serif);
  flex: 0 0 auto;
}

/* =============================================================
   PAGE 3 — Perfume Reveal
   ============================================================= */
.reveal-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  min-height: calc(100vh - 72px);
}
@media (max-width: 900px) {
  .reveal-page { grid-template-columns: 1fr; gap: 48px; }
}
.reveal-numeral-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  position: relative;
}
.reveal-bottle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  /* gold rim-light glow per design system imagery rule */
  filter: drop-shadow(0 0 80px rgba(168,134,46,0.32));
}
.reveal-bottle svg { height: clamp(360px, 56vh, 560px); width: auto; }
.reveal-info {
  padding-left: clamp(0px, 6vw, 80px);
  max-width: 560px;
}
@media (max-width: 900px) {
  .reveal-info { padding-left: 0; text-align: center; margin: 0 auto; }
}
.reveal-info__ar {
  font-family: var(--arabic);
  font-size: 36px;
  color: var(--cream);
  direction: rtl;
  font-weight: 400;
  line-height: 1.4;
}
.reveal-info__en {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 8px;
  text-transform: uppercase;
  font-weight: 400;
}
.reveal-info .rule {
  width: 100%;
  margin: 32px 0;
}
.reveal-info .rule--40 { margin: 40px 0; }
@media (max-width: 900px) { .reveal-info .rule { margin-left: auto; margin-right: auto; max-width: 100%; } }
.reveal-info__label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 32px;
}
.reveal-info__label:first-of-type { margin-top: 0; }
.reveal-info__text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--cream);
  margin-top: 12px;
  line-height: 1.4;
  font-weight: 400;
}
.reveal-info__mech {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 32px;
}
.reveal-info__cta { margin-top: 8px; }

/* =============================================================
   Perfume Reveal — lower sections (Description, Notes, Card preview)
   ============================================================= */
.perfume-lower {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px clamp(24px, 4vw, 64px) 120px;
}
.perfume-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  border-top: 1px solid var(--line);
  padding-top: 64px;
  margin-top: 64px;
}
.perfume-block:first-child { margin-top: 0; }
@media (max-width: 760px) {
  .perfume-block { grid-template-columns: 1fr; gap: 16px; }
}
.perfume-block__label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  font-family: var(--serif);
  padding-top: 6px;
}
.perfume-block__body {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.65;
  color: var(--cream);
  font-style: italic;
  font-weight: 400;
  max-width: 56ch;
  text-wrap: pretty;
}
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
@media (max-width: 700px) { .notes { grid-template-columns: 1fr; gap: 32px; } }
.note__head {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--serif);
}
.note__body {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--cream);
  margin-top: 12px;
  font-weight: 400;
}
.card-preview__copy {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 48ch;
}
.mystery-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 36px 32px;
  border: 1px solid var(--gold);
  background: var(--bg);
  width: 240px;
  aspect-ratio: 5 / 7;
  gap: 20px;
}
.mystery-card__mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--gold);
  letter-spacing: 0.01em;
  line-height: 1;
}
.mystery-card__num {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* =============================================================
   PAGE 4 — Checkout
   ============================================================= */
.checkout {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 96px) clamp(24px, 4vw, 64px) 120px;
}
.checkout__chip {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  margin-bottom: 24px;
}
.checkout__chip [lang="ar"] { font-family: var(--arabic); font-size: 16px; }
.checkout__heading {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(36px, 5vw, 48px);
  color: var(--cream);
  text-align: center;
  font-weight: 400;
  margin-bottom: 64px;
  line-height: 1.15;
}
.field {
  margin-bottom: 8px;
}
.field__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
  margin-top: 32px;
  font-family: var(--serif);
}
.field__label:first-of-type { margin-top: 0; }
.checkout__submit { margin-top: 48px; }

/* =============================================================
   PAGE 5 — Confirmation
   ============================================================= */
.confirm {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}
.confirm__num {
  font-family: var(--serif);
  font-size: clamp(96px, 12vw, 120px);
  color: var(--gold);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}
.confirm__h {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 4vw, 36px);
  color: var(--cream);
  margin-top: 40px;
  font-weight: 400;
  line-height: 1.2;
}
.confirm__body {
  font-size: 18px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.8;
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: 400;
}
.confirm__foot {
  font-size: 14px;
  color: var(--muted-dim);
  margin-top: 56px;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.confirm__card-wrap {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.confirm__card-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--serif);
}

/* =============================================================
   Shared footer (pages 1–5)
   ============================================================= */
.foot {
  border-top: 1px solid var(--line);
  padding: 48px clamp(24px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
@media (max-width: 700px) {
  .foot { grid-template-columns: 1fr; text-align: center; gap: 16px; }
}
.foot__left,
.foot__right {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--serif);
}
.foot__right { justify-self: end; }
.foot__brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--gold);
  letter-spacing: 0.01em;
  justify-self: center;
}
@media (max-width: 700px) {
  .foot__left, .foot__right { justify-self: center; }
}

/* =============================================================
   PAGE 6 — Message Reveal (mobile-first, standalone)
   ============================================================= */
.reveal {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}
.reveal__brand {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--gold);
  letter-spacing: -0.02em;
  font-weight: 400;
  line-height: 1;
}
.reveal__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  margin-top: 24px;
  font-weight: 400;
}
.reveal__btn { margin-top: 40px; }
.reveal__timer {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(72px, 15vw, 120px);
  color: var(--gold);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.reveal__msg {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--cream);
  max-width: 340px;
  margin-top: 48px;
  line-height: 1.8;
  font-weight: 400;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease);
}
.reveal__msg--fade { opacity: 0; }
.reveal__finale {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 24px;
  font-weight: 400;
}

/* =============================================================
   PAGE 7 — Expired
   ============================================================= */
.expired {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}
.expired__brand {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--gold);
  letter-spacing: -0.02em;
  font-weight: 400;
}
.expired .rule { width: 40px; margin: 32px auto; }
.expired__msg {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}
.expired__foot {
  font-size: 14px;
  color: var(--muted-dim);
  margin-top: 24px;
  font-family: var(--serif);
  font-weight: 400;
}
