/* =========================================================
   EL JAMLI SAAD — Architecte · Agadir
   ========================================================= */

:root {
  --bg: #EFE7DB;
  --paper: #F7F2EA;
  --ink: #1E1B18;
  --ink-2: #5A5249;
  --muted: #8A8076;
  --terra: #B8603E;
  --clay: #D08A5E;
  --olive: #6E7358;
  --night: #15130F;
  --night-2: #0F0D0B;
  --line: rgba(30, 27, 24, .14);
  --line-light: rgba(247, 242, 234, .16);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-loading, html.lb-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--terra); color: var(--paper); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.section { position: relative; padding: clamp(96px, 14vw, 180px) 0; }

.label {
  display: flex; align-items: center; gap: .9em;
  margin: 0 0 1.6rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--terra);
}
.label::before { content: ""; width: 32px; height: 1px; background: currentColor; }

.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 5.6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.015em;
}
.title em, .title-sm em, .hero-title em { font-style: italic; color: var(--terra); }

.lead { font-size: clamp(1.08rem, 1.4vw, 1.25rem); color: var(--ink); }
.section-intro { max-width: 26em; color: var(--ink-2); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .75em;
  padding: 1.05em 1.7em;
  border-radius: 999px;
  font-size: .9rem; font-weight: 500; letter-spacing: .02em;
  transition: color .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
  white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: var(--terra);
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: none; }
.btn .arrow { transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-sm { padding: .75em 1.25em; font-size: .82rem; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-ghost { border: 1px solid var(--ink); }
.btn-ghost:hover { color: var(--paper); border-color: var(--terra); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { color: var(--paper); }
.btn-outline-light { border: 1px solid var(--line-light); color: var(--paper); }
.btn-outline-light:hover { border-color: var(--terra); }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: var(--night); color: var(--paper);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-io);
}
.js.is-ready .loader { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader-logo { position: relative; width: min(250px, 58vw); aspect-ratio: 698 / 546; transition: transform 1.1s var(--ease-io), opacity .8s ease; }
.js.is-ready .loader-logo { transform: translateY(-40px); opacity: 0; }
.loader-logo img, .loader-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader-logo img { clip-path: inset(0 100% 0 0); animation: wipe 1.1s var(--ease-io) .75s forwards; }
.loader-logo .draw { fill: none; stroke: var(--clay); stroke-width: 16; stroke-linejoin: miter; transition-duration: 1.1s; }
.loader-bar { width: min(250px, 58vw); height: 1px; background: rgba(247, 242, 234, .12); overflow: hidden; }
.loader-bar span { display: block; height: 100%; background: var(--clay); transform-origin: left; transform: scaleX(0); animation: grow 1.9s var(--ease-io) .1s forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes rise { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 2px; background: var(--terra);
  transform-origin: left; transform: scaleX(var(--p, 0));
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: transform .7s var(--ease), background-color .4s, padding .4s var(--ease), border-color .4s, color .4s;
}
.nav.is-scrolled {
  padding-block: 14px;
  background: rgba(239, 231, 219, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-110%); }
.menu-open .nav { background: transparent; border-color: transparent; color: var(--paper); transform: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

.logo { position: relative; display: block; flex-shrink: 0; height: 52px; aspect-ratio: 698 / 546; transition: height .4s var(--ease), transform .6s var(--ease); }
.logo:hover { transform: translateY(-2px); }
.nav.is-scrolled .logo { height: 42px; }
.logo-img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .4s; }
.logo-l { opacity: 0; }
.menu-open .logo-l { opacity: 1; }
.menu-open .logo-d { opacity: 0; }

.nav-links { display: flex; gap: clamp(18px, 2.4vw, 36px); font-size: .9rem; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--terra); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }

.nav-right { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; }
.lang span { opacity: .35; }
.lang button { opacity: .45; transition: opacity .3s, color .3s; padding: 4px 2px; }
.lang button.is-active { opacity: 1; color: var(--terra); }
.lang button:hover { opacity: 1; }

.burger { display: none; width: 40px; height: 40px; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 23px; }
.menu-open .burger span:first-child { top: 19.5px; transform: rotate(45deg); }
.menu-open .burger span:last-child { top: 19.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
  padding: 100px var(--gutter) 40px;
  background: var(--night); color: var(--paper);
  clip-path: circle(0% at calc(100% - 40px) 40px);
  transition: clip-path .9s var(--ease-io), visibility 0s linear .9s;
  visibility: hidden;
}
.menu-open .menu { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; transition-delay: 0s; }
.menu-links { display: flex; flex-direction: column; gap: 6px; }
.menu-links a { display: flex; align-items: baseline; gap: 18px; overflow: hidden; font-family: var(--serif); font-size: clamp(2.4rem, 10vw, 4rem); line-height: 1.15; }
.menu-links a > span { display: inline-block; transform: translateY(110%); transition: transform .8s var(--ease) calc(.25s + var(--i) * .06s); }
.menu-links a .mono { color: var(--clay); }
.menu-open .menu-links a > span { transform: none; }
.menu-foot { color: rgba(247, 242, 234, .5); }

/* ---------- Reveal system ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease-io); }
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }

.sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.sw > span { display: inline-block; }
.js [data-split] .sw > span { transform: translateY(115%); transition: transform 1.15s var(--ease); transition-delay: calc(var(--i) * 70ms + var(--d, 0ms)); }
.js [data-split].is-in .sw > span { transform: none; }

.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.8s var(--ease) var(--dd, 0s); }
.is-in .draw, .draw.is-in { stroke-dashoffset: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 130px 0 110px; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; opacity: .7; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 72% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 72% 50%, #000 10%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-title {
  margin: 0 0 .45em;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.1rem, 7.4vw, 7.4rem);
  line-height: .98; letter-spacing: -.025em;
}
.hero-sub { max-width: 32em; margin: 0; font-size: clamp(1rem, 1.25vw, 1.12rem); color: var(--ink-2); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.4rem; }

.hero-art { position: relative; }
.hero-arch {
  position: absolute; inset: 2% 8% 12%;
  overflow: hidden;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--paper), rgba(247, 242, 234, .3));
  box-shadow: inset 0 0 0 1px var(--line);
}
/* sketch → render: the photo wipes up once the line drawing is done */
.hero-photo { position: absolute; inset: -4% 0; clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease-io) 3s; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 64% 50%; transform: scale(1.3); transition: transform 2.8s var(--ease) 3s; }
.hero-art.is-in .hero-photo { clip-path: inset(0 0 0 0); }
.hero-art.is-in .hero-photo img { transform: scale(1.04); }
.hero-drawing { position: relative; width: 100%; overflow: visible; transition: opacity 1.1s ease 3.3s; }
.hero-art.is-in .hero-drawing { opacity: 0; }
.hero-drawing .draw { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-drawing .draw.thin { stroke-width: 1; }
.hero-drawing .draw.accent { stroke: var(--terra); stroke-width: 1.8; }
.hero-drawing .dimline { stroke: var(--muted); }
.hero-drawing .dim { font-family: var(--mono); font-size: 11px; fill: var(--muted); letter-spacing: .08em; }
.hero-drawing [class^="fill-"], .hero-drawing .dim { opacity: 0; transition: opacity 1.4s ease 2.4s; }
.hero-drawing .fill-accent { fill: var(--terra); }
.hero-drawing .fill-glass { fill: var(--ink); }
.hero-drawing .fill-shade { fill: var(--ink); }
.hero-art.is-in .fill-accent { opacity: .9; }
.hero-art.is-in .fill-glass { opacity: .1; }
.hero-art.is-in .fill-shade { opacity: .12; }
.hero-art.is-in .dim { opacity: 1; }
.hero-tag { position: absolute; left: 8%; right: 8%; bottom: 0; height: 1.4em; margin: 0; color: var(--muted); }
.hero-tag span { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transform: translateY(8px); transition: opacity .8s ease, transform .8s var(--ease); }
.hero-art.is-in .ht-a { opacity: 1; transform: none; transition-delay: 1.2s; }
.hero-art.is-in .ht-b { opacity: 1; transform: none; transition-delay: 4.2s; color: var(--terra); }
.hero-art.is-in .ht-a { animation: tagOut .6s ease 3.6s forwards; }
@keyframes tagOut { to { opacity: 0; transform: translateY(-8px); } }

.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted);
}
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink); }
.scroll-cue i { position: relative; width: 1px; height: 44px; background: var(--line); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 45%; background: var(--terra); animation: cue 2.2s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(240%); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; background: var(--paper); border-block: 1px solid var(--line); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-group { display: flex; align-items: center; flex-shrink: 0; }
.marquee-group span { padding: 0 .55em; font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 3rem); font-weight: 300; white-space: nowrap; }
.marquee-group span:nth-child(4n+3) { font-style: italic; }
.marquee-group .dot { font-size: 1rem; color: var(--terra); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Studio ---------- */
.studio-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.studio-figure { position: relative; margin: 0; }
.studio-figure::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 3 / 4;
  border: 1px solid var(--terra); border-radius: 999px 999px 6px 6px;
  transform: translate(0, 0); opacity: 0;
  transition: transform 1.6s var(--ease) .6s, opacity 1s ease .6s;
}
.studio-figure:has(.studio-visual.is-in)::before { transform: translate(18px, -18px); opacity: .55; }
.studio-visual {
  position: relative; overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 6px 6px;
  background: #D9CFC3;
}
.studio-visual img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; object-position: 50% 30%; }
.studio-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sc-name { font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.studio-caption .mono { color: var(--muted); }

.studio-copy .title { margin-bottom: 2rem; }
.studio-copy p:not(.label) { max-width: 36em; color: var(--ink-2); }
.studio-copy .lead { color: var(--ink); }
.studio-copy strong { font-weight: 600; letter-spacing: .04em; }
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(24px, 3vw, 48px); margin-top: 2.8rem; }
.pillar { padding: 22px 0 8px; border-top: 1px solid var(--line); }
.pillar-num { font-family: var(--serif); font-style: italic; color: var(--terra); font-size: 1.1rem; }
.pillar h3 { margin: .2em 0 .35em; font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.pillar p { margin: 0; font-size: .93rem; }

/* ---------- Services ---------- */
.services { background: var(--night); color: var(--paper); overflow: hidden; }
.services .label { color: var(--clay); }
.services .title em { color: var(--clay); }
.services .section-intro { color: rgba(247, 242, 234, .6); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: clamp(48px, 7vw, 90px); }
.srv-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line-light); }
.srv {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 70px 1.25fr 1fr 50px; gap: 28px; align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--line-light);
}
.srv::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1;
  background: linear-gradient(90deg, rgba(208, 138, 94, .16), rgba(208, 138, 94, 0) 80%);
  transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease);
}
.srv:hover::before, .srv.is-active::before { transform: scaleX(1); }
.srv-num { color: var(--clay); }
.srv-title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.05; transition: transform .7s var(--ease), color .5s; }
.srv:hover .srv-title, .srv.is-active .srv-title { transform: translateX(14px); color: var(--clay); }
.srv-num { transition: color .5s; }
.srv.is-active .srv-num { color: var(--paper); }
.srv-desc { margin: 0; color: rgba(247, 242, 234, .62); font-size: .95rem; }
.srv-icon {
  display: grid; place-items: center; width: 50px; height: 50px;
  border: 1px solid var(--line-light); border-radius: 50%;
  transition: transform .7s var(--ease), background-color .5s, border-color .5s;
}
.srv:hover .srv-icon, .srv.is-active .srv-icon { transform: rotate(-45deg); background: var(--terra); border-color: var(--terra); }

