/* ATLAS v1. The live site's palette and type (cream, plum, blush; Fraunces and DM Sans), quieter chrome, and the
   product photos as the rich moment. The scalloped edge appears only on photo frames.
   Logical properties (inline/block) so Arabic mirrors without extra rules. */

@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dmsans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("/assets/fonts/amiri-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/assets/fonts/plexar-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/assets/fonts/plexar-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --cream: #FBF5EE;
  --sand: #F3EADF;
  --blush-ink: #B04E78;   /* blush dark enough for text on cream */
  --blush-light: #F3C6D6;
  --brass: #84612B;       /* small text on cream, 4.5:1 */
  --plum: #5C1E3D;
  --plum-hover: #74284E;
  --ink: #3A1A2A;
  --muted: #6E4A5C;
  --line: rgba(58, 26, 42, 0.12);
  --white: #fff;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* scalloped bottom edge: a straight body plus a row of half circles */
  --scallop: linear-gradient(#000 0 0) top / 100% calc(100% - 11px) no-repeat,
             radial-gradient(circle at 50% 0, #000 11.5px, transparent 12px) bottom / 24px 12px repeat-x;
}
:lang(ar) {
  --serif: "Amiri", "Geeza Pro", serif;
  --sans: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 80px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
:lang(ar) body, body:lang(ar) { line-height: 1.85; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--plum); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0 0 0.45em; }
:lang(ar) :is(h1, h2, h3) { font-weight: 700; line-height: 1.35; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.kicker { font-weight: 600; font-size: 0.95rem; color: var(--brass); margin-bottom: 12px; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--plum); color: var(--white); padding: 8px 16px; border-radius: 999px; z-index: 20; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
.small { font-size: 0.85rem; }

.wordmark { font: 800 1.05rem/1 "DM Sans", system-ui, sans-serif; letter-spacing: 0.34em; text-decoration: none; color: var(--plum); padding-inline-start: 0.34em; direction: ltr; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--plum); color: var(--white); border: 0; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); padding: 16px 28px; text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--plum-hover); }
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 12px 20px; font-size: 0.9rem; }
.link { font-weight: 600; text-underline-offset: 6px; }

/* the brand's scalloped edge, on photo frames only */
.scalloped { -webkit-mask: var(--scallop); mask: var(--scallop); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter); background: color-mix(in srgb, var(--cream) 94%, transparent);
  border-bottom: 1px solid var(--line);
}
.menu { display: flex; gap: 28px; }
.menu a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color .15s var(--ease); }
.menu a:hover { color: var(--plum); }
.top-end { display: flex; align-items: center; gap: 16px; }
.langs { display: flex; gap: 4px; font-size: 0.85rem; }
.langs a, .lang-on { padding: 4px 8px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; }
.langs a:hover { color: var(--plum); }
.lang-on { color: var(--plum); background: var(--sand); }
.langs [lang="ar"] { font-family: "Geeza Pro", "Noto Naskh Arabic", system-ui, sans-serif; font-size: 0.95rem; }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(24px, 5vw, 80px);
  padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(48px, 7vw, 96px); max-width: 1320px; margin: 0 auto;
}
.hero h1 { font-size: clamp(3.4rem, 9vw, 7.6rem); letter-spacing: -0.02em; margin-bottom: 0.3em; }
:lang(ar) .hero h1 { font-size: clamp(3rem, 8vw, 6.4rem); letter-spacing: 0; }
.hero h1 .soft { display: block; font-weight: 500; color: var(--blush-ink); font-size: 0.72em; line-height: 1; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); max-width: 32ch; }
.darija { font: 500 1.25rem/1.3 var(--serif); color: var(--blush-ink); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 28px; }
.arch { margin: 0; border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; background: var(--sand); }
.hero-media { aspect-ratio: 3 / 4; height: min(calc(100svh - 160px), 760px); width: auto; max-width: 100%; justify-self: center; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* manifesto */
.manifesto { max-width: 820px; margin: 0 auto; text-align: center; padding: clamp(56px, 8vw, 112px) var(--gutter); border-top: 1px solid var(--line); }
.manifesto h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.manifesto p:last-child { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin-inline: auto; }

/* collection grid */
.collection { padding: clamp(56px, 8vw, 112px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.section-head { margin-bottom: 40px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px; }
.card a { display: block; text-decoration: none; color: var(--ink); }
.card-img { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--sand); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s var(--ease); }
.card-img img + img { opacity: 0; }
.card a:hover .card-img img + img { opacity: 1; }
.card-name { display: block; margin-top: 16px; font: 600 1.3rem/1.25 var(--serif); }
.card-meta { display: flex; align-items: center; gap: 12px; margin-top: 4px; color: var(--muted); font-size: 0.95rem; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }
.card .price { display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* bodies */
.bodies { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(56px, 8vw, 112px) var(--gutter); max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); }
.bodies-copy p:last-child { color: var(--muted); }
.looks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.looks figure { margin: 0; }
.looks img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.looks figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--muted); }

