/* ==========================================================
   NEW ATHAR — Modern Heritage
   Design tokens · base · components · sections
   ========================================================== */

:root {
  /* Burgundy scale */
  --wine-950: #12030a;
  --wine-900: #1c0610;
  --wine-850: #250913;
  --wine-800: #320c1b;
  --wine-700: #4c1024;
  --wine-600: #6d1631;
  --wine-500: #8f1f3f;
  --wine-400: #b23a5c;
  --wine-300: #d4728d;
  --wine-200: #ebb2c1;
  --wine-100: #f7e1e6;
  --ivory: #f8f1ea;
  --ivory-2: #efe4d9;
  --champagne: #e9c9a1;

  /* Semantic */
  --bg: var(--wine-950);
  --surface: var(--wine-900);
  --text: var(--ivory);
  --text-muted: rgba(248, 241, 234, 0.64);
  --text-faint: rgba(248, 241, 234, 0.38);
  --line: rgba(248, 241, 234, 0.12);
  --accent: var(--wine-400);
  --accent-soft: var(--wine-300);

  /* Type */
  --f-display: "Reem Kufi", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-latin: "Cinzel", "Times New Roman", serif;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 84px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; overflow-x: hidden; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--wine-400); color: #fff; }

:focus-visible { outline: 2px solid var(--wine-300); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; inset-inline-start: 16px; z-index: 1000;
  background: var(--ivory); color: var(--wine-900); padding: 10px 18px; border-radius: 999px;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(96px, 14vw, 180px); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--accent-soft);
}
.eyebrow em { font-family: var(--f-latin); font-style: normal; font-size: 0.78rem; letter-spacing: 0.18em; color: var(--text-faint); text-transform: uppercase; }
.eyebrow__line { width: 42px; height: 1px; background: currentColor; display: inline-block; }

.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin-top: 18px;
}
.section-lead { color: var(--text-muted); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 46ch; }
.section-head { margin-bottom: clamp(48px, 7vw, 96px); }
.section-head--split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: end; }
.section-head--center { text-align: center; display: flex; flex-direction: column; align-items: center; }

/* word-split reveal (Arabic is split by words only — never letters — to keep shaping intact) */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split-word > span { display: inline-block; will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 30px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; white-space: nowrap; isolation: isolate; overflow: hidden;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out);
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease-out); }
.btn:hover svg { transform: translateX(-5px); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform .6s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn > span, .btn > svg { position: relative; z-index: 1; }

.btn--primary { background: linear-gradient(135deg, var(--wine-400), var(--wine-600)); color: #fff; box-shadow: 0 10px 40px -10px rgba(178, 58, 92, .7); }
.btn--primary::before { background: var(--ivory); }
.btn--primary:hover { color: var(--wine-800); }

.btn--ghost { border: 1px solid rgba(248, 241, 234, .35); color: var(--ivory); backdrop-filter: blur(6px); }
.btn--ghost::before { background: var(--ivory); }
.btn--ghost:hover { color: var(--wine-800); border-color: var(--ivory); }

.btn--light { background: var(--ivory); color: var(--wine-800); }
.btn--light::before { background: var(--wine-400); }
.btn--light:hover { color: #fff; }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: .92rem; }

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: var(--wine-950); }
.preloader__inner { width: min(360px, 70vw); position: relative; z-index: 2; }
.preloader__logo { width: 100%; height: auto; opacity: 0; transform: translateY(14px); filter: blur(6px); }
.preloader__bar { height: 1px; background: rgba(248, 241, 234, .12); margin-top: 36px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--wine-400), var(--champagne)); transform: scaleX(0); transform-origin: right; }
.preloader__meta { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--f-latin); font-size: .72rem; letter-spacing: .2em; color: var(--text-faint); direction: ltr; }
.preloader__count { color: var(--ivory); font-variant-numeric: tabular-nums; }
.preloader__curtain { position: absolute; inset: 0; background: var(--wine-500); transform: scaleY(0); transform-origin: bottom; z-index: 1; }