/* ---------- Work (horizontal) ---------- */
.work { position: relative; background: var(--bg); }
.work-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 4vh, 48px); padding: 90px 0 40px; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.work-hint { margin: 0; color: var(--muted); }
.work-track { display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 44px); width: max-content; padding: 0 var(--gutter); will-change: transform; }
.card { flex: 0 0 auto; }
.card-lg { width: clamp(320px, 40vw, 640px); }
.card-sm { width: clamp(240px, 24vw, 380px); margin-top: clamp(24px, 9vh, 96px); }

.card-media {
  position: relative; display: block; width: 100%; overflow: hidden;
  aspect-ratio: 3 / 2; max-height: 52vh;
  padding: 0; border: 0; border-radius: 4px;
  background: #D9CFC3; cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.card-sm .card-media { aspect-ratio: 4 / 5; }
/* cm-par carries the scroll parallax, the img carries reveal + hover zoom */
.cm-par { position: absolute; inset: 0 -7%; will-change: transform; }
.cm-par img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.5s var(--ease), opacity 1.2s ease; }
.js .card .cm-par img { transform: scale(1.28); }
.js .card.is-in .cm-par img { transform: scale(1); }
.js .card.is-in .card-media:hover .cm-par img { transform: scale(1.05); }
.js .card .card-media { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease-io); }
.js .card.is-in .card-media { clip-path: inset(0 0 0 0); }
.card-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(30, 27, 24, .06); background: linear-gradient(180deg, transparent 60%, rgba(15, 13, 11, .28)); pointer-events: none; opacity: 0; transition: opacity .6s; }
.card-media:hover::after { opacity: 1; }

