/* =========================================================
   EMESE: print-shop palette, paper + process inks (CMYK)
   ========================================================= */
:root {
  /* fixed brand colours */
  --paper: #f4efe6;
  --ink: #141414;
  --c: #00aeef;
  --m: #ec008c;
  --y: #ffe500;

  /* theme tokens (light) */
  --bg: #f4efe6;
  --surface: #ebe4d7;
  --fg: #141414;
  --fg-soft: #4a4740;
  --line: rgba(20, 20, 20, .14);
  --edge: #141414;          /* card borders + offset shadows */
  --block: #141414;         /* dark blocks: studio, marquee, footer */
  --block-line: transparent;
  --grain: .35;

  --f-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Alexandria", system-ui, sans-serif;
  --f-brand: "DM Serif Display", Georgia, serif;

  --r: 22px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121110;
  --surface: #1c1b18;
  --fg: #f1ebe0;
  --fg-soft: #b1a99b;
  --line: rgba(241, 235, 224, .14);
  --edge: #f1ebe0;
  --block: #1a1917;
  --block-line: rgba(241, 235, 224, .12);
  --grain: 0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: clip;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: var(--grain); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
::selection { background: var(--m); color: #fff; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
/* Arabic display type has tall ascenders and deep descenders: give lines room. */
h1, h2, h3 { font-family: var(--f-display); line-height: 1.35; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--m); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 200; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { inset-inline-start: 8px; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--fg); --b-fg: var(--bg); --b-bd: var(--fg); --b-sh: var(--m);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 16px/1 var(--f-display);
  padding: 16px 26px; border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg);
  border: 2px solid var(--b-bd);
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s;
}
.btn:hover { transform: translate(3px, -3px); box-shadow: -4px 4px 0 0 var(--b-sh); }
.btn:active { transform: none; box-shadow: none; }
.btn-ghost { --b-bg: transparent; --b-fg: var(--fg); --b-sh: var(--fg); }
.btn-y { --b-bg: var(--y); --b-fg: var(--ink); --b-bd: var(--y); --b-sh: var(--m); }
.btn-ghost-light { --b-bg: transparent; --b-fg: var(--paper); --b-bd: rgba(244,239,230,.5); --b-sh: var(--c); }
.btn-ghost-light:hover { border-color: var(--paper); }
.btn-sm { padding: 11px 20px; font-size: 15px; }
.btn-block { width: 100%; }

.arr::before { content: "←"; }
[dir="ltr"] .arr::before { content: "→"; }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: baseline; text-decoration: none; direction: ltr; }
.brand-word { font: 400 31px/1 var(--f-brand); letter-spacing: -.01em; }
.brand-dot { display: inline-block; width: 7px; height: 7px; margin-inline-start: 3px; background: var(--m); border-radius: 50%; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; font-weight: 500; position: relative; }
.nav-links a::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; background: var(--m); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px;
  background: transparent; color: var(--fg); border: 1.5px solid var(--line); cursor: pointer;
  font: 700 14px/1 var(--f-display); letter-spacing: .04em;
  transition: border-color .2s, background .2s;
}
.lang-toggle:hover { border-color: var(--fg); }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: var(--fg); border: 1.5px solid var(--line); cursor: pointer;
  transition: border-color .2s, transform .4s var(--ease);
}
.theme-toggle:hover { border-color: var(--fg); transform: rotate(-20deg); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- shared type ---------- */
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 14px/1.4 var(--f-display);
  color: var(--fg-soft);
  margin-bottom: 26px;
}
.k-num {
  font: 700 12px/1 var(--f-display);
  padding: 6px 9px; border-radius: 999px;
  border: 1.5px solid currentColor;
}
.kicker-light { color: rgba(244,239,230,.7); }
.reg {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; position: relative;
}
.reg::before, .reg::after { content: ""; position: absolute; background: currentColor; }
.reg::before { inset-inline-start: 50%; top: -5px; bottom: -5px; width: 1.5px; transform: translateX(-50%); }
.reg::after { top: 50%; left: -5px; right: -5px; height: 1.5px; transform: translateY(-50%); }

