/* Base for versions that set "base": true in version.json. The build puts it before the version's site.css.
   A version sets the variables below and styles its own home page; product pages, the order form, questions and
   legal pages come from here. Logical properties (inline/block) so Arabic mirrors without extra rules. */

:root {
  --bg: #fff;
  --surface: #f4f2ef;    /* behind photos */
  --ink: #161616;
  --muted: #5e5a56;
  --line: rgba(0, 0, 0, 0.12);
  --accent: #161616;     /* primary buttons */
  --accent-ink: #fff;
  --accent-hover: #333;
  --display: Georgia, serif;
  --body: system-ui, sans-serif;
  --display-weight: 500;
  --display-case: none;
  --display-track: 0;
  --radius: 0px;         /* photos, cards */
  --btn-radius: 999px;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::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(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
:lang(ar) body, body:lang(ar) { line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); text-transform: var(--display-case); letter-spacing: var(--display-track); line-height: 1.05; margin: 0 0 0.4em; }
:lang(ar) :is(h1, h2, h3) { text-transform: none; letter-spacing: 0; line-height: 1.35; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.2rem; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px;
  border: 0; border-radius: var(--btn-radius); background: var(--accent); color: var(--accent-ink);
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.98); }
.link { font-weight: 600; text-underline-offset: 6px; }

/* language links (versions place them) */
.langs { display: flex; gap: 4px; font-size: 0.85rem; }
.langs a, .langs .lang-on { padding: 4px 8px; text-decoration: none; color: var(--muted); }
.langs .lang-on { color: var(--ink); font-weight: 600; }
.langs a:hover { color: var(--ink); }

/* product cards (versions can restyle) */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 20px; }
.card a { display: block; text-decoration: none; }
.card-img { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--surface); border-radius: var(--radius); 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: 14px; font-weight: 600; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-top: 2px; 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); }

/* product page + ad page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) clamp(56px, 8vw, 112px); }
.frames { display: none; grid-template-columns: 1fr 1fr; gap: 8px; }
.frames.on { display: grid; }
.frames figure { margin: 0; background: var(--surface); aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); }
.frames figure:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
.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); }
.pdp-info > h2 { font-size: 1.3rem; margin-top: 40px; }
.pdp-info .price { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tagline { color: var(--muted); font-size: 1.15rem; margin-bottom: 28px; }
.desc { color: var(--muted); }
.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 { position: relative; padding-inline-start: 24px; }
.points li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.55em; width: 12px; height: 6px; border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.features { list-style: none; padding: 0; margin: 0; }
.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 14px; border: 1px solid var(--line); border-radius: var(--btn-radius); font-weight: 600; font-size: 0.95rem; background: var(--bg); transition: border-color .15s var(--ease); }
.swatch:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); flex: none; }
.size span { display: grid; place-items: center; min-width: 56px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: min(var(--btn-radius), 8px); font-weight: 600; background: var(--bg); transition: background-color .15s var(--ease), color .15s var(--ease); }
.size input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.swatch:has(input:focus-visible), .size input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.hint { font-size: 0.9rem; color: var(--muted); margin: 12px 0 0; }
.btn-order { width: 100%; }

/* questions */
.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-weight: 600; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 4px; top: 16px; font: 400 1.5rem/1 system-ui, sans-serif; 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); }

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

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 32px 12px; }
  .pdp { grid-template-columns: 1fr; 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; aspect-ratio: 4 / 5; 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(0, 0, 0, 0.45); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card-img img, .swatch, .size span { transition: none; }
}