.is-duo .alt { opacity: 0; }
.is-duo:hover .alt, .is-duo.show-alt .alt { opacity: 1; }
.duo-dots { position: absolute; left: 16px; bottom: 16px; z-index: 2; display: flex; gap: 6px; }
.duo-dots i { width: 18px; height: 2px; background: rgba(247, 242, 234, .45); transition: background-color .5s, width .5s var(--ease); }
.duo-dots i:first-child, .is-duo:hover .duo-dots i:last-child, .is-duo.show-alt .duo-dots i:last-child { background: var(--paper); width: 28px; }
.is-duo:hover .duo-dots i:first-child, .is-duo.show-alt .duo-dots i:first-child { background: rgba(247, 242, 234, .45); width: 18px; }

.card-zoom {
  position: absolute; right: 16px; top: 16px; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--paper); color: var(--ink);
  font-size: 1.3rem; line-height: 1;
  transform: scale(0) rotate(-90deg); transition: transform .6s var(--ease);
}
.card-media:hover .card-zoom, .card-media:focus-visible .card-zoom { transform: none; }

.card-info { display: flex; gap: 16px; padding-top: 16px; }
.card-num { color: var(--terra); padding-top: .5em; }
.card-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; }
.card-cat { margin: .3em 0 0; color: var(--muted); }