.hl {
  --hl: var(--m);
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 100% 82%;
  background-size: 0% .34em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: .06em;
  transition: background-size 1s .3s var(--ease);
}
.hl-y { --hl: var(--y); }
/* Colour instead of an underline bar, so nothing cuts through Arabic descenders. */
.hl-m, .hl-c { background: none; padding: 0; }
.hl-m { color: var(--m); }
.hl-c { color: #0090c8; }
:root[data-theme="dark"] .hl-c { color: var(--c); }
.reveal.in .hl, .hl.in { background-size: 100% .34em; }
.studio .hl-y { color: var(--ink); background-position: 100% 55%; padding-inline: .14em; }
.studio .reveal.in .hl-y { background-size: 100% 1.2em; }

.section { padding: clamp(80px, 12vw, 150px) var(--gutter); max-width: var(--max); margin: 0 auto; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 760px; }
.section-head h2, .studio-head h2, .contact h2 { font-size: clamp(36px, 5.6vw, 70px); font-weight: 900; line-height: 1.55; }
.sub { margin-top: 24px; font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-soft); max-width: 560px; }

[lang="en"] .hero h1 { font-size: clamp(40px, 5.6vw, 82px); line-height: 1.08; letter-spacing: -.02em; }
[lang="en"] .step h3::before { content: counter(s); }
[lang="en"] .section-head h2, [lang="en"] .studio-head h2, [lang="en"] .contact h2 { line-height: 1.15; letter-spacing: -.02em; }
[lang="en"] .step h3, [lang="en"] .m-name { line-height: 1.25; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px);
  min-height: calc(100svh - 70px);
  padding: 48px var(--gutter) 72px;
  max-width: 1360px; margin: 0 auto;
}
.hero h1 { font-size: clamp(42px, 6.8vw, 96px); font-weight: 900; line-height: 1.65; }
.lead { margin-top: 30px; font-size: clamp(17px, 1.5vw, 20px); color: var(--fg-soft); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 38px; }