/* v8 "Bloc": butter, blush, rose, saffron and mocha as blocks. Unbounded display, Figtree text. */
:root {
  --bg: #FFFDF8; --surface: #F4EFE6; --ink: #222; --muted: #5d5853; --line: rgba(34, 34, 34, 0.12);
  --accent: #222; --accent-ink: #fff; --accent-hover: #6B4A3A; --butter: #F3E3A1; --blush: #F2C9CF;
  --display: "Unbounded", system-ui, sans-serif; --body: "Figtree", system-ui, sans-serif;
  --display-weight: 600; --display-track: -0.02em; --radius: 24px; --btn-radius: 999px;
}
:lang(ar) { --display: "Readex Pro", sans-serif; --body: "Readex Pro", sans-serif; }
@font-face { font-family: "Unbounded"; src: url("/assets/fonts/unbounded.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("/assets/fonts/readex.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
.logo { font: 700 1.3rem/1 "Unbounded", sans-serif; letter-spacing: 0.06em; text-decoration: none; direction: ltr; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 32px; padding: 14px var(--gutter); background: var(--butter); }
.top .menu { display: flex; gap: 8px; }
.top .menu a { text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 8px 14px; border-radius: 999px; transition: background-color .15s; }
.top .menu a:hover { background: rgba(255, 255, 255, 0.6); }
.top .langs { margin-inline-start: auto; }
.top .langs .lang-on { background: #fff; border-radius: 999px; }

.hero { display: grid; grid-template-columns: 1fr 1.7fr; align-items: center; background: var(--butter); }
.hero-copy { padding: clamp(32px, 5vw, 80px) var(--gutter); }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: 1; }
.hero-copy p { font-size: 1.1rem; max-width: 34ch; margin-bottom: 28px; }
.hero figure { margin: 0; height: 100%; }
.hero figure img { width: 100%; height: 100%; max-height: calc(100svh - 60px); object-fit: cover; }

.colours { display: grid; grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; display: grid; align-content: start; gap: 6px; padding: 32px 32px 0; background: var(--tint); text-decoration: none; overflow: hidden; min-height: 520px; }
.chip { width: 56px; height: 56px; background: var(--chip); border-radius: 50%; margin-bottom: 16px;
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 22px, transparent 22.5px), repeating-conic-gradient(#000 0 15deg, transparent 15deg 30deg); mask: radial-gradient(circle, #000 70%, transparent 71%); box-shadow: 0 0 0 6px rgba(255,255,255,.6); }
.tile-name { font: 600 clamp(1.8rem, 3vw, 2.6rem)/1 var(--display); }
.tile-sub { color: var(--muted); }
.tile img { width: 70%; justify-self: center; margin-top: 24px; transition: transform .4s var(--ease); }
.tile:hover img { transform: translateY(-6px); }

.block { padding-block: clamp(56px, 8vw, 112px); }
.block > h2 { margin-bottom: 32px; }
.card a { background: var(--tint); border-radius: var(--radius); padding: 12px 12px 20px; height: 100%; }
.card-img { border-radius: calc(var(--radius) - 12px); background: rgba(255,255,255,.5); }
.card-name { font: 600 1.15rem/1.2 var(--display); padding-inline: 8px; }
.card-meta { padding-inline: 8px; }
.card .price { display: block; padding-inline: 8px; font-weight: 600; }

.band { display: grid; grid-template-columns: 1fr 1fr; align-items: center; background: var(--blush); }
.band figure { margin: 0; }
.band > div { padding: clamp(32px, 6vw, 96px); }
.band p { font-size: 1.1rem; max-width: 46ch; }

.bubbles { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bubbles li { background: var(--surface); border-radius: var(--radius); padding: 28px; }
.bubbles li:nth-child(1) { background: var(--blush); }
.bubbles li:nth-child(2) { background: var(--butter); }
.bubbles li:nth-child(3) { background: #E3D3C7; }
.bubbles h3 { font: 600 1.05rem/1.3 var(--display); }
.bubbles p { margin: 0; }
.numbered { counter-reset: n; }
.numbered li { counter-increment: n; }
.numbered li::before { content: counter(n); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; font: 700 1rem/1 var(--display); margin-bottom: 16px; }
.faq summary { font-family: var(--display); font-weight: 500; }
.swatch { border-radius: 999px; }
.frames figure { border-radius: var(--radius); }

.foot { background: var(--ink); color: #fff; padding: 56px var(--gutter); display: grid; gap: 12px; }
.foot nav { display: flex; gap: 24px; }
.foot p { margin: 0; color: #c9c4bd; }

@media (max-width: 900px) {
  .top .menu { display: none; }
  .hero, .band { grid-template-columns: 1fr; }
  .colours { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .bubbles { grid-template-columns: 1fr; }
}