/* care: the one plum band */
.care { background: var(--plum); color: var(--cream); text-align: center; padding: clamp(64px, 9vw, 120px) var(--gutter); }
.care .kicker { color: var(--blush-light); }
.care h2 { color: var(--white); max-width: 22ch; margin-inline: auto; }
.care-list { list-style: none; padding: 0; margin: 48px auto 0; max-width: 1100px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.care-list li { padding: 48px 28px 32px; border: 1px solid rgba(251, 245, 238, 0.22); border-radius: 999px 999px var(--radius) var(--radius); }
.care-list h3 { color: var(--white); }
.care-list p { color: var(--blush-light); margin: 0; }

/* gift */
.gift { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: center; padding: clamp(56px, 8vw, 112px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.gift figure { margin: 0; max-width: 520px; justify-self: center; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.gift-copy { max-width: 560px; }
.gift-copy > p:not(.kicker) { color: var(--muted); }
.tip { padding-inline-start: 16px; border-inline-start: 2px solid var(--blush-light); }

/* how ordering works */
.order { background: var(--sand); padding: clamp(56px, 8vw, 112px) var(--gutter); }
.order > * { max-width: 1100px; margin-inline: auto; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; margin-block: 0 40px; }
.steps li { counter-increment: step; border-top: 1px solid rgba(58, 26, 42, 0.25); padding-top: 20px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 600 0.9rem/1 var(--sans); color: var(--brass); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.steps p { color: var(--muted); margin: 0; }
.order .btn { display: flex; width: fit-content; margin-inline: auto; }

/* faq */
.faq { max-width: 820px; margin: 0 auto; padding: clamp(56px, 8vw, 112px) var(--gutter); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding-block: 20px; padding-inline-end: 40px; font: 600 1.2rem/1.35 var(--serif); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 4px; top: 16px; font: 400 1.6rem/1 system-ui, sans-serif; color: var(--plum); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; max-width: 64ch; color: var(--muted); }

/* product page and ad page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; max-width: 1320px; margin: 0 auto; padding: 32px var(--gutter) clamp(56px, 8vw, 112px); }
.frames { display: none; grid-template-columns: 1fr 1fr; gap: 12px; }
.frames.on { display: grid; }
.frames figure { margin: 0; background: var(--sand); aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); }
.frames figure:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 5; border-radius: var(--radius) var(--radius) 0 0; }
.frames img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info { position: sticky; top: 96px; }
.pdp-info h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -0.01em; }
.pdp-info > h2 { font-size: 1.4rem; margin-top: 40px; }
.pdp-info > p:not(.tagline):not(.price) { color: var(--muted); }
.pdp-info .price { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.tagline { font: 500 1.25rem/1.35 var(--serif); color: var(--blush-ink); margin-bottom: 28px; }
.back { display: inline-block; font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; text-underline-offset: 4px; }
.points { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 8px; }
.points li { padding-inline-start: 24px; position: relative; }
.points li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.6em; width: 12px; height: 6px; border-inline-start: 2px solid var(--plum); border-bottom: 2px solid var(--plum); transform: rotate(-45deg); }
.features { padding: 0; margin: 0; list-style: none; }
.features li { padding-block: 12px; border-top: 1px solid var(--line); }

.buy fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.buy legend { font-weight: 600; margin-bottom: 12px; padding: 0; }
.buy legend span { font-weight: 400; color: var(--muted); margin-inline-start: 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch, .size { position: relative; cursor: pointer; }
.swatch input, .size input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-weight: 600; font-size: 0.95rem; transition: border-color .15s var(--ease); }
.swatch:has(input:checked) { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); }
.size span { display: grid; place-items: center; min-width: 56px; height: 44px; padding: 0 12px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); font-weight: 600; transition: background-color .15s var(--ease), color .15s var(--ease); }
.size input:checked + span { background: var(--plum); border-color: var(--plum); color: var(--white); }
.swatch:has(input:focus-visible), .size input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 3px; }
.hint { font-size: 0.9rem; color: var(--muted); margin: 12px 0 0; }
.btn-order { width: 100%; }

/* footer */
.foot { text-align: center; padding: 56px var(--gutter) 40px; border-top: 1px solid var(--line); }
.foot nav { display: flex; justify-content: center; gap: 24px; margin-top: 12px; }
.foot nav a { font-weight: 600; }
.foot p { color: var(--muted); margin-top: 12px; }

/* legal + 404 */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter); }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.legal h2 { font-size: 1.5rem; margin-top: 1.6em; }
.notfound > div { padding-block: 24px; border-bottom: 1px solid var(--line); }
.notfound h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

@media (max-width: 1060px) {
  .menu { display: none; }
}
@media (max-width: 900px) {
  .hero, .gift, .bodies, .pdp { grid-template-columns: 1fr; }
  .hero-media { height: auto; max-width: 420px; width: 100%; }
  .grid { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .care-list, .steps { grid-template-columns: 1fr; max-width: 460px; }
  .pdp { padding-inline: 0; padding-top: 0; }
  .pdp-info { position: static; padding-inline: var(--gutter); }
  .frames.on { grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; gap: 4px; }
  .frames figure, .frames figure:first-child { grid-column: auto; scroll-snap-align: start; border-radius: 0; }
  .ad { padding-bottom: 88px; }
  .ad .btn-order { position: fixed; inset-inline: 12px; bottom: 12px; width: auto; z-index: 15; box-shadow: 0 8px 24px -8px rgba(58, 26, 42, 0.5); }
}
@media (max-width: 560px) {
  .top { padding-inline: 16px; gap: 8px; }
  .top .btn-sm { display: none; }
  .grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card-img img, .swatch, .size span { transition: none; }
}