/* Proof card: real product photos with the logo composited in. */
.proof {
  position: relative; width: 100%; max-width: 460px; justify-self: center;
  background: var(--surface); border-radius: 28px; padding: 14px 14px 16px;
}
.crop { position: absolute; width: 20px; height: 20px; border: 0 solid var(--fg-soft); opacity: .7; }
.c-tl { top: -12px; left: -12px; border-top-width: 1.5px; border-left-width: 1.5px; }
.c-tr { top: -12px; right: -12px; border-top-width: 1.5px; border-right-width: 1.5px; }
.c-bl { bottom: -12px; left: -12px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.c-br { bottom: -12px; right: -12px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.proof-photo { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #b9b4ac; }
/* one product per frame; the browser's own scrolling moves it, snapping to each shot */
.proof-track {
  display: flex; width: 100%; height: 100%;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; touch-action: pan-x pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  transition: opacity .17s ease; outline: none;
}
.proof-track::-webkit-scrollbar { display: none; }
.proof-track:focus-visible { box-shadow: inset 0 0 0 3px var(--m); }
.proof-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.proof-track.jump { opacity: 0; }
.proof-slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.proof-slide img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.proof-id {
  position: absolute; top: 12px; inset-inline-end: 12px;
  font: 600 10.5px/1 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .16em; direction: ltr;
  color: rgba(20,20,20,.65); background: rgba(244,239,230,.75); padding: 6px 8px; border-radius: 6px;
  backdrop-filter: blur(6px);
}
.proof-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 6px 0; }
.proof-label { font: 700 15px/1.4 var(--f-display); min-height: 1.4em; }
.proof-dots { display: flex; flex-wrap: wrap; gap: 3px; direction: ltr; justify-content: flex-end; max-width: 60%; }
.proof-dots button { width: 9px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.proof-dots button::before { content: ""; position: absolute; left: 2px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s var(--ease); }
.proof-dots button:hover::before { background: var(--fg-soft); }
.proof-dots button.on::before { background: var(--fg); transform: scale(1.5); }
.proof-bottom { flex-wrap: wrap; }
@media (max-width: 520px) {
  .proof-dots { max-width: none; width: 100%; flex-wrap: nowrap; justify-content: center; gap: 1px; }
  .proof-bottom { justify-content: center; text-align: center; }
}
.proof-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(244,239,230,.82); backdrop-filter: blur(6px);
  display: grid; place-items: center; opacity: 0; transition: opacity .3s, transform .2s var(--ease);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.proof-nav span { width: 10px; height: 10px; border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.proof-nav.prev { inset-inline-start: 10px; }
.proof-nav.next { inset-inline-end: 10px; }
.proof-nav.prev span { transform: translateX(2px) rotate(-45deg); }
.proof-nav.next span { transform: translateX(-2px) rotate(135deg); }
[dir="rtl"] .proof-nav.prev span { transform: translateX(-2px) rotate(135deg); }
[dir="rtl"] .proof-nav.next span { transform: translateX(2px) rotate(-45deg); }
.proof-photo:hover .proof-nav, .proof-nav:focus-visible { opacity: 1; }
.proof-nav:hover { transform: scale(1.06); }
@media (hover: none) { .proof-nav { opacity: .9; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 36px; }
  .proof { max-width: 340px; margin-top: 8px; }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; background: var(--block); color: var(--paper);
  padding: 18px 0; transform: rotate(-1.5deg); margin: 10px -20px;
  border-block: 3px solid var(--y);
}
.marquee-track {
  display: flex; gap: 28px; width: max-content; align-items: center;
  font: 800 clamp(22px, 3vw, 34px)/1.4 var(--f-display);
  animation: marquee 40s linear infinite;
}
.marquee-track i { color: var(--m); font-style: normal; font-size: .7em; }
.marquee-track span:nth-of-type(3n+2) { color: var(--y); }
.marquee-track span:nth-of-type(3n) { color: var(--c); }
@keyframes marquee { to { transform: translateX(50%); } }
@keyframes marquee-ltr { to { transform: translateX(-50%); } }
[dir="ltr"] .marquee-track { animation-name: marquee-ltr; }

/* =========================================================
   PRODUCTS
   ========================================================= */
.grid { display: grid; gap: 18px; }
.products { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  --accent: var(--c);
  position: relative; overflow: hidden;
  background: var(--bg);
  border: 2px solid var(--edge); border-radius: var(--r);
  padding: 30px 28px 28px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card::before {
  content: ""; position: absolute; z-index: 0;
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--accent);
  top: -130px; left: -110px;
  transition: transform .6s var(--ease);
}
.card:hover { transform: translate(4px, -4px); box-shadow: -8px 8px 0 var(--edge); }
.card:hover::before { transform: scale(1.35); }
.card > * { position: relative; z-index: 1; }
.card-photo { padding: 12px 12px 22px; }
.card-photo::before { display: none; }
.card-img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 14px; margin-bottom: 20px; background: #b9b4ac; }
.card-photo h3, .card-photo p, .card-photo .chips { margin-inline: 10px; }
.card-photo h3::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-inline-end: 10px; transform: translateY(-2px); }
.ico { width: 54px; height: 54px; fill: none; stroke: var(--fg); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 26px; }
.card h3 { font-size: 23px; font-weight: 800; margin-bottom: 10px; line-height: 1.45; }
.card p { color: var(--fg-soft); font-size: 16px; }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 600 13px/1 var(--f-display); padding: 7px 12px; border: 1.5px solid var(--fg); border-radius: 999px; }
.card-wild { background: var(--ink); color: var(--paper); }
.card-wild::before { background: var(--m); }
.card-wild .ico { stroke: var(--paper); }
.card-wild p { color: rgba(244,239,230,.75); }
.link { display: inline-block; margin-top: 20px; font: 700 16px var(--f-display); color: var(--y); text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 5px; }
.card-photo .link { color: var(--fg); margin-top: 14px; padding-bottom: 3px; border-bottom: 2px solid var(--accent, var(--m)); }
.card-photo .link:hover { text-decoration: none; border-bottom-color: var(--fg); }

/* ---------- the full range ---------- */
.everything { margin-top: clamp(70px, 9vw, 120px); }
.ev-head { max-width: 720px; margin-bottom: 28px; }
.ev-title { font-size: clamp(30px, 4.4vw, 54px); font-weight: 900; line-height: 1.45; }
[lang="en"] .ev-title { line-height: 1.15; }
.ev-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-block: 2px solid var(--fg); background: var(--bg); }
@media (min-width: 900px) { .ev-bar { position: sticky; top: 70px; z-index: 5; } }
@media (max-width: 700px) {
  .ev-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); width: calc(100% + var(--gutter) * 2); }
  .ev-filters::-webkit-scrollbar { display: none; }
  .ev-chip { flex: none; }
}
.ev-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 14px/1 var(--f-display); color: var(--fg); background: transparent;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 13px; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.ev-chip small { font: 700 11px/1 var(--f-display); opacity: .55; }
.ev-chip:hover { border-color: var(--fg); }
.ev-chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.ev-count { font: 600 13px var(--f-display); color: var(--fg-soft); }
.ev-groups { columns: 3 300px; column-gap: 34px; padding-top: 30px; }
.ev-group { break-inside: avoid; margin-bottom: 34px; scroll-margin-top: 92px; }
@media (min-width: 900px) { .ev-group { scroll-margin-top: 200px; } }
.ev-group h3 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; line-height: 1.5; }
.ev-group h3 span { font: 700 11px/1 var(--f-display); padding: 5px 8px; border-radius: 999px; background: var(--surface); color: var(--fg-soft); }
.ev-group ul { list-style: none; margin: 0; padding: 0; }
.ev-note { margin: 0 0 6px; font-size: 14px; line-height: 1.6; color: var(--fg-soft); }
.ev-group li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ev-name { font-weight: 600; font-size: 16px; line-height: 1.5; }
.ev-tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.ev-tags i { font: 600 11px/1 var(--f-display); font-style: normal; color: var(--fg-soft); background: var(--surface); padding: 4px 7px; border-radius: 6px; }
.ev-tags i.on { background: var(--y); color: var(--ink); }
.ev-try {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font: 700 12.5px/1 var(--f-display); color: var(--ink); background: var(--y);
  border: 0; border-radius: 999px; padding: 9px 12px; cursor: pointer; white-space: nowrap;
}
.ev-try:hover { background: var(--m); color: #fff; }
.ev-more { margin: 0; color: var(--fg-soft); }
.ev-more a { color: var(--fg); font-weight: 700; text-underline-offset: 4px; }

/* collapsed by default: group names + one button; the list opens underneath */
.ev-teaser {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  padding: 22px 0; border-block: 2px solid var(--fg);
}
.ev-peek { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 520px; }
.ev-peek button {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: 600 14px/1 var(--f-display); color: var(--fg); background: var(--surface);
  border: 1.5px solid transparent; border-radius: 999px; padding: 9px 13px;
  transition: border-color .2s, background .2s;
}
.ev-peek button small { font: 700 11px/1 var(--f-display); opacity: .55; }
.ev-peek button:hover { border-color: var(--fg); background: transparent; }
.ev-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  font: 800 17px/1 var(--f-display); color: var(--ink); background: var(--y);
  border: 2px solid var(--ink); border-radius: 999px; padding: 15px 22px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
}
.ev-toggle:hover { transform: translate(3px, -3px); box-shadow: -4px 4px 0 0 var(--m); }
.ev-toggle small { font: 700 12px/1 var(--f-display); padding: 5px 8px; border-radius: 999px; background: var(--ink); color: var(--y); }
.ev-toggle .chev, .ev-close::after {
  width: 9px; height: 9px; border: solid currentColor; border-width: 0 2.5px 2.5px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform .35s var(--ease);
}
.ev-toggle .chev { display: inline-block; }
.everything.open .ev-toggle { background: transparent; color: var(--fg); border-color: var(--fg); }
.everything.open .ev-toggle small { background: var(--fg); color: var(--bg); }
.everything.open .ev-toggle .chev { transform: translateY(2px) rotate(-135deg); }
@media (max-width: 700px) {
  .ev-peek { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); width: calc(100% + var(--gutter) * 2); flex-basis: auto; }
  .ev-peek::-webkit-scrollbar { display: none; }
  .ev-peek li { flex: none; }
  .ev-toggle { width: 100%; justify-content: center; }
}
.ev-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.ev-body-inner { min-height: 0; overflow: hidden; overflow: clip; opacity: 0; transition: opacity .35s var(--ease); }
.everything.open .ev-body { grid-template-rows: 1fr; }
.everything.open .ev-body-inner { opacity: 1; }
.everything.open .ev-teaser { border-bottom-color: transparent; padding-bottom: 6px; }
.ev-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0 4px; border-top: 2px solid var(--fg); }
.ev-close {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font: 700 14px/1 var(--f-display); color: var(--fg); background: transparent;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 16px;
}
.ev-close::after { content: ""; display: inline-block; transform: translateY(2px) rotate(-135deg); }
.ev-close:hover { border-color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .ev-body, .ev-body-inner { transition: none; } }