/* ---------- Cursor ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 950; display: none; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate3d(-100px, -100px, 0); }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--ivory); mix-blend-mode: difference; }
.cursor__ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid rgba(248, 241, 234, .5);
  display: grid; place-items: center; transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background-color .35s, border-color .35s;
}
.cursor__label { font-style: normal; font-size: .8rem; font-weight: 600; color: var(--wine-800); opacity: 0; transform: scale(.6); transition: opacity .3s, transform .3s var(--ease-out); }
.cursor.is-link .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(178, 58, 92, .18); border-color: var(--wine-300); }
.cursor.is-view .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--ivory); border-color: var(--ivory); }
.cursor.is-view .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-view .cursor__dot { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
}

/* ---------- Grain + progress ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 800; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-5%, -10%); } 30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); } 70% { transform: translate(9%, 4%); } 90% { transform: translate(-1%, 7%); }
}
.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 700; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(270deg, var(--wine-400), var(--champagne)); transform: scaleX(0); transform-origin: right; }

/* ---------- Header ---------- */
.header { position: fixed; top: 0; inset-inline: 0; z-index: 600; transition: transform 1s var(--ease-out), background-color .4s, backdrop-filter .4s; }
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.header__logo img { height: 46px; width: auto; }
.header.is-scrolled { background: rgba(18, 3, 10, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.header.is-hidden, .is-loading .header { transform: translateY(-100%); }
.nav { margin-inline-start: auto; }
.nav__list { display: flex; gap: 6px; }
.nav__link { position: relative; display: inline-block; padding: 8px 14px; font-size: .95rem; color: var(--text-muted); transition: color .3s; }
.nav__link::after { content: ""; position: absolute; bottom: 2px; inset-inline: 14px; height: 1px; background: var(--wine-300); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out); }
.nav__link:hover, .nav__link.is-active { color: var(--ivory); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: right; }

.burger { display: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); position: relative; margin-inline-start: auto; }
.burger span { position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--ivory); transition: transform .45s var(--ease-out), top .45s var(--ease-out); }
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 27px; }
.burger[aria-expanded="true"] span:first-child { top: 23px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 23px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 550; background: var(--wine-900);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  clip-path: circle(0% at 10% 4%); transition: clip-path .8s var(--ease-in-out); visibility: hidden;
}
.mobile-menu.is-open { clip-path: circle(150% at 10% 4%); visibility: visible; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu li a { display: flex; align-items: baseline; gap: 16px; font-family: var(--f-display); font-size: clamp(2rem, 9vw, 3rem); line-height: 1.4; padding: 4px 0; border-bottom: 1px solid var(--line); }
.mobile-menu li a small { font-family: var(--f-latin); font-size: .8rem; color: var(--wine-300); }
.mobile-menu__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--text-muted); }