.card-end { display: flex; }
.card-end-inner {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  width: 100%; aspect-ratio: 4 / 5; max-height: 52vh;
  padding: 32px; border-radius: 4px;
  background: var(--ink); color: var(--paper);
}
.card-end-mark { position: absolute; top: 28px; right: 28px; width: 84px; fill: none; stroke: var(--clay); stroke-width: 18; transition: transform 1s var(--ease); }
.card-end:hover .card-end-mark { transform: translateY(-6px); }
.title-sm { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.05; }
.card-end .title-sm em { color: var(--clay); }
.card-end p { margin: 0 0 8px; color: rgba(247, 242, 234, .65); font-size: .95rem; }
.card-end .btn { align-self: flex-start; }

.work-progress { position: relative; height: 1px; background: var(--line); }
.work-progress::after { content: ""; position: absolute; inset: 0; background: var(--terra); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- Process ---------- */
.process { background: var(--paper); }
.process-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); }
.process-head { position: sticky; top: 130px; align-self: start; }
.process-head .title { margin-bottom: 1.6rem; }
.steps { position: relative; list-style: none; margin: 0; padding: 0 0 0 56px; }
.steps-line { position: absolute; left: 11px; top: 44px; bottom: 60px; width: 1px; background: var(--line); }
.steps-line span { position: absolute; inset: 0; background: var(--terra); transform-origin: top; transform: scaleY(var(--p, 0)); }
.step { position: relative; padding: 30px 0 42px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: -51px; top: 40px;
  width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid var(--ink-2); background: var(--paper);
  transition: background-color .5s, border-color .5s, transform .6s var(--ease), box-shadow .6s;
}
.step.is-active::before { background: var(--terra); border-color: var(--terra); transform: scale(1.25); box-shadow: 0 0 0 6px rgba(184, 96, 62, .14); }
.step-num { color: var(--terra); }
.step h3 { margin: .35em 0 .3em; font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 2.6vw, 2.3rem); line-height: 1.1; transition: color .5s; }
.step p { margin: 0; max-width: 32em; color: var(--ink-2); }
.step:not(.is-active) h3 { color: var(--ink-2); }

