﻿/* =====================================================================
   Anas Hawash — site styles ("Engineering Grid")
   Colours, fonts, radius, spacing and grid are CSS variables that the
   admin panel overrides at runtime (see applyTheme in site.js).
   ===================================================================== */

:root {
  --bg: #0B0C0E;
  --surface: #17191D;
  --surface-2: #1E2126;
  --steel: #8B9099;
  --bone: #EEECE7;
  --signal: #FF5A1F;
  --on-signal: #0B0C0E;
  --line: rgb(139 144 153 / .18);
  --grid-o: .07;
  --radius: 4px;
  --base: 17;
  --space: 1;

  --f-ar: 'IBM Plex Sans Arabic';
  --f-lat: 'Inter Tight';
  --f-mono: 'JetBrains Mono';
  --font-body: var(--f-ar), 'Segoe UI', Tahoma, system-ui, sans-serif;
  --font-head: var(--f-lat), var(--f-ar), 'Segoe UI', system-ui, sans-serif;
  --font-mono: var(--f-mono), ui-monospace, Consolas, monospace;

  --margin: clamp(1.25rem, 4.5vw, 4.5rem);
  --container: 1312px;
  --gutter: clamp(1rem, 1.8vw, 1.5rem);
  --section-gap: calc(clamp(7rem, 12vh + 7vw, 15rem) * var(--space));

  --step-display: clamp(3rem, 6.4vw, 6.25rem);
  --step-h2: clamp(2.125rem, 3.7vw, 3.625rem);
  --step-h3: clamp(1.375rem, 1.75vw, 1.75rem);
  --step-lead: clamp(1.1875rem, 1.35vw, 1.4375rem);
  --step-body: calc(var(--base) * 1px);
  --step-small: .8125rem;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; font-synthesis: none; }
body {
  margin: 0; background: var(--bg); color: var(--bone);
  font-family: var(--font-body); font-size: var(--step-body); line-height: 1.6; font-weight: 500;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
html[lang="en"] body { line-height: 1.55; }
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--signal); color: var(--on-signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: fixed; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--bone); color: var(--bg); padding: .75rem 1rem; border-radius: var(--radius);
  transition: top .2s var(--ease);
}
.skip:focus { top: 1rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- engineering grid (brand) ---------- */
.gridlines { position: fixed; inset: 0; z-index: 0; pointer-events: none; padding-inline: var(--margin); }
.gridlines > div {
  height: 100%; max-width: var(--container); margin-inline: auto;
  display: grid; grid-template-columns: repeat(var(--cols, 12), 1fr);
  border-inline: 1px solid rgb(139 144 153 / var(--grid-o));
}
.gridlines span { border-inline-start: 1px solid rgb(139 144 153 / var(--grid-o)); }
.gridlines span:first-child { border: 0; }
html.no-grid .gridlines { display: none; }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; width: 100%; max-width: calc(var(--container) + var(--margin) * 2); margin-inline: auto; padding-inline: var(--margin); }
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
main { position: relative; z-index: 1; overflow-x: clip; }
.footer { overflow-x: clip; }
.section { position: relative; padding-block: calc(var(--section-gap) / 2); }
.section + .section { padding-top: calc(var(--section-gap) / 2); }
#sections > .section:first-child { padding-top: var(--section-gap); }

/* ---------- type ---------- */
.display, .h2, .h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
html[lang="en"] .display, html[lang="en"] .h2, html[lang="en"] .h3 { font-weight: 600; letter-spacing: -.035em; }
.display { font-size: var(--step-display); line-height: .98; }
.h2 { font-size: var(--step-h2); line-height: 1.05; }
.h3 { font-size: var(--step-h3); line-height: 1.2; letter-spacing: -.01em; }
.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--bone); max-width: 38ch; text-wrap: pretty; }
.muted { color: var(--steel); }
p { text-wrap: pretty; }
.latin { font-family: var(--f-lat), system-ui, sans-serif; direction: ltr; unicode-bidi: isolate; }

/* mono tags: brand device (AH—001 / CASE STUDY). Arabic runs inside drop the tracking. */
.tag {
  font-family: var(--font-mono); font-size: var(--step-small); font-weight: 500; line-height: 1.4;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel);
  display: inline-flex; align-items: center; gap: .6em; flex-wrap: wrap;
}
.tag .ar { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: .875rem; }
.dot { width: 7px; height: 7px; background: var(--signal); border-radius: 50%; flex: none; display: inline-block; }

