:root {
  --paper: #FCFAF6;
  --ivory: #F2EADF;
  --ivory-deep: #E6D9C7;
  --ink: #1C1715;
  --stone: #6B6058;
  --plum: #4A2270;
  --plum-deep: #35184F;
  --gold: #B08D57;
  --line: #E3D8C9;
  --plate: #0F0E0E;

  --display-ar: "Amiri", "Noto Naskh Arabic", "Times New Roman", serif;
  --display-en: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --text: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --plate-latin: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --plate-arabic: "Noto Kufi Arabic", "Geeza Pro", Tahoma, sans-serif;

  --display: var(--display-ar);
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1200px;
  color-scheme: light;
}

html[lang="en"] { --display: var(--display-en); }

/* Bodoni's display cut is hairline-thin at headline sizes; a smaller optical size keeps it sturdy */
html[lang="en"] :is(.hero h1, .section-head h2, .quote p, .contact h2, .kit-name),
.clients, .reel-cap strong, .monogram {
  font-variation-settings: "opsz" 30;
}
html[lang="en"] :is(.section-head h2, .quote p, .contact h2, .kit-name) { font-weight: 500; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

.i18n-pending body { visibility: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.6; }

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure, blockquote { margin: 0; }

:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; border-radius: 6px; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
  padding: .9rem 1.45rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--plum); color: #FBF7FF; }
.btn-primary:hover { background: var(--plum-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: .55rem 1rem; font-size: .92rem; }
.btn-lg { padding: 1.05rem 1.75rem; font-size: 1.08rem; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(252, 250, 246, .9);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-block-end: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.is-scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 76px; }
.brand { flex: none; border-radius: 8px; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; gap: 1.9rem; margin-inline-start: auto; font-size: .98rem; }
.nav a { text-decoration: none; color: var(--stone); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.lang {
  background: none; border: 0; cursor: pointer; padding: .45rem .75rem; border-radius: 999px;
  font-size: 1rem; transition: background-color .2s;
}
.lang:hover { background: var(--ivory); }
html[lang="ar"] .lang { font-family: var(--display-en); }
html[lang="en"] .lang { font-family: var(--display-ar); font-size: 1.1rem; }

@media (max-width: 860px) {
  .nav { display: none; }
  .header-actions { margin-inline-start: auto; }
  .brand img { height: 36px; }
}
@media (max-width: 420px) {
  .header-actions .btn-sm span { display: none; }
  .header-actions .btn-sm { padding: .6rem; }
}

/* Hero */

.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(3rem, 7vw, 5.5rem); }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.5rem, 4.7vw, 4.2rem); line-height: 1.06; letter-spacing: -.02em;
  margin-block-end: 1.4rem; text-wrap: balance;
}
html[lang="ar"] .hero h1 { font-weight: 700; font-size: clamp(2.7rem, 5.6vw, 4.9rem); line-height: 1.32; letter-spacing: 0; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--stone); max-width: 32em; margin-block-end: 2.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* Studio: live preview */

.studio { background: var(--ivory); border-radius: 30px; padding: clamp(.75rem, 2.2vw, 1.5rem); }