/* ---------- Agadir ---------- */
.agadir { background: var(--terra); color: var(--paper); overflow: hidden; }
.agadir .label, .label-light { color: rgba(247, 242, 234, .85); }
.agadir .title em { color: var(--night); }
.agadir-big {
  position: absolute; right: -2vw; top: 6%;
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(7rem, 22vw, 22rem); line-height: 1; white-space: nowrap;
  color: rgba(247, 242, 234, .1);
  pointer-events: none;
}
.feats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); margin-top: clamp(56px, 8vw, 100px); }
.feat { padding-top: 28px; border-top: 1px solid rgba(247, 242, 234, .3); }
.feat svg { width: 56px; height: 56px; margin-bottom: 20px; }
.feat .draw { fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition-duration: 1.6s; }
.feat .draw { transition-delay: calc(var(--d, 0ms) + 300ms + var(--dd, 0s)); }
.feat h3 { margin: 0 0 .4em; font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.1; }
.feat p { margin: 0; color: rgba(247, 242, 234, .82); }

/* ---------- Contact ---------- */
.contact { background: var(--night); color: var(--paper); padding-bottom: clamp(64px, 8vw, 110px); }
.contact .label { color: var(--clay); }
.contact .title em { color: var(--clay); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.contact .lead { max-width: 30em; margin: 1.8rem 0 2.4rem; color: rgba(247, 242, 234, .72); font-size: 1.08rem; }
.ct-list { margin: 0 0 2rem; display: grid; gap: 14px; }
.ct-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-light); }
.ct-list > div[hidden] { display: none; }
.ct-list dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(247, 242, 234, .5); padding-top: .25em; }
.ct-list dd { margin: 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; }
.ct-list a:hover { color: var(--clay); }
.ct-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ct-actions [hidden] { display: none; }

/* white card form: labels above, soft filled inputs, full-width pill button */
.ct-form {
  display: grid; gap: 20px;
  padding: 22px 22px 24px;
  border-radius: 16px;
  background: #fff; color: var(--ink);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .06);
}
.field { display: grid; gap: 8px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1px solid #E8DFD2; border-radius: 10px;
  background: #F8F3EC; color: var(--ink);
  font: inherit; font-size: 1rem;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.field select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%231E1B18' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: #DCCFBD; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; background: #fff;
  border-color: var(--clay); box-shadow: 0 0 0 4px rgba(208, 138, 94, .18);
}
.ct-submit {
  width: 100%; min-height: 54px; margin-top: 2px;
  border-radius: 999px;
  background: var(--clay); color: var(--ink);
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 12px 24px -10px rgba(184, 96, 62, .55);
  transition: background-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.ct-submit:hover { background: #C77C4F; transform: translateY(-2px); box-shadow: 0 16px 28px -10px rgba(184, 96, 62, .6); }
.ct-submit:active { transform: scale(.98); }
.form-status { min-height: 0; margin: -6px 0 0; font-size: .9rem; color: var(--terra); }
.form-status:empty { display: none; }
.form-status a { color: var(--terra); }

.map-frame {
  position: relative; overflow: hidden;
  margin: clamp(64px, 8vw, 110px) 0 0;
  height: clamp(300px, 42vw, 460px);
  border-radius: 6px;
  background: var(--night-2);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) sepia(.35) contrast(.95) brightness(.9); transition: filter 1s var(--ease); }
.map-frame:hover iframe { filter: none; }
.map-frame figcaption {
  position: absolute; left: 16px; bottom: 16px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--night); color: var(--paper);
  pointer-events: none;
}