/* ---------- HERO ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: radial-gradient(120% 90% at 30% 75%, var(--wine-700) 0%, var(--wine-900) 45%, var(--wine-950) 100%); }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fallback { position: absolute; inset: 0; display: none; background: url("../assets/img/skyline-fallback.svg") bottom left / cover no-repeat; opacity: .9; }
.no-webgl .hero__fallback { display: block; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(270deg, rgba(18, 3, 10, .82) 0%, rgba(18, 3, 10, .5) 32%, rgba(18, 3, 10, 0) 58%),
    linear-gradient(0deg, rgba(18, 3, 10, .9) 0%, rgba(18, 3, 10, 0) 26%),
    linear-gradient(180deg, rgba(18, 3, 10, .55) 0%, rgba(18, 3, 10, 0) 18%);
}
.hero__content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: var(--header-h); }
.hero__eyebrow { margin-bottom: 18px; }
.hero__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(3.4rem, 9vw, 8.6rem); line-height: 1.08; letter-spacing: -0.01em; }
.hero__line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__line > span { display: inline-block; }
.hero__accent { color: var(--wine-300); position: relative; }
.hero__accent::after { content: ""; position: absolute; inset-inline: 0; bottom: .12em; height: .06em; background: var(--champagne); transform: scaleX(var(--u, 0)); transform-origin: right; transition: transform 1.4s var(--ease-out); }
.hero.is-in .hero__accent { --u: 1; }
.hero__lead { margin-top: 26px; max-width: 46ch; font-size: clamp(1rem, 1.35vw, 1.2rem); color: var(--text-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero__bottom { position: absolute; bottom: 30px; inset-inline: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; font-family: var(--f-latin); font-size: .72rem; letter-spacing: .22em; color: var(--text-faint); }
.hero__coords { display: flex; align-items: center; gap: 12px; }
.hero__coords .sep { width: 18px; height: 1px; background: var(--text-faint); }
.hero__scroll { display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--f-body); letter-spacing: 0; font-size: .82rem; color: var(--text-muted); }
.hero__scroll-line { width: 1px; height: 52px; background: rgba(248, 241, 234, .18); position: relative; overflow: hidden; }
.hero__scroll-line span { position: absolute; inset: 0; background: var(--wine-300); animation: scrollLine 2.2s var(--ease-in-out) infinite; }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- Marquee ---------- */
.marquee { position: relative; z-index: 3; overflow: hidden; padding: 28px 0; background: var(--wine-500); transform: rotate(-1.6deg) scale(1.04); margin-block: -18px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.marquee__track { display: flex; width: max-content; direction: ltr; }
.marquee__group { display: flex; align-items: center; gap: 36px; padding-inline-end: 36px; animation: marquee 32s linear infinite; }
.marquee__group span { font-family: var(--f-display); font-size: clamp(1.6rem, 3.4vw, 2.8rem); font-weight: 600; white-space: nowrap; color: var(--ivory); }
.marquee__group span.outline { font-family: var(--f-latin); font-weight: 600; color: transparent; -webkit-text-stroke: 1px rgba(248, 241, 234, .85); letter-spacing: .06em; }
.star { width: 22px; height: 22px; flex: none; background: var(--champagne); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.marquee .star { clip-path: polygon(50% 0%, 62% 22%, 85% 15%, 78% 38%, 100% 50%, 78% 62%, 85% 85%, 62% 78%, 50% 100%, 38% 78%, 15% 85%, 22% 62%, 0% 50%, 22% 38%, 15% 15%, 38% 22%); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- ABOUT ---------- */
.about { background: linear-gradient(180deg, var(--wine-950), var(--wine-900)); }
.manifesto {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 3.25rem); line-height: 1.55; max-width: 1120px;
}
.manifesto .mw { color: rgba(248, 241, 234, .16); transition: color .2s; }
.manifesto .mw.is-on { color: var(--ivory); }
.manifesto .mw.accent.is-on { color: var(--wine-300); }
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(64px, 8vw, 110px); }
.about__card { padding: 34px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(178, 58, 92, .08), rgba(178, 58, 92, 0)); }
.about__label { display: inline-block; font-weight: 600; color: var(--wine-300); margin-bottom: 12px; }
.about__card p { color: var(--text-muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(64px, 8vw, 110px); border-top: 1px solid var(--line); }
.stat { padding: 34px 24px 0; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat__num { font-family: var(--f-latin); font-weight: 500; font-size: clamp(3rem, 6vw, 5.4rem); line-height: 1; color: var(--ivory); display: flex; align-items: flex-start; direction: ltr; justify-content: flex-end; }
.stat__num sup { font-size: .45em; color: var(--wine-300); margin-top: .15em; }
.stat__label { margin-top: 14px; color: var(--text-muted); font-size: .95rem; }

/* ---------- SERVICES ---------- */
.services { background: var(--wine-900); }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1400px; }
.service {
  --mx: 50%; --my: 50%;
  position: relative; padding: 34px 30px 36px; border-radius: var(--radius-lg);
  background: linear-gradient(165deg, var(--wine-800) 0%, var(--wine-850) 60%);
  border: 1px solid rgba(248, 241, 234, .08); overflow: hidden; isolation: isolate;
  transform-style: preserve-3d; transition: border-color .4s, box-shadow .5s var(--ease-out);
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(212, 114, 141, .22), transparent 60%);
}
.service::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(300px circle at var(--mx) var(--my), var(--wine-300), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.service:hover::before, .service:hover::after { opacity: 1; }
.service:hover { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.service__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 46px; }
.service__num { font-family: var(--f-latin); font-size: .9rem; letter-spacing: .2em; color: var(--wine-300); }
.service__icon { width: 54px; height: 54px; fill: none; stroke: var(--champagne); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; transition: transform .7s var(--ease-out); }
.service:hover .service__icon { transform: rotate(-12deg) scale(1.08); }
.service__title { font-family: var(--f-display); font-size: 1.65rem; font-weight: 600; line-height: 1.3; }
.service__en { font-family: var(--f-latin); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); margin-top: 4px; text-align: right; }
.service__desc { color: var(--text-muted); margin-top: 16px; font-size: .97rem; }
.service__list { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.service__list li { position: relative; padding-inline-start: 20px; font-size: .93rem; color: rgba(248, 241, 234, .82); }
.service__list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .72em; width: 7px; height: 7px; background: var(--wine-400); transform: rotate(45deg); }

