/* Vesper, a fine jewellery maison. One stylesheet for English (ltr) and Arabic
   (rtl). Logical properties do the mirroring; [dir="rtl"] rules only swap the
   Arabic faces and a few directional details. */

:root {
  --ivory: #F4F1EA;
  --ivory-2: #EBE6DB;
  --paper: #FBFAF6;
  --ink: #1A1B22;
  --slate: #6B6E78;
  --sapphire: #2C4470;
  --gold: #B08D4E;
  --gold-soft: #C9A86A;
  --line: rgba(26,27,34,0.13);
  --line-2: rgba(26,27,34,0.06);
  --line-dark: rgba(244,241,234,0.16);
  --display: "Bodoni Moda", Georgia, serif;
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --ar-display: "Aref Ruqaa", "Bodoni Moda", serif;
  --ar-sans: "Cairo", "Outfit", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(20px, 5vw, 66px);
  --gut: clamp(52px, 8.5vw, 140px);
}

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

body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65; font-weight: 300;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
[dir="rtl"] body { font-family: var(--ar-sans); line-height: 1.9; font-weight: 400; }
body.noscroll { overflow: hidden; }

img { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--sapphire); color: var(--paper); }

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--ar-display); font-weight: 700; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--gut); }

.kicker { display: inline-flex; align-items: center; gap: .7em; font-family: var(--sans); font-size: .74rem; font-weight: 500; letter-spacing: .04em; color: var(--sapphire); }
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }
[dir="rtl"] .kicker { font-family: var(--ar-sans); letter-spacing: 0; font-size: .92rem; }