/* ---------- Footer ---------- */
.footer { background: var(--night-2); color: var(--paper); padding: 72px 0 28px; overflow: hidden; }
.ft-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.ft-brand { display: flex; flex-direction: column; gap: 22px; }
.ft-brand img { width: 140px; height: auto; }
.ft-tag { margin: 0; max-width: 18em; font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; color: rgba(247, 242, 234, .8); }
.ft-links { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: .92rem; }
.ft-links a { color: rgba(247, 242, 234, .65); transition: color .3s; cursor: pointer; }
.ft-links a:hover { color: var(--clay); }
.ft-word { margin: clamp(40px, 7vw, 90px) 0 20px; overflow: hidden; }
.ft-word span {
  display: block; white-space: nowrap; text-align: center;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 11.2vw, 12rem); line-height: .9; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(247, 242, 234, .35);
  transition: opacity 1.4s var(--ease), transform 1.6s var(--ease), color 1.2s ease;
}
.js .ft-word span[data-reveal] { transform: translateY(60%); }
.js .ft-word span[data-reveal].is-in { transform: none; }
.ft-word:hover span { color: var(--terra); -webkit-text-stroke-color: var(--terra); }
.ft-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line-light); color: rgba(247, 242, 234, .5); }
.to-top:hover { color: var(--clay); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 110;
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center;
  padding: 72px 16px 32px;
  background: rgba(15, 13, 11, .96); color: var(--paper);
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lb-figure { grid-column: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.lb-stage { position: relative; width: 100%; display: flex; justify-content: center; touch-action: pan-y; }
.lb-img {
  max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100svh - 190px);
  border-radius: 4px; object-fit: contain;
  transform: scale(.94); opacity: 0; clip-path: inset(6% 6% 6% 6%);
  transition: transform .9s var(--ease), opacity .6s ease, clip-path .9s var(--ease-io);
}
.lightbox.is-open .lb-img.is-shown { transform: none; opacity: 1; clip-path: inset(0 0 0 0); }
.lb-img.is-leaving-l { transform: translateX(-40px); opacity: 0; transition-duration: .35s; }
.lb-img.is-leaving-r { transform: translateX(40px); opacity: 0; transition-duration: .35s; }
.lb-cap { display: flex; align-items: baseline; gap: 16px; }
.lb-count { color: var(--clay); }
.lb-title { font-family: var(--serif); font-size: 1.5rem; }
.lb-btn {
  display: grid; place-items: center; width: 52px; height: 52px; justify-self: center;
  border: 1px solid var(--line-light); border-radius: 50%;
  font-size: 1.1rem; transition: background-color .4s, border-color .4s, transform .5s var(--ease);
}
.lb-btn:hover { background: var(--terra); border-color: var(--terra); }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 16px; right: 16px; }
.lb-close:hover { transform: rotate(90deg); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; z-index: 80;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  display: flex; align-items: center;
  border-radius: 999px;
  background: #25D366; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(37, 211, 102, .6), 0 4px 12px rgba(0, 0, 0, .18);
  transition: opacity .4s ease, box-shadow .3s;
}
.js .wa-float { opacity: 0; transform: scale(0); pointer-events: none; }
.js.is-ready .wa-float { animation: waIn .9s var(--ease) 1.4s forwards; }
@keyframes waIn {
  0% { opacity: 0; transform: scale(0) rotate(-30deg); }
  100% { opacity: 1; transform: none; pointer-events: auto; }
}
.wa-icon { position: relative; display: grid; place-items: center; width: 58px; height: 58px; flex-shrink: 0; }
.wa-icon svg { width: 30px; height: 30px; fill: currentColor; transition: transform .5s var(--ease); }
.wa-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #25D366; pointer-events: none;
  animation: waPulse 2.6s ease-out 2.4s infinite;
  opacity: 0;
}
@keyframes waPulse { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
.wa-label {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-weight: 600; font-size: .92rem;
  transition: max-width .6s var(--ease), padding .6s var(--ease);
}
.wa-float.is-peek .wa-label { max-width: 260px; padding-left: 22px; }
@media (hover: hover) {
  .wa-float:hover .wa-label { max-width: 260px; padding-left: 22px; }
  .wa-float:hover .wa-icon svg { transform: rotate(-12deg) scale(1.08); }
  .wa-float:hover { box-shadow: 0 18px 36px -10px rgba(37, 211, 102, .7), 0 6px 14px rgba(0, 0, 0, .2); }
}
.wa-float:active .wa-icon svg { transform: scale(.9); }
.menu-open .wa-float, .lb-open .wa-float { opacity: 0 !important; pointer-events: none !important; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 120;
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid var(--clay); border-radius: 50%;
  pointer-events: none;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background-color .4s, opacity .3s;
  opacity: 0;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(208, 138, 94, .14); }

.magnetic { will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .burger { display: block; }
}

@media (max-width: 900px) {
  .nav-cta { display: none; }
  .logo { height: 44px; }
  .nav.is-scrolled .logo { height: 38px; }

  .hero { padding: 112px 0 104px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-art { max-width: 520px; width: 100%; margin: 0 auto; }
  .hide-sm { display: none; }

  .studio-grid, .process-grid, .contact-grid { grid-template-columns: 1fr; }
  .studio-figure { max-width: 440px; width: calc(100% - 18px); }
  .process-head { position: static; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .srv { grid-template-columns: 44px 1fr; gap: 10px 16px; padding: 26px 0; }
  .srv-desc { grid-column: 2; }
  .srv-icon { display: none; }

  /* gallery becomes an editorial vertical stack with scroll-driven reveals */
  .work { height: auto !important; }
  .work-sticky { position: static; height: auto; overflow: visible; padding: 96px 0 72px; gap: 40px; }
  .work-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .work-hint { display: none; }
  .work-track { flex-direction: column; align-items: stretch; width: auto; gap: 56px; transform: none !important; }
  .card-lg, .card-sm { width: 100%; margin-top: 0; }
  .card-sm { width: 84%; align-self: flex-end; }
  .card-sm:nth-child(4n) { align-self: flex-start; }
  .card-media, .card-end-inner { max-height: none; }
  .card-lg .card-media { aspect-ratio: 4 / 3; }
  .cm-par { inset: -9% 0; }
  .card-zoom { transform: none; width: 38px; height: 38px; font-size: 1.1rem; background: rgba(247, 242, 234, .9); }
  .work-progress { display: none; }

  .feats { grid-template-columns: 1fr; }
  .map-frame iframe { filter: grayscale(.3) sepia(.15); }

  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; row-gap: 20px; padding: 64px 12px 28px; }
  .lb-figure { grid-column: 1 / -1; grid-row: 1; }
  .lb-prev { grid-column: 1; grid-row: 2; justify-self: end; margin-right: 10px; }
  .lb-next { grid-column: 2; grid-row: 2; justify-self: start; margin-left: 10px; }
  .lb-img { max-height: calc(100vh - 250px); max-height: calc(100svh - 250px); }

  .wa-float { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
  .wa-icon { width: 54px; height: 54px; }
  .wa-icon svg { width: 28px; height: 28px; }
}

/* touch devices: no sticky hover states, tactile press feedback instead */
@media (hover: none) {
  .btn:hover::before { transform: translateY(101%); }
  .btn-ghost:hover, .btn-light:hover { color: inherit; }
  .btn-ghost:hover { border-color: var(--ink); }
  .btn:active { transform: scale(.96); }
  .btn:active::before { transform: none; }
  .card-media { transition: clip-path 1.4s var(--ease-io), transform .4s var(--ease); }
  .card-media:active { transform: scale(.985); }
  .card-media:hover::after { opacity: 0; }
  .srv:not(.is-active):hover::before { transform: scaleX(0); }
  .srv:not(.is-active):hover .srv-title { transform: none; color: inherit; }
  .lb-btn:hover { background: none; border-color: var(--line-light); }
  .ct-submit:hover { transform: none; background: var(--clay); }
  .lb-btn:active { background: var(--terra); border-color: var(--terra); }
  .card-end:hover .card-end-mark { transform: none; }
}

@media (max-width: 560px) {
  .hero-title { font-size: clamp(2.8rem, 13vw, 4rem); }
  .title { font-size: clamp(2.3rem, 10.5vw, 3.4rem); }
  .srv-title { font-size: 1.75rem; }
  .card-title { font-size: 1.4rem; }
  .pillars { grid-template-columns: 1fr; }
  .ct-list > div { grid-template-columns: 1fr; gap: 4px; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .map-frame figcaption { font-size: .62rem; }
  .ft-brand img { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .loader { display: none; }
  .js [data-reveal], .js [data-split] .sw > span, .js .ft-word span[data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  .draw { stroke-dashoffset: 0 !important; transition: none !important; }
  .hero-drawing { display: none; }
  .hero-photo { clip-path: none !important; transition: none !important; }
  .hero-photo img, .js .card .cm-par img { transform: none !important; transition: none !important; }
  .js .card .card-media { clip-path: none !important; }
  .hero-tag .ht-a { display: none; }
  .hero-tag .ht-b { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee-track, .scroll-cue i::after, .wa-ring { animation: none !important; }
  .js .wa-float { opacity: 1; transform: none; pointer-events: auto; animation: none !important; }
}