/* section head: number + rule + title */
.sec-head { margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.sec-rule { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.sec-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-rule .num { color: var(--bone); }
.sec-head .cols { align-items: end; row-gap: 1.25rem; }
.sec-head .h2 { grid-column: 1 / span 7; }
.sec-head .intro { grid-column: 8 / span 5; color: var(--bone); font-size: var(--step-lead); line-height: 1.5; max-width: 36ch; }

/* ---------- buttons ---------- */
.btn {
  --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  height: var(--h); padding-inline: 1.6rem; border-radius: 999px; white-space: nowrap;
  background: var(--signal); color: var(--on-signal); font-weight: 600; font-size: 1rem; line-height: 1;
  transition: background-color .2s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: color-mix(in srgb, var(--signal) 86%, #000); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem; height: 52px; font-weight: 600; color: var(--bone);
  transition: color .2s var(--ease);
}
.link-arrow .arr { display: inline-block; transition: transform .25s var(--ease); }
html[dir="rtl"] .link-arrow .arr { transform: scaleX(-1); }
.link-arrow:hover .arr { transform: translateX(4px); }
html[dir="rtl"] .link-arrow:hover .arr { transform: scaleX(-1) translateX(4px); }
.link-arrow:hover { color: #fff; }
.on-bone .link-arrow { color: var(--bg); }

/* ---------- logo ---------- */
.logo { width: 38px; height: 38px; flex: none; }
.logo .frame { fill: none; stroke: currentColor; stroke-width: 1.5; }
.logo .cut { stroke: var(--signal); stroke-width: 2; fill: none; }
.logo text { fill: currentColor; font-family: var(--f-lat), Arial, sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .02em; }

/* ---------- HUD navigation: four corners ---------- */
.hud { position: fixed; inset: 0 0 auto 0; z-index: 50; pointer-events: none; }
.hud-row { display: flex; justify-content: space-between; align-items: center; padding: 22px var(--margin) 0; }
.hud-tab {
  pointer-events: auto; display: inline-flex; align-items: center; gap: .7rem; height: 52px; padding-inline: 12px 16px;
  background: var(--bg); color: var(--bone); border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.hud-tab:hover { background: var(--bone); color: var(--bg); }
.hud-brand { padding-inline: 8px 16px; }
.hud-brand .nm { font-family: var(--font-head); font-size: 1.0625rem; }
.hud-end { display: flex; gap: 8px; }
.hud-lang { font-family: var(--font-mono); font-weight: 500; letter-spacing: .08em; padding-inline: 16px; }
.hud-menu .bars { width: 18px; height: 10px; position: relative; }
.hud-menu .bars::before, .hud-menu .bars::after { content: ""; position: absolute; inset-inline: 0; height: 2px; background: currentColor; transition: transform .3s var(--ease); }
.hud-menu .bars::before { top: 0; } .hud-menu .bars::after { bottom: 0; }
.menu-open .hud-menu .bars::before { transform: translateY(4px) rotate(45deg); }
.menu-open .hud-menu .bars::after { transform: translateY(-4px) rotate(-45deg); }

.hud-action {
  position: fixed; z-index: 49; inset-inline-start: var(--margin); bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateY(calc(100% + 48px)); transition: transform .45s var(--ease), background-color .2s;
}
.hud-action.is-on { transform: none; }
.hud-action:active { transform: scale(.97); }

.wa-float {
  position: fixed; z-index: 49; inset-inline-end: var(--margin); bottom: calc(24px + env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--bone); border: 1px solid color-mix(in srgb, var(--steel) 45%, transparent);
  transition: transform .2s var(--ease), background-color .2s, color .2s;
}
.wa-float:hover { transform: translateY(-3px); background: var(--bone); color: var(--bg); }
.wa-float.is-off { transform: translateY(calc(100% + 48px)); }
.wa-float svg { width: 24px; height: 24px; }

/* full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--surface); color: var(--bone);
  display: grid; grid-template-rows: 1fr auto; padding: 110px var(--margin) 40px;
  clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .6s var(--ease-io), visibility 0s .6s;
}
.menu-open .menu { clip-path: inset(0); visibility: visible; transition: clip-path .6s var(--ease-io), visibility 0s; }
.menu-inner { max-width: var(--container); width: 100%; margin-inline: auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-content: center; }
.menu-links a { display: flex; align-items: baseline; gap: 1.25rem; padding-block: .3rem; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.75rem, 3.4vw, 3rem); line-height: 1.15; color: var(--bone); transition: color .2s, transform .3s var(--ease); }
.menu-links a .tag { min-width: 2.5rem; }
.menu-links a:hover { color: var(--signal); transform: translateX(calc(var(--dirx, 1) * 8px)); }
html[dir="rtl"] .menu-links a:hover { --dirx: -1; }
.menu-side { display: grid; gap: 1.5rem; align-content: end; }
.menu-side .reach a { display: block; padding-block: .35rem; color: var(--bone); }
.menu-side .reach a:hover { color: var(--signal); }
.menu-foot { max-width: var(--container); width: 100%; margin-inline: auto; display: flex; justify-content: space-between; gap: 1rem; }

/* ---------- HERO ---------- */
.hero { position: relative; z-index: 1; min-height: 100svh; overflow: hidden; isolation: isolate; }
.stage3d { position: absolute; inset: 0; z-index: 0; }
.stage3d canvas { width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.2s var(--ease); }
.stage3d.is-ready canvas { opacity: 1; }
.hero-inner { position: relative; z-index: 2; min-height: 100svh; padding-top: 128px; padding-bottom: 56px; display: grid; align-items: center; pointer-events: none; }
.hero-copy, .hero-photo { pointer-events: auto; }
.hero-inner > .cols { align-items: center; row-gap: 2rem; }
.hero-copy { grid-column: 1 / span 5; display: grid; gap: 0; align-content: center; }
.hero-copy .tag { margin-bottom: 2rem; }
.hero-copy h1 { margin-bottom: 1.75rem; }
.hero-copy .lead { font-size: clamp(1.25rem, 1.65vw, 1.625rem); max-width: 26ch; font-weight: 600; }
.hero-copy .sub { margin-top: .75rem; color: var(--steel); font-size: 1.0625rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin-top: 2.5rem; }

.hero-photo { grid-column: 6 / span 3; align-self: end; position: relative; perspective: 1100px; }
.portrait {
  position: relative; aspect-ratio: 5 / 8; width: 100%; max-height: 74svh; margin-inline: auto;
  transform-style: preserve-3d; transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform .6s var(--ease);
}
.portrait .cutframe { position: absolute; inset: 0; clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%); background: var(--surface); overflow: hidden; }
html[dir="rtl"] .portrait .cutframe { clip-path: polygon(44px 0, 100% 0, 100% 100%, 0 100%, 0 44px); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.portrait .corner { position: absolute; top: 0; inset-inline-end: 0; width: 44px; height: 44px; transform: translateZ(30px); }
html[dir="rtl"] .portrait .corner { inset-inline-end: auto; inset-inline-start: 0; transform: translateZ(30px) scaleX(-1); }
.portrait .corner line { stroke: var(--signal); stroke-width: 2; }
.portrait .plate {
  position: absolute; inset-inline-start: -18px; bottom: 28px; transform: translateZ(60px);
  background: var(--bg); padding: .7rem .9rem; border-radius: var(--radius); display: grid; gap: .15rem;
}
.portrait .plate .tag { font-size: .75rem; }
.portrait .plate b { font-family: var(--font-head); font-size: 1rem; }

/* labels drawn over the WebGL stack */
.layer-labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.layer-label {
  position: absolute; top: 0; left: 0; pointer-events: auto; display: flex; align-items: center; gap: .6rem;
  padding: .45rem .7rem; border-radius: var(--radius); background: var(--bg); color: var(--bone);
  font-size: .9375rem; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .5s var(--ease), background-color .2s, color .2s;
  will-change: transform;
}
.layer-label .tag { font-size: .75rem; color: var(--bone); }
.layer-label .lt { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .45s var(--ease), opacity .3s var(--ease); }
.layer-label:hover .lt, .layer-label.is-hot .lt, .layer-label:focus-visible .lt, .labels-open .layer-label .lt { max-width: 18rem; opacity: 1; }
.layer-label.is-on { opacity: 1; }
.layer-label:hover, .layer-label.is-hot { background: var(--bone); color: var(--bg); }
.layer-label:hover .tag, .layer-label.is-hot .tag { color: var(--bg); }

.hero-foot { position: absolute; z-index: 2; inset-inline: 0; bottom: 30px; pointer-events: none; }
.hero-foot .wrap { display: flex; justify-content: flex-end; }
.scroll-cue { display: inline-flex; align-items: center; gap: .75rem; }
.scroll-cue i { width: 1px; height: 42px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--signal); transform: translateY(-100%); animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* fallback without WebGL: the layers as a CSS 3D stack */
.css-stack { position: absolute; inset: 0; display: none; perspective: 1600px; }
.no-webgl .css-stack { display: block; }
.css-stack .lay { position: absolute; width: 34vw; inset-inline-end: 6vw; top: 26%; border-radius: var(--radius); overflow: hidden; transform: rotateX(58deg) rotateZ(-34deg) translateZ(calc(var(--i) * 70px)); }
html[dir="rtl"] .css-stack .lay { inset-inline-end: auto; inset-inline-start: 6vw; transform: rotateX(58deg) rotateZ(34deg) translateZ(calc(var(--i) * 70px)); }

/* ---------- cards (surface, 3D tilt) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative; background: var(--surface); border-radius: var(--radius); padding: clamp(1.75rem, 2.6vw, 2.5rem);
  display: flex; flex-direction: column; gap: 1.1rem; min-height: 100%;
  transform-style: preserve-3d; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease), background-color .25s var(--ease);
}
.card:hover { background: var(--surface-2); }
.card > * { transform: translateZ(0); transition: transform .5s var(--ease); }
.card:hover > .h3 { transform: translateZ(28px); }
.card:hover > .card-top { transform: translateZ(16px); }
.card .card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.card .notch { width: 18px; height: 18px; position: relative; }
.card .notch::before { content: ""; position: absolute; inset: 0; border-top: 2px solid var(--steel); border-inline-end: 2px solid var(--steel); transition: border-color .25s; }
.card:hover .notch::before { border-color: var(--signal); }
.card p { color: var(--bone); }
.points { display: grid; gap: .55rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.points li { display: flex; gap: .75rem; align-items: baseline; }
.points li::before { content: "—"; color: var(--steel); flex: none; }

/* ---------- WORK ---------- */
.project + .project { margin-top: calc(var(--section-gap) * .6); }
.proj-head { row-gap: 2rem; margin-bottom: 0; }
.proj-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.status { display: inline-flex; align-items: center; gap: .5rem; color: var(--bone); }
.status.concept .dot { background: var(--steel); }
.proj-title { grid-column: 1 / span 7; }
.proj-story { grid-column: 1 / span 7; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.proj-story h4, .proj-offers h4 { margin-bottom: .6rem; }
.proj-offers { grid-column: 9 / span 4; grid-row: 2 / span 2; align-self: start; }
.proj-offers ul { display: grid; gap: .55rem; }
.proj-offers li { display: flex; gap: .75rem; align-items: baseline; }
.proj-offers li::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--steel); transform: translateY(-2px); }
.proj-link { margin-top: 1.5rem; }

/* carousel scene: pinned set that cycles by pose */
.reel { position: relative; height: calc(var(--n, 6) * 55vh + 100vh); }
.reel-sticky { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: 1fr auto; padding-block: 84px 104px; overflow: hidden; }
.reel-stage { position: relative; perspective: 1700px; perspective-origin: 50% 40%; }
.reel-card {
  position: absolute; left: 50%; top: 50%; width: min(62vw, 980px); aspect-ratio: 16 / 10;
  margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transform-style: preserve-3d; will-change: transform, opacity; cursor: pointer;
  transform: translate(-50%, -50%);
}
.reel-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.reel-card::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: var(--shade, 0); pointer-events: none; }
.reel-ui { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.reel-names { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.reel-names button { color: var(--steel); font-weight: 600; font-size: 1.0625rem; padding-block: .35rem; transition: color .25s; }
.reel-names button.is-on { color: var(--bone); }
.reel-names button.is-on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); margin-inline-end: .5rem; vertical-align: middle; }
.reel-count { font-family: var(--font-mono); color: var(--bone); font-size: 1rem; letter-spacing: .08em; white-space: nowrap; }
.reel-count .muted { color: var(--steel); }
.reel-title { font-family: var(--font-head); font-weight: 700; font-size: var(--step-h3); }

/* static version (reduced motion / phones) */
.reel.is-static { height: auto; }
.reel.is-static .reel-sticky { position: static; height: auto; padding: 0; overflow: visible; }
.reel.is-static .reel-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; perspective: none; }
.reel.is-static .reel-card { position: relative; left: auto; top: auto; width: 100%; transform: none !important; opacity: 1 !important; cursor: default; }
.reel.is-static .reel-card::after { display: none; }
.reel.is-static .reel-ui { display: none; }
.reel.is-static figcaption { display: block; }
.reel-card figcaption { display: none; position: absolute; inset-inline-start: 12px; bottom: 12px; background: var(--bg); padding: .35rem .65rem; border-radius: var(--radius); font-size: .9375rem; font-weight: 600; }

/* tilt showcase: the site in 3D, unfolding as it scrolls in */
.tiltcase { position: relative; perspective: 1800px; perspective-origin: 50% 0%; padding-bottom: 4vw; }
.tilt-main {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transform-origin: 50% 100%; transform: rotateX(var(--tx, 22deg)) rotateZ(var(--tz, 0deg)) scale(var(--ts, .92));
  will-change: transform;
}
.tilt-main img { width: 100%; aspect-ratio: 1440 / 721; object-fit: cover; }
.tilt-float {
  position: absolute; width: 46%; inset-inline-start: 4%; bottom: -6%; border-radius: var(--radius); overflow: hidden;
  transform: translate3d(0, var(--fy, 40px), 120px) rotateX(calc(var(--tx, 22deg) * .4)); will-change: transform;
  outline: 6px solid var(--bg);
}
.tilt-float img { width: 100%; aspect-ratio: 1440 / 721; object-fit: cover; }
.proj-web .cols { align-items: center; row-gap: 3rem; }
.proj-web .proj-visual { grid-column: 1 / span 7; }
.proj-web .proj-text { grid-column: 9 / span 4; display: grid; gap: 1.75rem; align-content: start; }
.proj-web .proj-text > * { grid-column: auto !important; grid-row: auto !important; }
.proj-web .proj-title { font-size: clamp(1.75rem, 2.5vw, 2.5rem); }
.proj-web .proj-story { grid-template-columns: 1fr; gap: 1.25rem; }

/* ---------- PRODUCT TEASER (bone field) ---------- */
.on-bone { background: var(--bone); color: var(--bg); }
.on-bone .tag { color: #4A4E55; }
.on-bone .sec-rule::after { background: rgb(11 12 14 / .16); }
.on-bone .sec-rule .num { color: var(--bg); }
.on-bone .muted { color: #4A4E55; }
.section.field { margin-top: 0; padding-block: calc(var(--section-gap) / 2); position: relative; z-index: 1; }
.section + .section.field { padding-top: calc(var(--section-gap) / 2); }
.section.field + .section { padding-top: calc(var(--section-gap) / 2); }
.teaser .cols { align-items: center; row-gap: 3rem; }
.teaser-copy { grid-column: 1 / span 5; display: grid; gap: 1.5rem; align-content: start; }
.teaser-copy p { font-size: var(--step-lead); line-height: 1.5; max-width: 30ch; }
.teaser-copy .points { border-top-color: rgb(11 12 14 / .16); margin-top: .5rem; }
.teaser-copy .points li::before { color: #4A4E55; }
.teaser-copy .actions { margin-top: .75rem; }
.teaser-visual { grid-column: 7 / span 6; perspective: 1600px; min-height: 30rem; position: relative; }
.slab-stack { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(calc(52deg + var(--rx, 0deg))) rotateZ(calc(-30deg + var(--rz, 0deg))); transition: transform .8s var(--ease); }
html[dir="rtl"] .slab-stack { transform: rotateX(calc(52deg + var(--rx, 0deg))) rotateZ(calc(30deg + var(--rz, 0deg))); }
.slab { position: absolute; left: 14%; top: 14%; width: 72%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; transform-style: preserve-3d; background: var(--surface); }
.slab img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.slab.back { transform: translateZ(0); }
.slab.front { transform: translateZ(var(--lift, 110px)); transition: transform .8s var(--ease); }
.teaser-visual:hover .slab.front { --lift: 170px; }
.slab-shadow { position: absolute; left: 14%; top: 14%; width: 72%; aspect-ratio: 16/10; background: rgb(11 12 14 / .14); border-radius: var(--radius); transform: translateZ(-60px); filter: blur(18px); }

/* ---------- PROCESS ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); position: relative; }
.steps::before { content: ""; position: absolute; inset-inline: 0; top: 10px; height: 1px; background: var(--line); }
.step { position: relative; padding-top: 2.75rem; display: grid; gap: .6rem; align-content: start; }
.step::before { content: ""; position: absolute; top: 4px; inset-inline-start: 0; width: 13px; height: 13px; background: var(--bg); border: 2px solid var(--steel); transform: rotate(45deg); transition: border-color .3s, background-color .3s; }
.step:hover::before { border-color: var(--signal); background: var(--signal); }
.step .tag { margin-bottom: .4rem; }
.step p { color: var(--bone); }

/* ---------- AI ---------- */
.ai-cols { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gutter); align-items: stretch; }
.ai-col { padding: clamp(1.75rem, 3vw, 3rem); border-radius: var(--radius); }
.ai-col h3 { margin-bottom: 1.5rem; }
.ai-col.help { background: var(--surface); }
.ai-col.help li { font-size: var(--step-lead); color: var(--steel); padding-block: .55rem; border-bottom: 1px solid var(--line); }
.ai-col.mine { background: var(--bone); color: var(--bg); }
.ai-col.mine .tag { color: #4A4E55; }
.ai-col.mine li { font-family: var(--font-head); font-weight: 700; font-size: var(--step-h3); padding-block: .7rem; border-bottom: 1px solid rgb(11 12 14 / .14); display: flex; gap: .9rem; align-items: center; }
html[lang="en"] .ai-col.mine li { font-weight: 600; }
.ai-col.mine li::before { content: ""; width: 9px; height: 9px; background: var(--signal); flex: none; }
.ai-col li:last-child { border-bottom: 0; }

/* ---------- ABOUT ---------- */
.about .cols { align-items: start; row-gap: 3rem; }
.about-photo { grid-column: 1 / span 5; perspective: 1200px; }
.about-photo .frame { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: var(--surface); transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .6s var(--ease); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(var(--drift, 1.08)); will-change: transform; }
.about-text { grid-column: 7 / span 6; display: grid; gap: 2.25rem; align-content: start; padding-top: .5rem; }
.about-text p.big { font-size: clamp(1.25rem, 1.75vw, 1.625rem); line-height: 1.55; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.facts dt { margin-bottom: .35rem; font-size: .875rem; }
.facts dd { font-weight: 600; }
.tools { display: flex; flex-wrap: wrap; gap: .5rem; }
.tools li { font-family: var(--font-mono); font-size: .9375rem; padding: .5rem .8rem; background: var(--surface); border-radius: var(--radius); direction: ltr; transition: background-color .2s, color .2s; }
.tools li:hover { background: var(--bone); color: var(--bg); }

/* ---------- CONTACT ---------- */
.contact .cols { row-gap: 3rem; align-items: start; }
.contact-copy { grid-column: 1 / span 5; display: grid; gap: 1.5rem; align-content: start; }
.contact-copy .intro { font-size: var(--step-lead); max-width: 30ch; }
.reach-list { display: grid; gap: 0; margin-top: 1rem; }
.reach-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); font-weight: 600; transition: color .2s, padding .3s var(--ease); }
.reach-list a:first-child { border-top: 1px solid var(--line); }
.reach-list a:hover { color: var(--signal); padding-inline-start: .5rem; }
.reach-list .v { direction: ltr; font-family: var(--font-mono); font-weight: 500; font-size: 1rem; color: var(--steel); }
.form { grid-column: 7 / span 6; background: var(--surface); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.75rem); display: grid; gap: 1.35rem; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.fld { display: grid; gap: .5rem; }
.fld label { font-weight: 600; font-size: 1rem; }
.fld select, .fld textarea, .fld input {
  width: 100%; background: var(--bg); color: var(--bone); border: 1px solid rgb(139 144 153 / .32); border-radius: var(--radius);
  padding: .85rem 1rem; font-size: 1rem; min-height: 52px; transition: border-color .2s, box-shadow .2s;
}
.fld textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.fld select { appearance: none; -webkit-appearance: none; background-image: none; padding-inline-end: 2.5rem; }
.fld .sel { position: relative; }
.fld .sel::after { content: ""; position: absolute; inset-inline-end: 1rem; top: 50%; width: 8px; height: 8px; border-bottom: 2px solid var(--steel); border-inline-end: 2px solid var(--steel); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.fld select:focus, .fld textarea:focus, .fld input:focus { outline: 1px solid var(--signal); outline-offset: 0; border-color: var(--signal); }
.fld .err { color: var(--signal); font-size: .875rem; min-height: 0; display: none; }
.fld.bad .err { display: block; }
.fld.bad select, .fld.bad textarea { border-color: var(--signal); }
.form .note { color: var(--steel); font-size: .9375rem; }
.form .sent { color: var(--bone); font-size: .9375rem; display: none; }
.form.is-sent .sent { display: block; }
.form-foot { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; }

/* ---------- FOOTER: picture + facts ---------- */
.footer { position: relative; z-index: 1; margin-top: calc(var(--section-gap) / 2); }
.footer .cols { column-gap: 0; }
.foot-visual { grid-column: 1 / span 6; min-height: 60svh; position: relative; background: var(--bg); overflow: hidden; }
.foot-visual .stage3d canvas { opacity: 0; }
.foot-visual .stage3d.is-ready canvas { opacity: 1; }
.foot-visual .fallback-logo { position: absolute; inset: 0; display: grid; place-items: center; color: var(--bone); }
.foot-visual .fallback-logo .logo { width: 40%; height: auto; }
.foot-visual.has-3d .fallback-logo { display: none; }
.foot-facts { grid-column: 7 / span 6; background: var(--surface); padding: clamp(2rem, 4vw, 4rem); display: grid; gap: 2rem; align-content: space-between; }
.foot-line { font-family: var(--font-head); font-weight: 700; font-size: min(var(--step-h2), 6vw); line-height: 1.08; letter-spacing: -.02em; max-width: 14ch; }
html[lang="en"] .foot-line { font-weight: 600; letter-spacing: -.035em; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.foot-grid h4 { margin-bottom: .85rem; }
.foot-grid a { display: block; padding-block: .3rem; color: var(--bone); transition: color .2s; }
.foot-grid a:hover { color: var(--signal); }
.foot-legal { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--steel); font-size: .875rem; }
.foot-legal .brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--bone); }

/* ---------- PRODUCT PAGE ---------- */
.p-hero .hero-copy { grid-column: 1 / span 5; }
.identity .cols { align-items: center; row-gap: 3rem; }
.identity-copy { grid-column: 1 / span 5; display: grid; gap: 1.5rem; align-content: start; }
.identity-copy p { font-size: var(--step-lead); max-width: 32ch; }
.mode-switch { display: inline-flex; padding: 4px; background: var(--surface); border-radius: 999px; gap: 4px; justify-self: start; }
.mode-switch button { height: 44px; padding-inline: 1.25rem; border-radius: 999px; font-weight: 600; color: var(--steel); transition: background-color .25s, color .25s; }
.mode-switch button[aria-pressed="true"] { background: var(--bone); color: var(--bg); }
.flip { grid-column: 7 / span 6; perspective: 2000px; }
.flip-inner { position: relative; aspect-ratio: 16 / 10; transform-style: preserve-3d; transition: transform 1.1s var(--ease-io); transform: rotateY(var(--flip, 0deg)) rotateX(var(--rx, 0deg)); }
.flip-face { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--surface); }
.flip-face img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.flip-face.back { transform: rotateY(180deg); }
.flip-edge { position: absolute; inset: 0; transform: translateZ(-14px); background: #050506; border-radius: var(--radius); }

.feat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feat-grid .card { gap: .8rem; }
.feat-grid .card .tag { margin-bottom: 1.25rem; }

.aud-list { border-top: 1px solid var(--line); }
.aud-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: var(--gutter); align-items: center; padding-block: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); transition: padding .4s var(--ease); }
.aud-row .h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); transition: transform .4s var(--ease), color .3s; }
.aud-row p { font-size: var(--step-lead); color: var(--bone); }
.aud-row:hover .h2 { color: var(--signal); transform: translateX(calc(var(--dirx, 1) * 10px)); }
html[dir="rtl"] .aud-row:hover .h2 { --dirx: -1; }