.display { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.16; font-weight: 500; padding-block-end: .04em; }
[dir="rtl"] .display { line-height: 1.4; }
.lat { direction: ltr; unicode-bidi: isolate; }
.num { direction: ltr; unicode-bidi: isolate; font-feature-settings: "tnum" 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; font-family: var(--sans); font-weight: 500; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; padding: 1em 1.9em; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 0; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s; }
[dir="rtl"] .btn { font-family: var(--ar-sans); letter-spacing: 0; text-transform: none; font-weight: 600; }
.btn:hover { background: var(--sapphire); border-color: var(--sapphire); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

html.js .reveal { opacity: 0; transform: translateY(24px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }
html.js .reveal.d2 { transition-delay: .1s; }
html.js .reveal.d3 { transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------------------------------------------------------------- nav */
.nav { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 60; display: flex; align-items: center; gap: 18px; padding: 18px var(--pad); background: rgba(244,241,234,.9); backdrop-filter: blur(8px); border-block-end: 1px solid transparent; transition: padding .4s var(--ease), border-color .4s var(--ease); }
.nav.scrolled { padding-block: 12px; border-block-end-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand .mark { width: 24px; height: 24px; flex: none; color: var(--sapphire); }
.brand .mark svg { width: 100%; height: 100%; display: block; }
.brand-name { font-family: var(--display); font-weight: 500; font-size: 1.5rem; letter-spacing: .14em; }
[dir="rtl"] .brand-name { font-family: var(--ar-display); letter-spacing: 0; font-weight: 700; }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: clamp(15px, 2.2vw, 32px); }
.nav-links { display: flex; align-items: center; gap: clamp(15px, 2.2vw, 32px); }
.nav-links a { font-size: .82rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); transition: color .3s; }
[dir="rtl"] .nav-links a { letter-spacing: 0; text-transform: none; font-size: .98rem; }
.nav-links a:hover { color: var(--sapphire); }
.nav-links .lang { letter-spacing: 0; text-transform: none; }
.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang .globe { width: 16px; height: 16px; }
.lang .globe svg { width: 100%; height: 100%; display: block; }
.wish-toggle { position: relative; width: 38px; height: 38px; display: grid; place-items: center; background: transparent; border: 0; color: var(--ink); }
.wish-toggle svg { width: 22px; height: 22px; }
.wish-count { position: absolute; inset-block-start: 0; inset-inline-end: -2px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--sapphire); color: var(--paper); font-family: var(--sans); font-size: .66rem; font-weight: 600; border-radius: 9px; display: grid; place-items: center; }
.wish-count[hidden] { display: none !important; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero { padding-block-start: clamp(86px, 12vh, 130px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; min-height: calc(100svh - 130px); }
.hero-copy .kicker { margin-block-end: 22px; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); line-height: 1.1; font-weight: 500; padding-block-end: .05em; }
.hero h1 em { font-style: italic; }
.hero-tag { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: var(--slate); margin-block: 24px 0; max-width: 36ch; font-weight: 300; }
[dir="rtl"] .hero-tag { font-weight: 400; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 32px; }
.hero-img { aspect-ratio: 4 / 5; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- maison */
.maison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.maison-copy .display { margin-block: 18px 0; max-width: 16ch; }
.maison-copy p { color: var(--slate); margin-block: 1.2em 0; max-width: 48ch; }
.maison-copy p.lead { color: var(--ink); font-size: 1.14rem; line-height: 1.5; }
.maison-sign { margin-block-start: 30px; font-family: var(--display); font-style: italic; font-size: 1.1rem; }
[dir="rtl"] .maison-sign { font-family: var(--ar-display); font-style: normal; }
.maison-img { aspect-ratio: 6 / 5; overflow: hidden; }
.maison-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- collection */
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-block-end: clamp(26px, 3.5vw, 42px); }
.head-row .display { margin-block-start: 14px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-block-end: clamp(28px, 4vw, 46px); justify-content: center; }
.filter { font-family: var(--sans); font-size: .82rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); background: transparent; border: 0; padding: .5em .2em; position: relative; transition: color .3s; }
[dir="rtl"] .filter { font-family: var(--ar-sans); letter-spacing: 0; text-transform: none; font-size: .98rem; }
.filter::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; height: 1px; width: 100%; background: var(--sapphire); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
[dir="rtl"] .filter::after { transform-origin: right; }
.filter:hover { color: var(--ink); }
.filter.active { color: var(--sapphire); }
.filter.active::after { transform: scaleX(1); }

.pieces { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 40px); }
.piece { display: flex; flex-direction: column; cursor: pointer; }
.piece.hide { display: none; }
.piece-photo { aspect-ratio: 1; overflow: hidden; background: var(--ivory-2); position: relative; }
.piece-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.piece:hover .piece-photo img { transform: scale(1.05); }
.piece-heart { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; background: rgba(251,250,246,.86); border: 0; display: grid; place-items: center; color: var(--ink); transition: background .3s, color .3s; z-index: 2; }
.piece-heart svg { width: 19px; height: 19px; }
.piece-heart:hover { background: var(--paper); color: var(--sapphire); }
.piece-heart.saved { color: var(--sapphire); }
.piece-heart.saved svg path { fill: currentColor; }
.piece:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 4px; }
.piece-body { padding-block-start: 16px; text-align: center; }
.piece-body h3 { font-size: 1.34rem; font-weight: 500; }
.piece-cat { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-block: 6px 0; }
[dir="rtl"] .piece-cat { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.piece-price { margin-block-start: 8px; font-size: .96rem; color: var(--ink); }
.piece-price .from { color: var(--slate); }
.piece-data { display: none; }

/* ---------------------------------------------------------------- product detail panel + wishlist drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(16,16,20,.5); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.panel { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 95; width: min(500px, 100%); background: var(--paper); transform: translateX(100%); visibility: hidden; transition: transform .5s var(--ease), visibility .5s var(--ease); display: flex; flex-direction: column; box-shadow: -30px 0 60px -40px rgba(0,0,0,.4); }
[dir="rtl"] .panel { transform: translateX(-100%); }
.panel.open { transform: none; visibility: visible; }
.panel-close { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; width: 42px; height: 42px; border-radius: 50%; background: rgba(251,250,246,.9); border: 0; display: grid; place-items: center; color: var(--ink); z-index: 3; }
.panel-close svg { width: 19px; height: 19px; }
.panel-scroll { overflow-y: auto; flex: 1; }
.sheet-photo { aspect-ratio: 1; overflow: hidden; }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; }
.sheet-body { padding: clamp(26px, 4vw, 40px); text-align: center; }
.sheet-cat { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sapphire); }
[dir="rtl"] .sheet-cat { letter-spacing: 0; text-transform: none; }
.sheet-body h3 { font-size: 2rem; margin-block: 8px 0; font-weight: 500; }
.sheet-price { font-family: var(--display); font-size: 1.3rem; margin-block-start: 12px; }
.sheet-desc { color: var(--slate); margin-block-start: 16px; text-align: start; }
.specs { margin-block-start: 24px; border-block-start: 1px solid var(--line); text-align: start; }
.specs .row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-block-end: 1px solid var(--line-2); font-size: .92rem; }
.specs .row .k { color: var(--slate); }
.specs .row .v { font-weight: 500; }
.sheet-foot { padding: clamp(18px, 3vw, 26px) clamp(26px, 4vw, 40px); border-block-start: 1px solid var(--line); display: flex; gap: 12px; }
.sheet-foot .btn { flex: 1; }
.sheet-foot .heart-btn { width: 52px; flex: none; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; color: var(--ink); transition: background .3s, color .3s, border-color .3s; }
.sheet-foot .heart-btn svg { width: 20px; height: 20px; }
.sheet-foot .heart-btn.saved { color: var(--sapphire); border-color: var(--sapphire); }
.sheet-foot .heart-btn.saved svg path { fill: currentColor; }

/* wishlist drawer */
.wish-head { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(22px, 3vw, 30px); border-block-end: 1px solid var(--line); }
.wish-head h3 { font-size: 1.5rem; font-weight: 500; }
.wish-items { flex: 1; overflow-y: auto; padding: clamp(14px, 2vw, 22px) clamp(22px, 3vw, 30px); }
.wish-empty { color: var(--slate); text-align: center; padding-block: 30px; }
.wish-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding-block: 14px; border-block-end: 1px solid var(--line-2); }
.wish-line img { width: 64px; height: 64px; object-fit: cover; }
.wish-line .wl-name { font-family: var(--display); font-size: 1.05rem; }
.wish-line .wl-cat { font-size: .8rem; color: var(--slate); }
.wish-line .wl-price { font-size: .9rem; }
.wish-line .wl-remove { background: transparent; border: 0; color: var(--slate); width: 30px; height: 30px; display: grid; place-items: center; }
.wish-line .wl-remove svg { width: 16px; height: 16px; }
.wish-line .wl-remove:hover { color: var(--sapphire); }
.wish-foot { padding: clamp(18px, 3vw, 26px) clamp(22px, 3vw, 30px); border-block-start: 1px solid var(--line); }
.wish-foot .btn { width: 100%; }