/* ---------- PROCESS ---------- */
.process { background: var(--ivory); color: var(--wine-800); overflow: hidden; }
.process .eyebrow { color: var(--wine-500); }
.process .eyebrow em { color: rgba(76, 16, 36, .45); }
.process__steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; padding-top: 30px; }
.process__line { position: absolute; top: 37px; inset-inline: 0; height: 1px; background: rgba(76, 16, 36, .15); }
.process__line span { position: absolute; inset: 0; background: linear-gradient(270deg, var(--wine-400), var(--wine-700)); transform: scaleX(0); transform-origin: right; }
.step { position: relative; padding-top: 44px; }
.step__dot { position: absolute; top: 0; inset-inline-start: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--ivory); border: 1.5px solid var(--wine-500); transition: background-color .4s, transform .4s var(--ease-out); }
.step.is-on .step__dot { background: var(--wine-500); transform: scale(1.25); box-shadow: 0 0 0 8px rgba(143, 31, 63, .12); }
.step__num { font-family: var(--f-latin); font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--wine-500); display: block; }
.step h3 { font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; margin-top: 14px; color: var(--wine-700); }
.step p { margin-top: 10px; color: rgba(50, 12, 27, .72); font-size: .97rem; }

/* ---------- WORK ---------- */
.work { position: relative; background: var(--wine-950); padding-block: clamp(96px, 12vw, 150px); overflow: hidden; }
.work__pin { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 901px) {
  .work { padding-block: 0; }
  .work__pin { height: 100vh; padding-top: calc(var(--header-h) * .6); }
}
.work__head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 44px; }
.work__counter { font-family: var(--f-latin); font-size: 1rem; letter-spacing: .15em; color: var(--text-faint); direction: ltr; }
.work__counter span:first-child { color: var(--ivory); font-size: 1.6rem; }
.work__viewport { overflow: visible; }
.work__track { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 36px); padding-inline: var(--gutter); width: max-content; will-change: transform; }
.work-card { position: relative; flex: none; }
.work-card__btn { display: block; width: 100%; text-align: inherit; cursor: none; }
@media (hover: none) { .work-card__btn { cursor: pointer; } }
.work-card__media { display: block; overflow: hidden; border-radius: var(--radius); position: relative; background: var(--wine-800); clip-path: inset(0 0 0 0 round var(--radius)); }
.work-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18, 3, 10, .55), transparent 45%); opacity: .7; transition: opacity .5s; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.2s var(--ease-out), filter .6s; filter: saturate(.9); }
.work-card:hover .work-card__media img { transform: scale(1.02); filter: saturate(1.05); }
.work-card:hover .work-card__media::after { opacity: .3; }
.work-card figcaption { display: flex; flex-direction: column; margin-top: 16px; }
.work-card__cat { font-size: .82rem; color: var(--wine-300); }
.work-card__title { font-family: var(--f-display); font-size: 1.35rem; font-weight: 500; }
.work-card--lg { width: clamp(300px, min(46vw, 66vh), 680px); }
.work-card--lg .work-card__media { aspect-ratio: 3 / 2; }
.work-card--tall { width: clamp(200px, min(22vw, 30vh), 330px); }
.work-card--tall .work-card__media { aspect-ratio: 3 / 4.6; }
.work-card--md { width: clamp(220px, min(28vw, 34vh), 400px); }
.work-card--md .work-card__media { aspect-ratio: 3 / 4; }
.work-card--sm { width: clamp(220px, min(24vw, 40vh), 360px); align-self: flex-end; }
.work-card--sm .work-card__media { aspect-ratio: 4 / 3; }
.work-card--cta { width: clamp(240px, min(28vw, 34vh), 400px); aspect-ratio: 3 / 4; border-radius: var(--radius); border: 1px dashed rgba(248, 241, 234, .3); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 26px; text-align: center; background: radial-gradient(circle at 50% 40%, rgba(178, 58, 92, .25), transparent 70%); }
.work-card--cta p { font-family: var(--f-display); font-size: clamp(1.8rem, 2.8vw, 2.6rem); line-height: 1.3; }
.work__progress { margin-top: 46px; }
.work__progress::before { content: ""; display: block; height: 1px; background: var(--line); }
.work__progress span { display: block; height: 2px; margin-top: -1.5px; background: var(--wine-400); transform: scaleX(0); transform-origin: right; }