/* =========================================================
   STUDIO (3D): dark in both themes
   ========================================================= */
.studio {
  background: var(--block); color: var(--paper);
  padding: clamp(80px, 11vw, 140px) var(--gutter);
  border-radius: clamp(24px, 4vw, 48px);
  border: 1px solid var(--block-line);
  margin: 0 clamp(8px, 1.5vw, 20px);
  position: relative; overflow: hidden;
}
.studio::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(244,239,230,.08) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.studio-head { max-width: var(--max); margin: 0 auto 48px; position: relative; }
.studio-head .sub { color: rgba(244,239,230,.7); }
.studio-launch {
  max-width: var(--max); margin: 0 auto; position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px;
}
.btn-lg { padding: 20px 34px; font-size: 18px; }
.launch-thumbs { display: flex; }
.launch-thumbs img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 3px solid var(--block); margin-inline-start: -14px; background: #3a3631; }
.launch-thumbs img:first-child { margin-inline-start: 0; }
.launch-note { font: 600 14px var(--f-display); color: rgba(244,239,230,.6); }
.studio.open .studio-launch .launch-thumbs, .studio.open .studio-launch .launch-note { display: none; }
.studio.open .studio-launch { margin-bottom: 32px; }
.studio.open #studioOpen { --b-bg: transparent; --b-fg: var(--paper); --b-bd: rgba(244,239,230,.5); }
.studio-body[hidden] { display: none !important; }
.studio-body { animation: studio-in .6s var(--ease); scroll-margin-top: 90px; }
@keyframes studio-in { from { opacity: 0; transform: translateY(18px); } }
.panel-close {
  align-self: flex-end; margin-bottom: -8px; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1.5px solid rgba(244,239,230,.22); color: rgba(244,239,230,.75);
  font: 600 13px var(--f-display); padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.panel-close:hover { color: var(--paper); border-color: var(--paper); }
.prod-tabs { margin-bottom: 12px; }
.studio-body {
  max-width: var(--max); margin: 0 auto; position: relative;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: stretch;
}
.stage-wrap {
  position: sticky; top: 90px; align-self: start;
  border-radius: var(--r); overflow: hidden;
  background: #2a2724;
  border: 1px solid rgba(244,239,230,.12);
  aspect-ratio: 1;
}
.mock-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.mock-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--m); }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,19,17,.35); opacity: 0; pointer-events: none; transition: opacity .3s; }
.stage-loading.on { opacity: 1; }
.stage-loading i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(244,239,230,.25); border-top-color: var(--y); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-hint {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  font: 600 12.5px var(--f-display); color: var(--paper); white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; background: rgba(20,20,20,.55); backdrop-filter: blur(6px);
  pointer-events: none; transition: opacity .6s; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}