/* ---------------------------------------------------------------- band */
.band { position: relative; isolation: isolate; overflow: hidden; color: var(--ivory); text-align: center; }
.band .bg { position: absolute; inset: 0; z-index: -2; }
.band .bg img { width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(16,18,24,.72); }
.band .wrap { padding-block: clamp(72px, 12vw, 160px); }
.band-text { font-family: var(--display); font-weight: 500; font-style: italic; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.4; max-width: 24ch; margin-inline: auto; }
[dir="rtl"] .band-text { font-family: var(--ar-display); font-style: normal; line-height: 1.6; max-width: 28ch; }
.band-text .g { color: var(--gold-soft); }

/* ---------------------------------------------------------------- appointment */
.appt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.appt-img { aspect-ratio: 5 / 6; overflow: hidden; }
.appt-img img { width: 100%; height: 100%; object-fit: cover; }
.appt-copy .display { margin-block: 16px 0; }
.appt-copy > p { color: var(--slate); margin-block: 16px 0; max-width: 42ch; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-block-start: 28px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .8rem; font-weight: 500; color: var(--ink); }
.field input, .field select, .field textarea { font: inherit; font-size: .96rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: .8em .9em; width: 100%; transition: border-color .3s, box-shadow .3s; }
[dir="rtl"] .field input, [dir="rtl"] .field select, [dir="rtl"] .field textarea { font-family: var(--ar-sans); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--sapphire); box-shadow: 0 0 0 3px rgba(44,68,112,.14); }
.field textarea { resize: vertical; min-height: 80px; }
.field.invalid input, .field.invalid select { border-color: #9a3b3b; }
.field .err { color: #9a3b3b; font-size: .8rem; min-height: 1em; }
.form .btn { grid-column: 1 / -1; }
.form-note { grid-column: 1 / -1; font-size: .9rem; color: var(--slate); margin: 0; }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--ink); color: var(--ivory); padding-block: clamp(54px, 7vw, 86px) 30px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(30px, 5vw, 70px); }
.footer .brand-name { color: var(--ivory); }
.footer-blurb { color: rgba(244,241,234,.62); margin: 18px 0 20px; max-width: 38ch; font-weight: 300; }
.socials { display: flex; gap: 12px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; color: var(--ivory); transition: background .3s, color .3s, border-color .3s; }
.socials a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.socials svg { width: 18px; height: 18px; }
.footer-col .col-h { font-family: var(--sans); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); margin: 0 0 16px; font-weight: 600; }
[dir="rtl"] .footer-col .col-h { font-family: var(--ar-sans); letter-spacing: 0; text-transform: none; font-size: .98rem; }
.footer-col a, .footer-col span { display: block; color: rgba(244,241,234,.72); font-size: .94rem; padding-block: 5px; transition: color .3s; }
.footer-col a:hover { color: var(--gold-soft); }
/* email/phone force direction:ltr so they read right, but on a block that also
   left-aligns them. pin them to the column's start edge in rtl. */