/* ---------- CLIENTS ---------- */
.clients { background: var(--wine-100); color: var(--wine-800); }
.clients .eyebrow { color: var(--wine-500); }
.clients .eyebrow em { color: rgba(76, 16, 36, .45); }
.clients .section-lead { color: rgba(50, 12, 27, .7); }
.logos { display: flex; flex-direction: column; gap: 18px; direction: ltr; }
.logos__row { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logos__track { display: flex; gap: 18px; width: max-content; }
.logo-tile {
  width: clamp(150px, 15vw, 210px); aspect-ratio: 4 / 3; flex: none; display: grid; place-items: center;
  background: #fff; border-radius: 16px; border: 1px solid rgba(76, 16, 36, .08);
  box-shadow: 0 10px 30px -18px rgba(76, 16, 36, .35); transition: transform .5s var(--ease-out), box-shadow .5s;
}
.logo-tile img { width: 72%; height: 72%; object-fit: contain; filter: grayscale(1) contrast(1.1); opacity: .62; transition: filter .5s, opacity .5s, transform .5s var(--ease-out); }
.logo-tile:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -20px rgba(76, 16, 36, .5); }
.logo-tile:hover img { filter: none; opacity: 1; transform: scale(1.06); }

/* ---------- WHY ---------- */
.why { background: linear-gradient(180deg, var(--wine-800), var(--wine-900)); overflow: hidden; }
.why__inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.why__intro { position: sticky; top: calc(var(--header-h) + 40px); }
.why__ornament { width: clamp(160px, 18vw, 260px); margin-top: 48px; color: var(--wine-400); opacity: .7; }
.why__ornament svg { animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.why__list { display: flex; flex-direction: column; }
.why__item { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.why__item:first-child { padding-top: 0; }
.why__num { font-family: var(--f-latin); font-size: 1rem; color: var(--wine-300); letter-spacing: .15em; padding-top: 10px; }
.why__item h3 { font-family: var(--f-display); font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 600; }
.why__item p { color: var(--text-muted); margin-top: 8px; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; background: var(--wine-500); padding-block: clamp(110px, 16vw, 210px); }
.cta__bg { position: absolute; inset: 0; display: flex; align-items: center; pointer-events: none; direction: ltr; }
.cta__text { font-family: var(--f-latin); font-weight: 700; font-size: clamp(6rem, 18vw, 17rem); white-space: nowrap; color: transparent; -webkit-text-stroke: 1px rgba(248, 241, 234, .16); line-height: 1; }
.cta__inner { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 8vw, 7.4rem); line-height: 1.1; }
.cta__title .cta__accent { color: var(--wine-900); }
.cta__circle { position: relative; width: clamp(160px, 18vw, 230px); aspect-ratio: 1; flex: none; border-radius: 50%; background: var(--ivory); color: var(--wine-700); display: grid; place-items: center; transition: background-color .5s, color .5s; }
.cta__circle:hover { background: var(--wine-900); color: var(--ivory); }
.cta__ring { direction: ltr; position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.cta__ring text { font-family: var(--f-body); font-size: 12px; font-weight: 600; fill: currentColor; letter-spacing: .5px; }
.cta__arrow { width: 38%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease-out); }
.cta__circle:hover .cta__arrow { transform: rotate(-45deg); }

/* ---------- CONTACT ---------- */
.contact { background: var(--wine-950); }
.contact__inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.contact__info .section-lead { margin-top: 22px; }
.contact__list { margin-top: 44px; display: grid; gap: 20px; }
.contact__list li { display: flex; gap: 16px; align-items: center; }
.contact__icon { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.contact__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--wine-300); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.contact__list small { display: block; color: var(--text-faint); font-size: .82rem; }
.contact__list a, .contact__list span { font-size: 1.1rem; font-weight: 500; }
.contact__list a:hover { color: var(--wine-300); }
.contact__list a[dir="ltr"] { display: inline-block; }

.form { position: relative; padding: clamp(28px, 4vw, 52px); border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--wine-850), var(--wine-900)); border: 1px solid var(--line); box-shadow: 0 50px 100px -50px rgba(0, 0, 0, .9); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { position: relative; margin-bottom: 26px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(248, 241, 234, .22);
  padding: 22px 0 10px; font-size: 1.02rem; outline: none; border-radius: 0; resize: vertical; transition: border-color .3s;
}
.field input[dir="ltr"] { text-align: right; }
.field label { position: absolute; top: 22px; inset-inline-start: 0; color: var(--text-muted); pointer-events: none; transition: transform .35s var(--ease-out), color .3s, font-size .35s; transform-origin: right top; }
.field input:focus, .field textarea:focus { border-color: var(--wine-300); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-22px) scale(.82); color: var(--wine-300); }
.field.has-error input, .field.has-error textarea { border-color: #ff7a93; }
.field__error { display: block; min-height: 1em; font-size: .8rem; color: #ff9fb1; margin-top: 6px; }
.chips { border: 0; margin: 4px 0 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { width: 100%; color: var(--text-muted); margin-bottom: 14px; font-size: .95rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(248, 241, 234, .2); font-size: .9rem; cursor: pointer; transition: background-color .3s, border-color .3s, color .3s; }
.chip:hover span { border-color: var(--wine-300); }
.chip input:checked + span { background: var(--wine-400); border-color: var(--wine-400); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--wine-300); outline-offset: 2px; }
.hp { position: absolute !important; inset-inline-start: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; clip-path: inset(50%); overflow: hidden; }
.form__foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.form__note { color: var(--text-muted); font-size: .92rem; }
.form__note a { color: var(--wine-300); text-decoration: underline; text-underline-offset: 4px; }
.form__status { margin-top: 18px; min-height: 1.5em; font-weight: 500; }
.form__status.is-ok { color: #9be7b5; }
.form__status.is-err { color: #ff9fb1; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- FOOTER ---------- */
.footer { background: var(--wine-950); border-top: 1px solid var(--line); padding-top: 90px; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__brand img { width: 200px; height: auto; }
.footer__brand p { color: var(--text-muted); margin-top: 22px; max-width: 34ch; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; margin-bottom: 8px; color: var(--wine-300); }
.footer__col a, .footer__col span { color: var(--text-muted); transition: color .3s; width: fit-content; }
.footer__col a:hover { color: var(--ivory); }
.footer__big { font-family: var(--f-latin); font-weight: 700; font-size: clamp(3rem, 12.4vw, 13rem); line-height: .9; white-space: nowrap; text-align: center; margin-top: 70px; direction: ltr; color: rgba(178, 58, 92, .22); letter-spacing: .02em; user-select: none; }
.footer__bottom { display: flex; justify-content: space-between; padding: 26px 0 34px; padding-inline-end: 90px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: .9rem; }
.footer__top-link:hover { color: var(--ivory); }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; bottom: 24px; left: 24px; z-index: 500; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .55);
  transition: transform .4s var(--ease-out);
}
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: ping 2.4s var(--ease-out) infinite; }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float:hover { transform: scale(1.08); }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 990; background: rgba(18, 3, 10, .94); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 60px var(--gutter); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1200px, 100%); max-height: 78vh; width: auto; border-radius: var(--radius); box-shadow: 0 40px 100px rgba(0, 0, 0, .7); }
.lightbox__caption { margin-top: 18px; text-align: center; color: var(--text-muted); }
.lightbox__close { position: absolute; top: 20px; left: 20px; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); font-size: 1.2rem; }
.lightbox__close:hover { background: var(--ivory); color: var(--wine-800); }