.stage-hint.hide { opacity: 0; }
.stage-tag {
  position: absolute; top: 16px; inset-inline-start: 16px;
  font: 700 13px var(--f-display); background: var(--y); color: var(--ink);
  padding: 7px 13px; border-radius: 999px; pointer-events: none;
}
.stage-tag:empty { display: none; }
.stage-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: rgba(244,239,230,.75); }

.panel {
  background: #1f1e1b; border: 1px solid rgba(244,239,230,.12); border-radius: var(--r);
  padding: 26px; display: flex; flex-direction: column; gap: 22px;
}
.panel fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.panel legend { font: 700 14px var(--f-display); color: rgba(244,239,230,.6); margin-bottom: 12px; padding: 0; }
.panel .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  font: 600 14.5px/1 var(--f-display); color: var(--paper);
  background: transparent; border: 1.5px solid rgba(244,239,230,.25);
  padding: 11px 15px; border-radius: 999px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.seg button:hover:not(:disabled) { border-color: var(--paper); }
.seg button[aria-checked="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.seg button:disabled { opacity: .3; cursor: not-allowed; text-decoration: line-through; }
.tech-note { margin-top: 12px; font-size: 14.5px; color: rgba(244,239,230,.7); line-height: 1.7; min-height: 3.4em; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatches button {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 2px solid rgba(244,239,230,.25);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.swatches button:hover { transform: scale(1.12); }
.swatches button:disabled { opacity: .3; cursor: not-allowed; transform: none; }
.swatches button[aria-checked="true"] { box-shadow: 0 0 0 3px #1f1e1b, 0 0 0 5px var(--paper); }

.prod-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
@media (max-width: 420px) { .prod-grid { grid-template-columns: repeat(4, 1fr); } }
.prod-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 8px;
  background: rgba(244,239,230,.04); border: 1.5px solid rgba(244,239,230,.16); border-radius: 14px;
  color: var(--paper); font: 600 11.5px/1.3 var(--f-display); cursor: pointer; text-align: center;
  transition: border-color .2s, background .2s;
}
.prod-grid button img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; background: #3a3631; }
.prod-grid button:hover { border-color: rgba(244,239,230,.5); }
.prod-grid button[aria-checked="true"] { border-color: var(--y); background: rgba(255,229,0,.08); }
.design-row { margin-top: 12px; display: grid; gap: 10px; }
.design-row[hidden] { display: none; }
.upload { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 14px; border: 1.5px dashed rgba(244,239,230,.4); color: var(--paper); font: 700 14px var(--f-display); cursor: pointer; }
.upload:hover { border-color: var(--y); color: var(--y); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.muted { color: rgba(244,239,230,.55); font-size: 13px; line-height: 1.6; }
.text-in { font: 800 20px var(--f-display); color: var(--paper); background: transparent; border: 2px solid rgba(244,239,230,.25); border-radius: 14px; padding: 11px 14px; width: 100%; }
.text-in:focus { outline: none; border-color: var(--m); }
.seg-sm button { padding: 8px 12px; font-size: 13px; }
.range { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; margin-top: 12px; font: 600 13px var(--f-display); color: rgba(244,239,230,.7); }
.range input { width: 100%; accent-color: var(--y); }
.swatches .sw-original { background: conic-gradient(var(--c), var(--m), var(--y), var(--c)); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font: 600 14px var(--f-display); }
.field input, .field select, .field textarea {
  font: 500 17px var(--f-body); color: inherit;
  background: transparent; border: 2px solid var(--line); border-radius: 14px;
  padding: 13px 16px; width: 100%;
  transition: border-color .2s;
}
.field select option { background: var(--bg); color: var(--fg); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--m); }
.panel .field input { border-color: rgba(244,239,230,.25); font: 800 22px var(--f-display); }
.panel .field > span { color: rgba(244,239,230,.6); font-weight: 500; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.panel-actions .btn { flex: 1 1 auto; }

@media (max-width: 960px) {
  .studio-body { grid-template-columns: 1fr; }
  .stage-wrap { position: relative; top: auto; width: 100%; max-width: 640px; justify-self: center; }
}
@media (max-width: 420px) {
  .panel .two { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .stage-hint { white-space: normal; text-align: center; width: calc(100% - 32px); border-radius: 14px; font-size: 12px; }
}

/* =========================================================
   STEPS
   ========================================================= */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.steps-visual { position: sticky; top: 110px; }
.sv-card {
  --tone: var(--c);
  aspect-ratio: 1; border-radius: 32px; border: 2px solid var(--edge);
  background: var(--tone); position: relative; overflow: hidden;
  transition: background .6s var(--ease);
  box-shadow: -10px 10px 0 var(--edge);
}
.sv-num {
  position: absolute; top: 22px; inset-inline-start: 28px;
  font: 900 clamp(60px, 9vw, 120px)/1 var(--f-display); color: var(--ink);
  opacity: .9;
}
.sv-art { position: absolute; inset: 16% 12% 14%; display: grid; place-items: center; }
.sv-art svg { width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.sv-art svg .fill-p { fill: var(--paper); }
.sv-art svg .fill-k { fill: var(--ink); }
.sv-art svg .fill-m { fill: var(--m); }
.sv-art svg .fill-y { fill: var(--y); }
.sv-art svg .fill-c { fill: var(--c); }
.sv-art svg .draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s var(--ease) forwards; }
.sv-art .pop { animation: pop .7s var(--ease) both; transform-box: fill-box; transform-origin: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.sv-bar { position: absolute; bottom: 22px; inset-inline: 28px; height: 6px; border-radius: 6px; background: rgba(20,20,20,.18); overflow: hidden; }
.sv-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--ink); border-radius: 6px; transition: width .6s var(--ease); }

.steps-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step {
  counter-increment: s;
  padding: 34px 0; border-top: 2px solid var(--line);
  min-height: 46vh; display: flex; flex-direction: column; justify-content: center;
  opacity: .32; transition: opacity .5s var(--ease);
}
.step:last-child { border-bottom: 2px solid var(--line); }
.step.active { opacity: 1; }
.step h3 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 900; margin-bottom: 14px; display: flex; align-items: center; gap: 14px; line-height: 1.4; }
.step h3::before {
  content: counter(s, arabic-indic);
  font-size: 15px; font-weight: 700; width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--fg);
}
.step.active h3::before { background: var(--fg); color: var(--bg); }
.step p { font-size: 19px; color: var(--fg-soft); max-width: 460px; }

@media (max-width: 820px) {
  /* Small sticky card beside the list so it never covers the text. */
  .steps { grid-template-columns: 1fr 96px; gap: 16px; }
  .steps-visual { grid-column: 2; grid-row: 1; top: 84px; }
  .steps-list { grid-column: 1; grid-row: 1; }
  .sv-card { box-shadow: -4px 4px 0 var(--edge); border-radius: 18px; }
  .sv-num { font-size: 22px; top: 10px; inset-inline-start: 12px; }
  .sv-art { inset: 30% 12% 22%; }
  .sv-bar { bottom: 10px; inset-inline: 12px; height: 4px; }
  .step { min-height: 0; padding: 28px 0; }
  .step p { font-size: 17px; }
}

/* =========================================================
   MACHINES
   ========================================================= */
.machines { border-top: 2px solid var(--fg); }
.machine { border-bottom: 2px solid var(--fg); --accent: var(--c); }
.machine summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(110px, 200px) 1fr auto; align-items: center; gap: 20px;
  padding: 26px 4px;
  transition: padding .4s var(--ease);
}
.machine summary::-webkit-details-marker { display: none; }
.machine summary:hover { padding-inline-start: 18px; }
.m-code {
  font: 800 clamp(14px, 1.6vw, 18px)/1 var(--f-display); letter-spacing: .04em; direction: ltr;
  justify-self: start;
  padding: 9px 14px; border-radius: 10px;
  background: var(--accent); color: var(--ink);
}
.machine-k .m-code { background: var(--fg); color: var(--bg); }
.m-name { font: 800 clamp(24px, 3.4vw, 42px)/1.45 var(--f-display); }
.m-plus { width: 38px; height: 38px; border: 2px solid var(--fg); border-radius: 50%; position: relative; transition: transform .4s var(--ease), background .3s; }
.m-plus::before, .m-plus::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; background: var(--fg); transform: translate(-50%, -50%); }
.m-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.machine[open] .m-plus { transform: rotate(45deg); background: var(--y); border-color: var(--ink); }
.machine[open] .m-plus::before, .machine[open] .m-plus::after { background: var(--ink); }
.m-body { padding: 0 4px 30px; display: grid; gap: 12px; }
@media (min-width: 700px) { .m-body { padding-inline-start: 220px; } }
.m-body p { font-size: 18px; color: var(--fg-soft); }
.m-on { font-size: 16px !important; color: var(--fg) !important; }
.machine[open] .m-body { animation: open .5s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 560px) {
  .machine summary { grid-template-columns: 1fr auto; gap: 10px 14px; }
  .m-code { grid-row: 1; grid-column: 1; }
  .m-name { grid-column: 1; }
  .m-plus { grid-row: 1 / span 2; grid-column: 2; }
}