.stage {
  --base: #0F0E0E; --outline: transparent; --edge: rgba(255, 255, 255, .1);
  --print: #F4EFE6; --vinyl: #F4EFE6; --screw: #2B2926;
  position: relative; aspect-ratio: 5 / 4; border-radius: 22px; overflow: hidden;
  background: radial-gradient(110% 85% at 50% 30%, #FFFDF9 0%, #F8F2EA 55%, #EFE5D8 100%);
}
.stage[data-finish="white"] { --base: #F9F6F0; --outline: rgba(60, 45, 30, .14); --edge: rgba(60, 45, 30, .1); --print: #151312; --screw: #D8CFC3; }
.stage[data-finish="gold"] { --edge: rgba(214, 179, 120, .35); --print: url(#g-gold); --vinyl: url(#g-gold); }

.stage-ring { position: absolute; inset: 0; width: 100%; height: 100%; }

.mock {
  position: absolute; inset: 0; margin: auto; width: 84%; height: auto; overflow: visible;
  filter: drop-shadow(0 26px 28px rgba(52, 34, 16, .2)) drop-shadow(0 4px 6px rgba(52, 34, 16, .14));
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.97);
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .5s;
}
.mock.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.mock[data-mock="mat"], .mock[data-mock="freshener"] { width: auto; height: 80%; }
.mock[data-mock="window"] { width: 80%; }

.m-base { fill: var(--base); stroke: var(--outline); stroke-width: 1.5; transition: fill .3s; }
.m-edge { fill: none; stroke: var(--edge); stroke-width: 1.5; }
.m-screw { fill: var(--screw); stroke: rgba(255, 255, 255, .12); }
.m-gloss { fill: url(#g-gloss); pointer-events: none; }
.m-sweep { fill: url(#g-sweep); opacity: 0; transform-box: fill-box; }
.m-name, .m-sub, .m-thanks { fill: var(--print); transition: fill .3s; }
.m-name { font-family: var(--plate-latin); letter-spacing: .06em; }
.m-name.is-arabic { font-family: var(--plate-arabic); font-weight: 600; letter-spacing: 0; }
.m-sub { font-family: var(--plate-latin); letter-spacing: .42em; opacity: .82; }
.m-thanks { font-family: var(--display-en); font-style: italic; opacity: .85; }
html[lang="ar"] .m-thanks { font-family: var(--display-ar); font-style: normal; }
.m-spark { fill: var(--print); }
.m-heel rect { fill: none; stroke: var(--edge); stroke-width: 1.5; }
.m-heel path { stroke: var(--edge); stroke-width: 1.5; }
.m-string { stroke: #8F7E6C; stroke-width: 1.6; fill: none; }
.m-hole { fill: #F6EFE5; }
.m-glass { fill: url(#g-glass); }
.m-lines { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1.2; }
.m-reflect { fill: #fff; opacity: .05; }
.mock[data-mock="window"] .m-name, .mock[data-mock="window"] .m-sub { fill: var(--vinyl); }

/* One orchestrated moment: the plate prints itself when the page opens */
.stage.is-intro .mock.is-active .m-print { animation: print-ltr 1.1s .35s cubic-bezier(.65, 0, .25, 1) both; }
html[dir="rtl"] .stage.is-intro .mock.is-active .m-print { animation-name: print-rtl; }
.stage.is-intro .mock.is-active .m-sweep { animation: sweep 1.3s 1.2s ease-in-out both; }
@keyframes print-ltr { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes print-rtl { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes sweep { from { opacity: 1; transform: translateX(-100%); } to { opacity: 1; transform: translateX(100%); } }

.controls { display: grid; gap: 1rem; padding: 1.1rem .35rem .35rem; }
.field label { display: block; font-size: .92rem; color: var(--stone); margin-block-end: .4rem; }
.field input {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--ink);
  padding: .8rem 1.05rem; border-radius: 14px; border: 1px solid var(--ivory-deep); background: var(--paper);
}
.field input::placeholder { color: #A3978C; }
.field input:focus { outline: 2px solid var(--plum); outline-offset: 1px; border-color: transparent; }

.pickers { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1rem; }
.tabs, .finishes { display: flex; flex-wrap: wrap; gap: .35rem; }
.tab, .finish {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; border: 1px solid var(--ivory-deep); border-radius: 999px;
  padding: .45rem .9rem; font-size: .93rem; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.tab:hover, .finish:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.finish[aria-checked="true"] { border-color: var(--ink); background: var(--paper); }
.swatch { width: .95rem; height: .95rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.finish[data-finish="black"] .swatch { background: #0F0E0E; }
.finish[data-finish="white"] .swatch { background: #F9F6F0; }
.finish[data-finish="gold"] .swatch { background: linear-gradient(160deg, #F0DCAE, #C9A064 50%, #94703A); }

.studio-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.studio-note { font-size: .88rem; color: var(--stone); max-width: 30em; line-height: 1.55; }
.studio-order {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; color: var(--plum);
  text-decoration: none; border-block-end: 1px solid currentColor; padding-block: .15rem;
}
.studio-order svg { width: 1.05em; height: 1.05em; }
.studio-order:hover { color: var(--plum-deep); }

/* Ornament from the logo: rule, sparkle, rule */

.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; max-width: 22rem; margin-inline: auto; }
.ornament span { flex: 1; height: 1px; background: var(--gold); opacity: .6; }
.ornament svg { width: 14px; height: 14px; fill: var(--plum); }

/* Sections */

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-head { max-width: 42rem; margin-block-end: clamp(2rem, 4vw, 3rem); }
.section-head h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.05rem, 4.3vw, 3.4rem); line-height: 1.1; letter-spacing: -.01em;
  margin-block-end: .8rem; text-wrap: balance;
}
html[lang="ar"] .section-head h2 { font-weight: 700; line-height: 1.38; letter-spacing: 0; }
.section-head p { color: var(--stone); font-size: 1.1rem; max-width: 36em; }

/* Work */

.clients {
  list-style: none; padding: 0; margin: 0 0 clamp(2rem, 4vw, 2.75rem);
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem;
  font-family: var(--display-en); font-size: clamp(1.2rem, 2.3vw, 1.7rem); line-height: 1.4;
}
.clients li { display: inline-flex; align-items: center; gap: 1.1rem; }
.clients li + li::before {
  content: ""; width: 10px; height: 10px; background: var(--plum);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

.reels {
  list-style: none; margin: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(210px, 21vw, 268px); gap: clamp(.75rem, 1.5vw, 1.1rem);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  padding-block-end: 1.2rem; scrollbar-width: thin; scrollbar-color: var(--ivory-deep) transparent;
}
.reel { scroll-snap-align: start; }
.reel-media {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0;
  border-radius: 16px; overflow: hidden; background: var(--plate); cursor: zoom-in;
}
.reel-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.reel-media:hover video { transform: scale(1.03); }
.reel-cap { margin-block-start: .75rem; font-size: .93rem; line-height: 1.45; color: var(--stone); }
.reel-cap strong { display: block; color: var(--ink); font-weight: 400; font-family: var(--display); font-size: 1.12rem; margin-block-end: .15rem; }
.reel-cap strong:not([data-i18n]) { font-family: var(--display-en); }

/* Kit: product index */

.kit-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.kit-list { list-style: none; padding: 0; margin: 0; border-block-start: 1px solid var(--line); }
.kit-item { border-block-end: 1px solid var(--line); }
.kit-name {
  display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 1rem;
  background: none; border: 0; padding-block: 1.05rem; text-align: start; cursor: pointer;
  font-family: var(--display); font-size: clamp(1.55rem, 2.7vw, 2.2rem); line-height: 1.25; color: #9C8F84;
  transition: color .25s;
}
html[lang="ar"] .kit-name { font-weight: 700; line-height: 1.5; padding-block: .8rem; }
.kit-name:hover, .kit-item.is-active .kit-name { color: var(--ink); }
.kit-other { font-size: .95rem; color: var(--stone); font-weight: 400; flex: none; }
html[lang="ar"] .kit-other { font-family: var(--display-en); font-style: italic; }
html[lang="en"] .kit-other { font-family: var(--display-ar); font-size: 1.05rem; }

.kit-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.2, .7, .2, 1); }
.kit-detail > div { overflow: hidden; min-height: 0; }
.kit-item.is-active .kit-detail { grid-template-rows: 1fr; }
.kit-detail p { color: var(--stone); max-width: 30em; padding-block-end: 1.3rem; font-size: 1.05rem; }
.kit-inline { display: none; }

.kit-stage {
  position: sticky; top: 104px; aspect-ratio: 4 / 5; border-radius: 22px 22px 22px 22px; overflow: hidden;
  background: var(--plate); box-shadow: 0 30px 60px -30px rgba(40, 24, 10, .45);
}
.kit-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.kit-stage img.is-active { opacity: 1; }

@media (max-width: 900px) {
  .kit-body { grid-template-columns: 1fr; }
  .kit-stage { display: none; }
  .kit-detail { grid-template-rows: 1fr; }
  .kit-name { color: var(--ink); cursor: default; padding-block: 1.1rem .7rem; }
  .kit-detail > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; align-items: start; padding-block-end: 1.3rem; }
  .kit-detail p { padding-block-end: 0; font-size: 1rem; }
  .kit-inline { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
}

/* Founder */

.founder { background: var(--ivory); }
.founder-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.portrait { max-width: 400px; width: 100%; }
.portrait-frame {
  position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: 999px 999px 20px 20px;
  background: linear-gradient(180deg, #FBF6EF 0%, var(--ivory-deep) 100%);
}
.portrait-frame::after {
  content: ""; position: absolute; inset: 14px; border: 1px solid var(--gold); opacity: .55;
  border-radius: 999px 999px 12px 12px;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.monogram { font-family: var(--display-en); font-size: clamp(6rem, 13vw, 10rem); line-height: 1; color: var(--plum); }
.quote p {
  font-family: var(--display); font-size: clamp(1.85rem, 3.7vw, 3.1rem); line-height: 1.18; letter-spacing: -.01em;
  text-wrap: balance;
}
html[lang="ar"] .quote p { font-weight: 700; line-height: 1.5; letter-spacing: 0; }
.quote { margin-block-end: 2rem; }
.founder-name { margin-block-end: .9rem; }
.founder-name strong { display: block; font-size: 1.2rem; font-weight: 600; }
.founder-name span { color: var(--stone); }
.founder-body { color: var(--stone); max-width: 34em; margin-block-end: 2rem; }

@media (max-width: 820px) {
  .founder-inner { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; }
}

/* Process: a real sequence, so it is numbered */

.steps {
  list-style: none; padding: 0; margin: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem);
}
.steps li { counter-increment: step; border-block-start: 1px solid var(--ink); padding-block-start: 1.3rem; }
.steps li::before {
  content: counter(step); display: block; margin-block-end: .8rem;
  font-family: var(--display-en); font-size: 2.4rem; line-height: 1; color: var(--plum);
}
html[lang="ar"] .steps li::before { content: counter(step, arabic-indic); font-family: var(--display-ar); font-weight: 700; }
.steps h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.45; margin-block-end: .35rem; }
.steps p { color: var(--stone); font-size: 1rem; }

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Contact */

.contact { background: var(--plum); color: #F6F0FA; }
.contact h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  line-height: 1.08; letter-spacing: -.015em; max-width: 16em; margin-block-end: 2.4rem; text-wrap: balance;
}
html[lang="ar"] .contact h2 { font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.contact .btn-primary { background: var(--paper); color: var(--plum); }
.contact .btn-primary:hover { background: #fff; }
.contact .btn-ghost { border-color: rgba(246, 240, 250, .55); color: #F6F0FA; }
.contact .btn-ghost:hover { background: #F6F0FA; color: var(--plum); }
.contact :focus-visible { outline-color: #fff; }
.socials { list-style: none; padding: 0; margin: 2.6rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 2rem; }
.socials a { color: #E6DAF0; text-decoration: none; border-block-end: 1px solid rgba(230, 218, 240, .35); transition: border-color .2s; }
.socials a:hover { border-color: #E6DAF0; }

/* Footer */

.site-footer { padding-block: 2.2rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; color: var(--stone); font-size: .92rem; }
.footer-inner img { height: 32px; width: auto; }

/* Lightbox */

.lightbox { padding: 0; border: 0; background: transparent; width: min(92vw, 440px); max-width: none; overflow: visible; }
.lightbox::backdrop { background: rgba(24, 16, 12, .84); }
.lightbox-inner { position: relative; }
.lightbox video { width: 100%; aspect-ratio: 9 / 16; max-height: 86vh; border-radius: 18px; background: #000; object-fit: contain; }
.lightbox-close {
  position: absolute; top: -3.2rem; inset-inline-end: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center;
}
.lightbox-close svg { width: 1.2rem; height: 1.2rem; }
.lightbox-close:focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