/* ---------- Reveal defaults (JS adds .is-in) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(40px); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .process__steps { grid-template-columns: repeat(3, 1fr); row-gap: 56px; }
  .process__line { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .nav, .header__cta { display: none; }
  .burger { display: block; }
  .header__logo img { height: 40px; }
  .section-head--split { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 30px 18px 30px; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .why__inner, .contact__inner { grid-template-columns: 1fr; }
  .why__intro { position: static; }
  .why__ornament { display: none; }
  .cta__inner { flex-direction: column; align-items: flex-start; }

  /* hero: scene on top, text at bottom */
  .hero__content { justify-content: flex-end; padding-bottom: 130px; }
  .hero__scrim { background: linear-gradient(0deg, rgba(18, 3, 10, .96) 0%, rgba(18, 3, 10, .75) 38%, rgba(18, 3, 10, 0) 64%), linear-gradient(180deg, rgba(18, 3, 10, .6) 0%, rgba(18, 3, 10, 0) 18%); }
  .hero__coords, .hero__tag { display: none; }
  .hero__bottom { justify-content: center; bottom: 22px; }

  /* work: native horizontal scroll with snap */
  .work__pin { min-height: 0; }
  .work__viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 6px; }
  .work__viewport::-webkit-scrollbar { display: none; }
  .work-card { scroll-snap-align: center; }
  .work-card--lg { width: 82vw; }
  .work-card--tall, .work-card--md, .work-card--sm, .work-card--cta { width: 64vw; }
  .work-card--sm { align-self: center; }
  .work__counter { display: none; }
}

@media (max-width: 640px) {
  .services__grid { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: 1fr; row-gap: 40px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 10px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .wa-float { width: 52px; height: 52px; bottom: 18px; left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .grain { display: none; }
}
