/* ==========================================================================
   Rukn Al-Watad — site styles
   ========================================================================== */

:root {
  --bg: #0f100d;
  --bg-2: #141511;
  --surface: #191a16;
  --surface-2: #1f201b;
  --line: #2a2b25;
  --line-2: #373831;
  --ink: #ece9e1;
  --ink-2: #b9b6ad;
  --muted: #85837b;
  --accent: #5bfea1;
  --accent-ink: #04170c;
  --sand: #9d77ff; /* brand purple, lifted for contrast on dark */
  --warn: #e8a84a;
  --danger: #ef7a6a;

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-serif: "Newsreader", Georgia, serif;
  --f-ar: "Noto Kufi Arabic", "Geeza Pro", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* subtle film grain so the dark isn't flat */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .035;
  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; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.02em; line-height: 1.08; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.label, .eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px;
  font: 500 15px/1 var(--f-sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #86ffbb; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: auto; height: 36px; }
.brand-name { font-weight: 600; letter-spacing: -.01em; }
.brand-ar { font-family: var(--f-ar); font-size: 13px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-2); }

.nav { display: flex; align-items: center; gap: 30px; font-size: 14px; color: var(--ink-2); }
.nav a { transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav-cta { color: var(--ink) !important; border: 1px solid var(--line-2); padding: 8px 16px; border-radius: 999px; }
.nav-cta:hover { border-color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 19.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 19.5px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 0; position: relative; }
.hero::after {
  /* faint grid, fading out */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 70%);
  opacity: .5;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.hero h1 { font-size: clamp(40px, 6.4vw, 80px); letter-spacing: -.035em; line-height: 1.02; }
.hero h1 em { color: var(--accent); }
.lede { margin-top: 26px; max-width: 34em; font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 44px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-meta div { min-width: 0; }
.hero-meta dt { font: 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hero-meta dd { margin: 4px 0 0; font-size: 14px; }

.hero-panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 12.5px;
}
.panel-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.lights { display: flex; gap: 6px; }
.lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.panel-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }

.log { padding: 14px 16px; min-height: 196px; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; }
.log li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: baseline; color: var(--ink-2); animation: logIn .45s var(--ease) both; }
.log li b { color: var(--ink); font-weight: 500; }
.log time { color: var(--muted); }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }
.tag { font-size: 10.5px; padding: 1px 6px; border-radius: 4px; letter-spacing: .04em; min-width: 46px; text-align: center; }
.t-in  { background: rgba(157,119,255,.14); color: var(--sand); }
.t-ok  { background: rgba(91,254,161,.1);  color: var(--accent); }
.t-out { background: rgba(236,233,225,.08); color: var(--ink); }