/* =========================================================
   CONTACT + FOOTER
   ========================================================= */
.contact {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(80px, 11vw, 140px) var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: start;
}
.contact-form {
  display: grid; gap: 18px;
  background: var(--bg); border: 2px solid var(--edge); border-radius: 28px;
  padding: clamp(22px, 3vw, 36px); box-shadow: -10px 10px 0 var(--m);
}
.contact-form .row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%), linear-gradient(-45deg, transparent 50%, var(--fg) 50%); background-position: 18px 55%, 24px 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field textarea { resize: vertical; min-height: 110px; }
@media (max-width: 820px) {
  .contact { grid-template-columns: 1fr; }
  .contact-form .row { grid-template-columns: 1fr; }
}

.footer { background: var(--block); color: var(--paper); padding: clamp(48px, 7vw, 80px) var(--gutter) 28px; border-top: 1px solid var(--block-line); }
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 32px; align-items: start;
  padding-bottom: 40px; border-bottom: 1px solid rgba(244,239,230,.14);
}
.footer .brand-word { font-size: 44px; }
.footer .brand-dot { width: 10px; height: 10px; margin-inline-start: 4px; }
.footer-brand p { margin-top: 16px; color: rgba(244,239,230,.7); line-height: 1.8; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { text-decoration: none; color: rgba(244,239,230,.82); width: fit-content; }
.footer-links a:hover { color: var(--y); }
.footer-bottom { max-width: var(--max); margin: 0 auto; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: rgba(244,239,230,.55); }
.footer-bottom a { text-decoration: none; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