[dir="rtl"] .footer-col .lat { text-align: right; }
.footer-base { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-block-start: clamp(40px, 6vw, 62px); padding-block-start: 24px; border-block-start: 1px solid var(--line-dark); font-size: .84rem; color: rgba(244,241,234,.55); }
.credit { display: inline-flex; align-items: center; gap: 12px; }
.credit-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: rgba(244,241,234,.6); }
[dir="rtl"] .credit-label { letter-spacing: 0; text-transform: none; font-size: .92rem; font-family: var(--ar-sans); }
.wlogo { display: inline-flex; align-items: center; gap: 11px; opacity: .9; transition: opacity .4s var(--ease); }
.wlogo:hover { opacity: 1; }
.wlogo-mark { height: 38px; width: auto; display: block; }
.wlogo-word { height: 26px; width: auto; display: block; }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,16,20,.7); }
.modal-card { position: relative; background: var(--paper); max-width: 460px; width: 100%; padding: clamp(30px, 4vw, 46px); text-align: center; }
.modal-card .mark { width: 38px; height: 38px; color: var(--sapphire); margin: 0 auto 16px; }
.modal-card .mark svg { width: 100%; height: 100%; }
.modal-card h3 { font-size: 1.6rem; font-weight: 500; }
.modal-card p { color: var(--slate); margin: 12px 0 0; font-size: .98rem; }
.modal-ref { font-size: .86rem; color: var(--slate); margin-block-start: 16px; }
.modal-ref .code { font-family: var(--display); font-weight: 600; color: var(--ink); letter-spacing: .06em; }
.modal-close { margin-block-start: 22px; background: var(--ink); color: var(--paper); border: 0; padding: .8em 2em; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: .82rem; transition: background .3s; }
[dir="rtl"] .modal-close { letter-spacing: 0; text-transform: none; }
.modal-close:hover { background: var(--sapphire); }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--sapphire); color: var(--paper); padding: 10px 16px; z-index: 200; }
.skip:focus { inset-inline-start: 12px; }
:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 3px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; } .pieces { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .nav-links { position: fixed; inset: 0; z-index: 55; flex-direction: column; justify-content: center; gap: 22px; background: var(--ivory); transform: translateX(100%); transition: transform .5s var(--ease); pointer-events: none; }
  [dir="rtl"] .nav-links { transform: translateX(-100%); }
  body.menu-open .nav-links { transform: none; pointer-events: auto; }
  /* nav carries backdrop-filter, which makes it the containing block for the
     fixed menu, so its inset:0 maps to the header box not the viewport once you
     scroll. drop it while the menu is open so the overlay covers the screen. */
  body.menu-open .nav { backdrop-filter: none; }
  /* the overlay is a child of the nav, so it would paint over the bar's own
     brand and close button. keep those above it. */
  .nav .brand, .wish-toggle, .nav-toggle { position: relative; z-index: 56; }
  .nav-links a { font-size: 1.2rem; }
  .hero-grid, .maison-grid, .appt-grid { grid-template-columns: 1fr; }
  .hero-img { order: -1; aspect-ratio: 4 / 3; max-height: 56vh; }
  .maison-img, .appt-img { order: -1; aspect-ratio: 4 / 3; }
  .form { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 540px) { .pieces { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; } }