.panel-foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.panel-foot > div { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.panel-foot > div + div { border-left: 1px solid var(--line); }
.panel-foot .k { color: var(--muted); font-size: 11px; }
.panel-foot .v { font-family: var(--f-sans); font-size: 26px; font-weight: 500; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.panel-foot .u { color: var(--muted); font-size: 11px; }

.hero-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 24px; padding-bottom: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.hero-strip ul { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.hero-strip li { color: var(--ink-2); font-weight: 500; letter-spacing: -.01em; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }
.section-head { margin-bottom: clamp(40px, 6vw, 64px); }
.section-head .label { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.03em; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.section-note { max-width: 30em; color: var(--ink-2); }

/* ---------- Services ---------- */
.services {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.service {
  position: relative;
  padding: clamp(28px, 3.5vw, 44px);
  background: var(--bg);
  transition: background .4s var(--ease);
}
.service:nth-child(odd) { border-right: 1px solid var(--line); }
.service:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.service::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .5s var(--ease);
}
.service:hover { background: var(--surface); }
.service:hover::before { width: 100%; }
.service-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 44px; }
.num { font: 13px var(--f-mono); color: var(--muted); }
.chip { font: 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); border: 1px solid var(--line-2); padding: 4px 10px; border-radius: 999px; }
.service h3 { font-size: clamp(22px, 2.2vw, 28px); margin-bottom: 14px; }
.service p { color: var(--ink-2); max-width: 36em; }
.ticks { margin-top: 24px; display: grid; gap: 8px; font-size: 14px; }
.ticks li { display: flex; align-items: center; gap: 10px; }
.ticks li::before { content: ""; width: 14px; height: 1px; background: var(--accent); flex: none; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font: 500 13px var(--f-sans); color: var(--ink-2);
  background: transparent; border: 1px solid var(--line-2);
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: all .25s var(--ease);
}
.filter sup { font: 10px var(--f-mono); color: var(--muted); margin-left: 2px; }
.filter:hover { color: var(--ink); border-color: var(--ink-2); }
.filter.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter.is-active sup { color: var(--bg); opacity: .6; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: translate .5s var(--ease), border-color .3s, opacity .8s var(--ease), transform .8s var(--ease), box-shadow .5s var(--ease);
}
.project:hover { translate: 0 -4px; border-color: var(--line-2); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.project.wide { grid-column: 1 / -1; flex-direction: row; }
.project.wide .shot { flex: 1.1; min-height: 320px; }
.project.wide .project-body { flex: 1; justify-content: center; }
.project.is-hidden { display: none; }
.project.is-entering { animation: cardIn .5s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }

.project-body { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3vw, 36px); }
.p-meta { display: flex; gap: 8px; font: 11px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.p-meta span + span::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.project h3 { font-size: clamp(20px, 2vw, 25px); }
.project h3 .ar { font-family: var(--f-ar); font-size: .8em; color: var(--sand); font-weight: 400; }
.project-body > p { color: var(--ink-2); font-size: 15px; }
.impact { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--line-2); color: var(--ink) !important; }
.impact span { display: block; font: 10.5px var(--f-mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.stack-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.stack-tags li { font: 12px var(--f-mono); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 6px; }

/* Project "screenshots": all drawn in CSS so there are no stock images */
.shot {
  position: relative; min-height: 250px;
  background:
    radial-gradient(circle at 20% 0%, rgba(91,254,161,.07), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 28px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-2);
}
.project.wide .shot { border-bottom: 0; border-right: 1px solid var(--line); }
.shot > * { transition: transform .6s var(--ease); }
.project:hover .shot > * { transform: translateY(-3px); }

/* media */
.shot-media { gap: 0; }
.browser { width: 78%; max-width: 440px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.b-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.b-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.b-bar span { margin-left: 10px; font-size: 10.5px; color: var(--muted); background: var(--bg); padding: 2px 10px; border-radius: 4px; }
.b-body { padding: 14px; display: grid; gap: 12px; }
.news-hero { height: 96px; border-radius: 6px; background: linear-gradient(135deg, #2b2d26, #1b1c18); position: relative; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.news-hero b { height: 7px; width: 70%; background: var(--ink); opacity: .8; border-radius: 2px; }
.news-hero b.s { width: 45%; opacity: .35; }
.breaking { position: absolute; top: 10px; left: 10px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; background: var(--danger); color: #1a0703; padding: 2px 6px; border-radius: 3px; }
.news-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.news-cols div { height: 44px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.phone { width: 116px; height: 216px; margin-left: -46px; margin-top: 60px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 20px; padding: 18px 9px 9px; display: grid; gap: 7px; align-content: start; box-shadow: -20px 20px 40px -10px rgba(0,0,0,.6); position: relative; }
.notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 34px; height: 5px; border-radius: 3px; background: var(--bg); }
.p-card { height: 58px; border-radius: 7px; background: linear-gradient(135deg, #2b2d26, #1b1c18); }
.p-line { height: 5px; border-radius: 2px; background: var(--ink); opacity: .5; }
.p-line.s { width: 60%; opacity: .25; }

/* calendar */
.shot-cal { flex-direction: column; align-items: stretch; gap: 12px; }
.cal-head { display: flex; justify-content: space-between; color: var(--ink); font-size: 12px; }
.cal-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10.5px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.cal-legend .b { background: var(--accent); }
.cal-legend .h { background: var(--sand); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-grid span { aspect-ratio: 1.3; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: flex-start; padding: 3px 5px; font-size: 9.5px; color: var(--muted); }
.cal-grid span.b { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); }
.cal-grid span.h { background: color-mix(in srgb, var(--sand) 18%, var(--surface)); border-color: color-mix(in srgb, var(--sand) 40%, transparent); color: var(--ink); }
.cal-grid span.x { visibility: hidden; }

/* chat */
.shot-chat { flex-direction: column; gap: 10px; align-items: stretch; }
.chat { display: flex; flex-direction: column; gap: 8px; font-family: var(--f-ar); font-size: 12.5px; line-height: 1.7; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; }
.msg.in { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); border-top-right-radius: 3px; }
.msg.out { align-self: flex-end; background: #1d3b2d; color: #d9f5e7; border-top-left-radius: 3px; }
.msg small { opacity: .7; }
.pipe { height: 22px; display: flex; justify-content: center; }
.pipe span { width: 1px; height: 100%; background: repeating-linear-gradient(to bottom, var(--accent) 0 4px, transparent 4px 8px); background-size: 1px 16px; animation: flow 1s linear infinite; }
@keyframes flow { to { background-position: 0 16px; } }
.crm-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; }
.crm-row b { color: var(--ink); font-weight: 500; }

/* table */
.shot-table { flex-direction: column; align-items: stretch; gap: 0; padding: 24px; }
.t-head, .t-row { display: grid; grid-template-columns: 1.4fr 1fr .8fr 1fr; gap: 10px; align-items: center; padding: 9px 10px; }
.t-head { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line-2); }
.t-row { border-bottom: 1px solid var(--line); }
.t-row span:first-child { color: var(--ink); }
.pill { justify-self: start; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; }
.pill.ok { background: rgba(91,254,161,.12); color: var(--accent); }
.pill.warn { background: rgba(232,168,74,.14); color: var(--warn); }
.pill.exp { background: rgba(239,122,106,.14); color: var(--danger); }

/* monitor */
.shot-monitor { flex-direction: column; align-items: stretch; gap: 14px; }
.mon-top { display: flex; align-items: baseline; gap: 12px; }
.mon-top b { font: 500 28px var(--f-sans); color: var(--ink); letter-spacing: -.02em; }
.mon-top .up { color: var(--accent); }
.spark { width: 100%; height: 80px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 600; stroke-dashoffset: 600; }
.reveal.in .spark polyline { animation: draw 1.8s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sources { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 11px; }
.sources li { display: flex; align-items: center; gap: 6px; }
.sources b { color: var(--ink); font-weight: 500; }
.sources i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.sources li:nth-child(2) i { background: var(--sand); }
.sources li:nth-child(3) i { background: var(--ink-2); }

/* tree */
.shot-tree { flex-direction: column; gap: 22px; }
.node { background: var(--surface-2); border: 1px solid var(--line-2); padding: 7px 12px; border-radius: 7px; color: var(--ink); text-align: center; white-space: nowrap; }
.node.root { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); position: relative; }
.node.root::after { content: ""; position: absolute; left: 50%; top: 100%; height: 22px; width: 1px; background: var(--line-2); }
.branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; position: relative; padding-top: 14px; width: 100%; max-width: 480px; }
.branches::before { content: ""; position: absolute; top: 0; left: 16.6%; right: 16.6%; height: 1px; background: var(--line-2); }
.col { display: grid; gap: 7px; justify-items: center; position: relative; }
.col::before { content: ""; position: absolute; top: -14px; left: 50%; height: 14px; width: 1px; background: var(--line-2); }
.leaf { font-size: 11px; color: var(--muted); border: 1px dashed var(--line-2); padding: 4px 10px; border-radius: 6px; width: 100%; text-align: center; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 32px 28px 8px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-num { font-size: clamp(44px, 5.5vw, 72px); font-weight: 400; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: .32em; color: var(--accent); margin-left: 4px; letter-spacing: 0; font-family: var(--f-mono); vertical-align: top; position: relative; top: .5em; }
.stat-label { margin-top: 16px; color: var(--ink-2); font-size: 14px; max-width: 18em; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.process li { position: relative; padding-top: 26px; border-top: 1px solid var(--line-2); }
.process li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.step { font: 12px var(--f-mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.process h3 { font-size: 21px; margin: 12px 0 10px; }
.process p { color: var(--ink-2); font-size: 15px; }

/* ---------- Stack marquee ---------- */
.stack-section { padding-bottom: clamp(60px, 8vw, 100px); }
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; }
.marquee li { display: flex; flex-direction: column; gap: 2px; padding: 26px 44px; border-right: 1px solid var(--line); }
.marquee b { font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -.02em; white-space: nowrap; transition: color .2s; }
.marquee li:hover b { color: var(--accent); }
.marquee span { font: 11px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy h2 { font-size: clamp(34px, 4.6vw, 58px); letter-spacing: -.03em; margin-top: 18px; }
.contact-copy h2 em { color: var(--accent); }
.contact-direct { margin-top: 44px; border-top: 1px solid var(--line); }
.contact-direct li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; flex-wrap: wrap; }
.contact-direct span { font: 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding-top: 3px; }
.contact-direct a { border-bottom: 1px solid var(--line-2); transition: border-color .2s, color .2s; }
.contact-direct a:hover { color: var(--accent); border-color: var(--accent); }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(22px, 3.5vw, 40px); display: grid; gap: 22px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 13px; color: var(--ink-2); padding: 0; }
.field legend { margin-bottom: 8px; }
input[type="text"], select, textarea {
  width: 100%; font: 15px var(--f-sans); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 13px 14px; transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #5f5d56; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select { cursor: pointer; padding-right: 40px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-block; font-size: 13.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); transition: all .2s var(--ease); }
.choices label:hover span { border-color: var(--ink-2); color: var(--ink); }
.choices input:checked + span { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: var(--accent); color: var(--ink); }
.choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-note { font-size: 13px; color: var(--muted); text-align: center; margin-top: -8px; }
.form-note.ok { color: var(--accent); }
.form-note.err { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 88px) 0 28px; background: var(--bg-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-logo { display: flex; align-items: center; gap: 18px; }
.footer-logo img { height: clamp(56px, 8vw, 96px); width: auto; }
.footer-ar { font-family: var(--f-ar); font-weight: 600; font-size: clamp(44px, 7vw, 88px); line-height: 1.2; color: var(--ink); }
.footer-line { max-width: 30em; color: var(--ink-2); margin-top: 12px; }
.footer-cols { display: flex; gap: clamp(40px, 7vw, 96px); }
.footer-cols div { display: grid; gap: 10px; align-content: start; font-size: 14px; }
.footer-cols h4 { font: 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.footer-cols a { color: var(--ink-2); transition: color .2s; }
.footer-cols a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-bottom a:hover { color: var(--ink); }

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

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { max-width: 560px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; }
  .process { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: all .3s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--ink); }
  .nav-cta { margin-top: 16px; text-align: center; border-bottom: 1px solid var(--line-2) !important; padding: 12px !important; }
  .brand-ar { display: none; }

  .services { grid-template-columns: 1fr; }
  .service:nth-child(odd) { border-right: 0; }
  .service:not(:last-child) { border-bottom: 1px solid var(--line); }
  .service-top { margin-bottom: 28px; }

  .projects { grid-template-columns: 1fr; }
  .project.wide { flex-direction: column; }
  .project.wide .shot { min-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .hero-strip { flex-direction: column; align-items: flex-start; }
  .panel-foot .v { font-size: 20px; }
  .log { font-size: 11.5px; }
  .log li { grid-template-columns: auto 1fr; }
  .log time { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding-left: 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); margin-top: 24px; }
  .process { grid-template-columns: 1fr; }
  .shot { padding: 20px; }
  .phone { width: 96px; height: 180px; margin-left: -40px; }
  .t-head, .t-row { grid-template-columns: 1.3fr .9fr .7fr 1fr; gap: 6px; padding: 8px 4px; font-size: 11px; }
  .branches { gap: 8px; }
  .node { font-size: 11px; padding: 6px 8px; }
  .footer-cols { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .spark polyline { stroke-dashoffset: 0; }
}

.btn:disabled { opacity: .6; cursor: progress; }
.form-note a { color: var(--ink); border-bottom: 1px solid currentColor; }