.start-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.start-steps li { display: grid; gap: .8rem; align-content: start; padding-top: 1.5rem; border-top: 2px solid var(--bone); }
.start-steps .big { font-family: var(--font-mono); font-size: clamp(2.5rem, 4vw, 3.75rem); line-height: 1; color: var(--steel); margin-bottom: .75rem; }
.start-steps li:hover .big { color: var(--signal); }
.start-steps p { font-size: var(--step-lead); }

.pricing .cols { align-items: end; row-gap: 2rem; }
.pricing .h2 { grid-column: 1 / span 4; }
.pricing .statement { grid-column: 5 / span 5; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 2.4vw, 2.25rem); line-height: 1.25; }
.pricing .actions { grid-column: 10 / span 3; justify-self: end; }

.faq-list { border-top: 1px solid var(--line); max-width: 920px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.4rem; font-size: var(--step-lead); font-weight: 600; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .pm { width: 14px; height: 14px; position: relative; flex: none; }
.faq-list summary .pm::before, .faq-list summary .pm::after { content: ""; position: absolute; background: var(--bone); inset-inline: 0; top: 6px; height: 2px; transition: transform .3s var(--ease); }
.faq-list summary .pm::after { transform: rotate(90deg); }
.faq-list details[open] .pm::after { transform: rotate(0); }
.faq-list details p { padding-bottom: 1.5rem; max-width: 60ch; color: var(--bone); }

/* ---------- maintenance ---------- */
.maint { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-items: center; text-align: center; padding: 2rem; }
.maint .logo { width: 64px; height: 64px; margin: 0 auto 1.5rem; color: var(--bone); }

/* ---------- reveal (calm, brand) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="picture"] { opacity: 1; transform: none; clip-path: inset(10% 12% round var(--radius)); transition: clip-path 1.1s var(--ease); }
.js [data-reveal="picture"].is-in { clip-path: inset(0 0 round var(--radius)); }
html.no-reveal [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .portrait .plate { display: none; }
  .hero-copy, .p-hero .hero-copy { grid-column: 1 / span 7; }
  .hero-photo { grid-column: 8 / span 4; }
  .cards { grid-template-columns: 1fr 1fr; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.5rem; }
  .proj-story { grid-column: 1 / -1; }
  .proj-title { grid-column: 1 / -1; }
  .proj-offers { grid-column: 1 / -1; grid-row: auto; }
  .proj-web .proj-visual, .proj-web .proj-text { grid-column: 1 / -1; }
  .teaser-copy, .identity-copy, .contact-copy, .about-text { grid-column: 1 / -1; }
  .teaser-visual, .flip, .form { grid-column: 1 / -1; }
  .about-photo { grid-column: 1 / span 8; }
  .pricing .h2, .pricing .statement, .pricing .actions { grid-column: 1 / -1; justify-self: start; }
  .sec-head .h2, .sec-head .intro { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --gutter: 1rem; }
  .gridlines > div { --cols: 4; }
  .hud-row { padding-top: 14px; }
  .hud-tab { height: 46px; }
  .hud-brand .nm { display: none; }
  .hud-menu .lbl { font-size: .9375rem; }
  .hud-action { inset-inline-start: var(--margin); bottom: calc(16px + env(safe-area-inset-bottom)); --h: 48px; }
  .wa-float { width: 48px; height: 48px; bottom: calc(16px + env(safe-area-inset-bottom)); }

  .hero-inner { padding-top: 92px; padding-bottom: 28px; align-items: start; }
  .hero-inner > .cols { row-gap: 1.5rem; }
  .hero-copy, .hero-photo, .p-hero .hero-copy { grid-column: 1 / -1; }
  .hero-copy .tag { margin-bottom: 1.1rem; }
  .hero-copy h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); margin-bottom: 1rem; }
  .hero-copy .lead { font-size: 1.1875rem; }
  .hero-copy .sub { font-size: .9375rem; margin-top: .4rem; }
  .hero-actions { margin-top: 1.4rem; gap: .25rem 1.25rem; }
  .hero-photo { width: 52%; justify-self: start; }
  .portrait { max-height: 36svh; aspect-ratio: 5 / 7; }
  .portrait .plate { display: none; }
  .hero-foot { display: none; }
  .layer-labels { display: none; }

  .cards, .feat-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .steps::before { inset-inline: auto; inset-inline-start: 6px; top: 0; bottom: 0; width: 1px; height: auto; }
  .step { padding-top: 0; padding-inline-start: 2.5rem; padding-bottom: 2rem; }
  .step::before { top: 6px; }
  .proj-story { grid-template-columns: 1fr; gap: 1.5rem; }
  .reel-card figcaption { font-size: .875rem; }
  .reel.is-static .reel-stage { grid-template-columns: 1fr; gap: 14px; }
  .tilt-float { width: 58%; }
  .teaser-visual { min-height: 18rem; }
  .ai-cols { grid-template-columns: 1fr; }
  .about-photo { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .form .row2 { grid-template-columns: 1fr; }
  .foot-visual, .foot-facts { grid-column: 1 / -1; }
  .foot-visual { min-height: 46svh; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-legal { padding-bottom: 72px; }
  .menu { padding-top: 90px; }
  .menu-inner { grid-template-columns: 1fr; gap: 2rem; align-content: start; }
  .aud-row { grid-template-columns: 1fr; gap: .5rem; }
  .start-steps { grid-template-columns: 1fr; row-gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .layer-label .lt { max-width: 18rem; opacity: 1; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  .card, .portrait, .about-photo .frame { transform: none !important; }
}

@media print {
  .hud, .hud-action, .wa-float, .menu, .gridlines, .stage3d { display: none !important; }
  body { background: #fff; color: #000; }
}
