/* Habib IT Solutions — dark premium theme. Inter is self-hosted (SIL OFL, fonts/OFL.txt). */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #18181c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --orange: #f45125;
  --orange-soft: #ff7a4d;
  --orange-text: #ff7a4d;
  --text-soft: #d4d4d8;
  --on-orange: #0b0b0c;
  --header-bg: rgba(9, 9, 11, 0.72);
  --cap-bg: rgba(9, 9, 11, 0.72);
  --live: #86efac;
  --live-dot: #4ade80;
  --error-text: #fdba74;
  --glow: rgba(244, 81, 37, .22);
  --glow-2: rgba(244, 81, 37, .06);
  --grid-opacity: .55;
  --btn-light-bg: #f4f4f5;
  --btn-light-hover: #ffffff;
  --btn-light-text: #0b0b0c;
  --ghost-hover: rgba(255,255,255,.04);
  --ghost-hover-line: rgba(255,255,255,.35);
  --visual-a: radial-gradient(120% 90% at 50% 0%, #1e3a8a 0%, #0f172a 55%, #0b0f1c 100%);
  --visual-b: radial-gradient(120% 90% at 50% 0%, #5b21b6 0%, #1e1033 55%, #120a1f 100%);
  --reflection: rgba(0,0,0,.6);
  --backdrop: rgba(0,0,0,.8);
  color-scheme: dark;
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--orange); color: var(--on-orange); }
.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 16px; background: var(--text); color: var(--bg); border-radius: 8px; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 76px; }
.brand { display: inline-flex; flex-direction: column; line-height: 1; margin-right: auto; }
.brand b { font-size: 30px; font-weight: 700; letter-spacing: -0.06em; }
.brand b span { color: var(--orange); }
.brand small { font-size: 9px; font-weight: 600; letter-spacing: 0.32em; color: var(--muted); margin-top: 6px; padding-left: 2px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--muted); }
.nav a { transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; border: 0; cursor: pointer; transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-primary { background: var(--orange); color: var(--on-orange); }
.btn-primary:hover { background: var(--orange-soft); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ghost-hover-line); background: var(--ghost-hover); }
.btn-light { background: var(--btn-light-bg); color: var(--btn-light-text); }
.btn-light:hover { background: var(--btn-light-hover); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Type ---------- */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(244, 81, 37, .18); }
.h1 { font-size: clamp(40px, 5.6vw, 80px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; }
.h2 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 700; }
.h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; color: var(--muted); }
.dot { color: var(--orange); }
.muted { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 5vw, 64px) 0 0; overflow: hidden; isolation: isolate; }
.hero::before { /* soft light behind the displays */
  content: ""; position: absolute; z-index: -1; left: 50%; top: 34%; width: min(1300px, 140vw); height: 760px; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--glow), var(--glow-2) 55%, transparent 75%);
  filter: blur(10px); pointer-events: none;
}
.hero::after { /* fine grid, fading out */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  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% 55% at 50% 30%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 80%); opacity: var(--grid-opacity);
}
.hero-copy { text-align: center; max-width: 900px; margin: 0 auto; }
.hero-copy .h1 { margin: 18px 0 18px; }
.hero-copy .lead { max-width: 620px; margin: 0 auto; }
.hero-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- The three displays ---------- */
.screens { position: relative; width: min(1320px, 100%); margin: clamp(40px, 4.5vw, 56px) auto 0; aspect-ratio: 2.25; container-type: inline-size; perspective: 1800px; }
.screens-rig { position: absolute; inset: 0; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .7s var(--ease); }
.display { position: absolute; top: 0; }
.display-lift { transform: translate3d(0, var(--lift, 0px), 0); will-change: transform; }
.display-float { animation: float 8s ease-in-out infinite; }
.display--center { left: 20%; width: 60%; z-index: 3; }
.display--left { left: -5%; top: 14%; width: 38%; z-index: 1; transform: rotate(-3deg); }
.display--right { left: 67%; top: 14%; width: 38%; z-index: 2; transform: rotate(3deg); }
.display--left .display-float { animation-duration: 9s; animation-delay: -3s; }
.display--right .display-float { animation-duration: 10s; animation-delay: -5s; }
.bezel {
  position: relative; padding: 0.55cqw; border-radius: 1.1cqw;
  background: #0d0d0f; border: 1px solid #2c2c31;
  box-shadow: 0 0 0 1px #000 inset, 0 3cqw 5cqw -1.5cqw rgba(0, 0, 0, .75), 0 0 0 .14cqw #3a3a40;
}
.bezel::after { /* glass reflection */
  content: ""; position: absolute; inset: .55cqw; border-radius: .6cqw; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.07), rgba(255,255,255,0) 38%);
}
.glass { aspect-ratio: 16 / 10; border-radius: .6cqw; overflow: hidden; font-size: 1cqw; line-height: 1.35; position: relative; }
.display--center .glass { aspect-ratio: 16 / 10; }
.chrome { height: 2.1cqw; display: flex; align-items: center; gap: .9cqw; padding: 0 1cqw; font-size: .62cqw; }
.chrome i { width: .62cqw; height: .62cqw; border-radius: 50%; background: #3f3f46; display: inline-block; }
.chrome i:nth-child(1) { background: #ff5f57; } .chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.chrome .url { margin: 0 auto; padding: .25cqw 2cqw; border-radius: .4cqw; }
.display-reflection { position: absolute; left: 6%; right: 6%; bottom: -3.2cqw; height: 2cqw; border-radius: 50%; background: var(--reflection); filter: blur(1.4cqw); z-index: -1; }

/* Left: a client website */
.ui-site { background: #f5f3ef; color: #18181b; height: 100%; }
.ui-site .chrome { background: #e7e5e0; color: #71717a; }
.ui-site .chrome .url { background: #f5f3ef; }
.ui-site-body { padding: 1.6cqw 2.2cqw; }
.ui-site-nav { display: flex; align-items: center; justify-content: space-between; font-size: .7cqw; color: #52525b; }
.ui-site-nav b { font-size: 1.3cqw; color: #18181b; letter-spacing: -.05em; }
.ui-site-nav b span { color: var(--orange); }
.ui-site-nav em { font-style: normal; background: #18181b; color: #fff; padding: .35cqw .8cqw; border-radius: 1cqw; }
.ui-site h4 { margin: 2.2cqw 0 .8cqw; font-size: 2.6cqw; line-height: 1.02; letter-spacing: -.05em; font-weight: 700; }
.ui-site p { font-size: .75cqw; color: #52525b; max-width: 60%; }
.ui-site-tiles { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .7cqw; margin-top: 1.6cqw; }
.ui-site-tiles span { aspect-ratio: 1.1; border-radius: .5cqw; background: #e4e1da; }
.ui-site-tiles span:first-child { background: #18181b; position: relative; overflow: hidden; }
.ui-site-tiles span:first-child::after { content: ""; position: absolute; right: -20%; bottom: -30%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: var(--orange); }
.ui-site-tiles span:nth-child(2) { background: #f3c8b5; }

/* Center: the workspace dashboard */
.ui-dash { background: #0f0f12; color: #e4e4e7; height: 100%; display: grid; grid-template-columns: 18% 1fr; grid-template-rows: auto 1fr; }
.ui-dash .chrome { grid-column: 1 / -1; background: #17171b; color: #71717a; border-bottom: 1px solid #222228; }
.ui-dash .chrome .url { background: #0f0f12; }
.ui-side { border-right: 1px solid #222228; padding: 1.3cqw 1cqw; display: flex; flex-direction: column; gap: .55cqw; font-size: .68cqw; color: #a1a1aa; }
.ui-side b { font-size: 1.35cqw; color: #fff; letter-spacing: -.05em; margin-bottom: 1cqw; }
.ui-side b i { color: var(--orange); font-style: normal; }
.ui-side > span { padding: .45cqw .6cqw; border-radius: .4cqw; display: flex; align-items: center; gap: .5cqw; }
.ui-side > span::before { content: ""; width: .55cqw; height: .55cqw; border-radius: .15cqw; border: .1cqw solid currentColor; opacity: .7; }
.ui-side > span.on { background: #1f1f25; color: #fff; }
.ui-side .me { margin-top: auto; display: flex; align-items: center; gap: .5cqw; }
.ui-side .me i { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: linear-gradient(135deg, var(--orange), #ffb38a); }
.ui-main { padding: 1.4cqw 1.8cqw; min-width: 0; }
.ui-top { display: flex; justify-content: space-between; align-items: center; font-size: .66cqw; color: #71717a; }
.ui-top em { font-style: normal; background: var(--orange); color: #0b0b0c; font-weight: 600; padding: .35cqw .8cqw; border-radius: .4cqw; }
.ui-main h4 { font-size: 1.9cqw; letter-spacing: -.04em; margin: .9cqw 0 1.1cqw; font-weight: 650; }
.ui-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8cqw; }
.ui-kpis div { background: #17171b; border: 1px solid #232329; border-radius: .6cqw; padding: .8cqw .9cqw; }
.ui-kpis small { display: block; font-size: .6cqw; color: #71717a; }
.ui-kpis strong { display: block; font-size: 1.55cqw; letter-spacing: -.03em; margin-top: .25cqw; font-weight: 650; }
.ui-kpis strong i { font-style: normal; font-size: .62cqw; color: #4ade80; margin-left: .4cqw; font-weight: 500; }
.ui-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: .8cqw; margin-top: .8cqw; }
.ui-card { background: #17171b; border: 1px solid #232329; border-radius: .6cqw; padding: .9cqw; }
.ui-card h5 { margin: 0 0 .6cqw; font-size: .7cqw; font-weight: 600; color: #d4d4d8; display: flex; justify-content: space-between; }
.ui-card h5 span { color: #71717a; font-weight: 400; }
.ui-chart { width: 100%; height: 7.6cqw; display: block; }
.ui-list div { display: flex; align-items: center; gap: .6cqw; padding: .48cqw 0; border-top: 1px solid #232329; font-size: .64cqw; }
.ui-list div:first-of-type { border-top: 0; }
.ui-list i { width: .55cqw; height: .55cqw; border-radius: 50%; background: #4ade80; flex: none; }
.ui-list i.w { background: #fbbf24; } .ui-list i.o { background: var(--orange); }
.ui-list em { margin-left: auto; font-style: normal; color: #71717a; }

/* Right: the code editor */
.ui-code { background: #0d0d10; color: #d4d4d8; height: 100%; display: grid; grid-template-columns: 1fr 24%; grid-template-rows: auto 1fr; }
.ui-code .chrome { grid-column: 1 / -1; background: #16161a; color: #71717a; border-bottom: 1px solid #222228; }
.ui-code .chrome .url { background: #0d0d10; }
.ui-tree { grid-row: 2; grid-column: 2; border-left: 1px solid #222228; padding: 1cqw .8cqw; font-size: .62cqw; color: #a1a1aa; display: flex; flex-direction: column; gap: .45cqw; }
.ui-tree .f { padding-left: .9cqw; }
.ui-tree .on { color: #fff; background: #1f1f25; border-radius: .3cqw; padding: .2cqw .9cqw; }
.ui-editor { grid-row: 2; grid-column: 1; padding: 1cqw 1.2cqw; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .74cqw; line-height: 1.75; white-space: pre; overflow: hidden; counter-reset: ln; }
.ui-editor span.l { display: block; counter-increment: ln; }
.ui-editor span.l::before { content: counter(ln); display: inline-block; width: 1.6cqw; color: #3f3f46; text-align: right; margin-right: 1cqw; }
.k { color: #f472b6; } .f { color: #93c5fd; } .s { color: #fdba74; } .c { color: #52525b; } .t { color: #86efac; }
.cursor { display: inline-block; width: .12cqw; height: 1cqw; background: var(--orange); vertical-align: middle; animation: blink 1.1s steps(1) infinite; }

/* ---------- Facts strip ---------- */
.facts { margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 30px 24px 30px 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact strong { display: block; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.04em; font-weight: 700; }
.fact span { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: clamp(88px, 11vw, 144px) 0; }
.section-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .h2 { margin-top: 16px; }
.section-head .lead { max-width: 480px; justify-self: end; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s, transform .4s var(--ease); }
.service:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.service::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(244, 81, 37, .12), transparent 60%); }
.service:hover::before { opacity: 1; }
.service-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-strong); margin-bottom: 28px; color: var(--orange); }
.service-icon svg { width: 22px; height: 22px; }
.service p { color: var(--muted); margin-top: 12px; font-size: 16px; }
.service ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-size: 15px; color: var(--text-soft); }
.service li { display: flex; gap: 10px; align-items: baseline; }
.service li::before { content: ""; flex: none; width: 14px; height: 8px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg) translateY(-3px); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .3s; }
.project:hover { border-color: var(--line-strong); }
.project-visual { position: relative; height: 380px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; gap: 16px; padding: 48px 32px 0; }
.project-visual--blue { background: var(--visual-a); }
.project-visual--violet { background: var(--visual-b); }
.phone { width: 30%; max-width: 168px; flex: none; border-radius: 22px; padding: 5px; background: #0b0b0c; border: 1px solid #34343a; box-shadow: 0 30px 50px -20px rgba(0,0,0,.8); transition: transform .6s var(--ease); }
.phone img { border-radius: 17px; width: 100%; aspect-ratio: 600 / 1299; object-fit: cover; object-position: top; }
.phone:nth-child(2) { transform: translateY(28px); }
.project:hover .phone:nth-child(1) { transform: translateY(-8px); }
.project:hover .phone:nth-child(2) { transform: translateY(18px); }
.project:hover .phone:nth-child(3) { transform: translateY(-4px); }
.project-body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 13px; color: var(--text-soft); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.tag--live { color: var(--live); }
.tag--live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--live-dot); margin-right: 6px; vertical-align: middle; }
.project-body p { color: var(--muted); font-size: 16px; }
.project-link { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.project-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.project:hover .project-link svg { transform: translate(3px, -3px); }
.project-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 32px; padding: 28px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.project-wide img { width: 96px; height: 96px; border-radius: 22px; }
.project-wide .muted { font-size: 16px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; color: var(--orange-text); margin-bottom: 40px; }
.step p { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* About teaser */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.portrait { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 14px 18px; border-radius: 14px; background: var(--cap-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.portrait figcaption b { display: block; color: var(--text); font-size: 16px; }
.about .h2 { margin: 16px 0 24px; }
.about p + p { margin-top: 16px; }
.creds { list-style: none; padding: 0; margin: 32px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.creds li { background: var(--bg); padding: 18px 20px; }
.creds strong { display: block; font-size: 15px; font-weight: 600; }
.creds span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact .h2 { margin: 16px 0 20px; }
.contact-direct { margin-top: 36px; display: grid; gap: 12px; }
.contact-direct a, .contact-direct div { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s; }
.contact-direct a:hover { border-color: var(--line-strong); }
.contact-direct svg { width: 20px; height: 20px; color: var(--orange); flex: none; }
.contact-direct small { display: block; color: var(--faint); font-size: 13px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 3.4vw, 40px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text-soft); }
.field input, .field textarea { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(244, 81, 37, .16); }
.field textarea { min-height: 150px; resize: vertical; }
.contact-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.security-check { min-height: 65px; margin-bottom: 8px; }
.security-help, .form-bottom p { font-size: 13px; color: var(--faint); }
.security-help a, .form-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; }
.form-bottom p { max-width: 300px; }
.form-status { margin-top: 18px; font-size: 15px; padding: 12px 16px; border-radius: 12px; }
.form-status:empty { display: none; }
.form-status[data-state="error"] { background: rgba(244, 81, 37, .1); color: var(--error-text); border: 1px solid rgba(244, 81, 37, .25); }
.form-status[data-state="success"] { background: rgba(74, 222, 128, .1); color: var(--live); border: 1px solid rgba(74, 222, 128, .25); }
.form-status[data-state="pending"] { color: var(--muted); }
.form-fallback { font-size: 14px; margin-top: 12px; }

/* CTA band */
.cta { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px, 6vw, 72px); background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 32px; isolation: isolate; }
.cta::before { content: ""; position: absolute; z-index: -1; right: -10%; top: -60%; width: 60%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(244,81,37,.28), transparent 70%); }
.cta p { margin-top: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 14px; color: var(--text); font-size: 14px; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a:hover { color: var(--text); }
.footer-grid p { margin-top: 14px; max-width: 280px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }

/* ---------- Subpages ---------- */
.page-hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px); overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -280px; width: 1100px; height: 640px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(244, 81, 37, .16), transparent 70%); }
.page-hero .h1 { margin: 18px 0 20px; font-size: clamp(40px, 5.6vw, 76px); }
.page-hero .lead { max-width: 680px; }
.about-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.story { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); }
.story p { color: var(--muted); font-size: 18px; }
.story p + p { margin-top: 18px; }
.timeline { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.timeline time { color: var(--orange-text); font-weight: 600; font-size: 15px; }
.timeline p { color: var(--muted); margin-top: 6px; max-width: 680px; }
.case { padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.case-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; margin-bottom: 40px; }
.case-head .h2 { margin: 14px 0 10px; }
.case-head ul { margin: 16px 0 24px; padding-left: 20px; color: var(--muted); }
.case-head li + li { margin-top: 6px; }
.case-head p { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; padding: clamp(28px, 4vw, 48px); border-radius: 24px; border: 1px solid var(--line); }
.gallery a { display: block; }
.gallery .phone { width: 100%; max-width: none; }
.gallery a:hover .phone { transform: translateY(-6px); }
.gallery span { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.legal { max-width: 820px; }
.legal h2 { font-size: 22px; letter-spacing: -.02em; margin: 40px 0 12px; }
.legal p { color: var(--text-soft); }
.legal p + p { margin-top: 12px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal dl { display: grid; grid-template-columns: 220px 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.legal dt, .legal dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.legal dt { color: var(--muted); font-size: 15px; }

/* Image dialog */
.image-dialog { border: 1px solid var(--line); border-radius: 20px; padding: 48px 20px 20px; background: var(--surface); color: var(--text); max-width: 95vw; max-height: 95dvh; text-align: center; }
.image-dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); }
.image-dialog img { max-height: 78dvh; width: auto; margin: auto; border-radius: 12px; }
.image-dialog p { margin-top: 12px; font-size: 14px; color: var(--muted); }
.dialog-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); font-size: 22px; cursor: pointer; }

/* ---------- Motion ---------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink { 50% { opacity: 0; } }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero-copy > * { animation: rise .9s var(--ease) both; }
.js .hero-copy > :nth-child(2) { animation-delay: .08s; } .js .hero-copy > :nth-child(3) { animation-delay: .16s; } .js .hero-copy > :nth-child(4) { animation-delay: .24s; }
.js .screens { animation: rise-screens 1.3s var(--ease) .25s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-screens { from { opacity: 0; transform: translateY(60px) scale(.97); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .screens-rig, .display-lift { transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services, .steps { grid-template-columns: 1fr 1fr; }
  .services .service:last-child { grid-column: 1 / -1; }
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
  .section-head, .about, .contact, .about-hero, .story, .case-head { grid-template-columns: 1fr; }
  .section-head .lead { justify-self: start; }
  .projects { grid-template-columns: 1fr; }
  .project-wide { grid-template-columns: 1fr !important; gap: 18px; }
  .project-wide .btn { justify-self: start; }
  .cta { flex-direction: column; align-items: flex-start; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .legal dl { grid-template-columns: 1fr; }
  .legal dt { padding-bottom: 0; border-bottom: 0; }
  .portrait { max-width: 460px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { height: 64px; }
  .brand b { font-size: 26px; }
  .screens { width: 132%; margin-left: -16%; aspect-ratio: 2.2; }
  .services, .steps { grid-template-columns: 1fr; }
  .services .service:last-child { grid-column: auto; }
  .service, .step { padding: 24px; }
  .project-visual { height: 300px; padding: 32px 16px 0; gap: 10px; }
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact { padding: 22px 12px 22px 0; }
  .fact + .fact { padding-left: 12px; }
  .fact:nth-child(3) { padding-left: 0; }
  .creds { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .form-bottom { flex-direction: column; align-items: stretch; }
  .form-bottom .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 640px) { .hero-copy .h1 br { display: none; } }

/* ---------- Light theme: cream and orange ---------- */
:root[data-theme="light"] {
  --bg: #faf6ef;
  --surface: #fffdf9;
  --surface-2: #f4ede2;
  --line: rgba(74, 52, 30, 0.10);
  --line-strong: rgba(74, 52, 30, 0.18);
  --text: #1c1917;
  --muted: #6b6159;
  --faint: #8c8279;
  --orange-text: #c2410c;
  --text-soft: #44403c;
  --on-orange: #1c1917;
  --header-bg: rgba(250, 246, 239, 0.78);
  --cap-bg: rgba(255, 253, 249, 0.82);
  --live: #15803d;
  --live-dot: #22c55e;
  --error-text: #b4360c;
  --glow: rgba(244, 81, 37, .20);
  --glow-2: rgba(255, 170, 120, .10);
  --grid-opacity: .9;
  --btn-light-bg: #1c1917;
  --btn-light-hover: #3a332d;
  --btn-light-text: #faf6ef;
  --ghost-hover: rgba(74, 52, 30, .05);
  --ghost-hover-line: rgba(74, 52, 30, .35);
  --visual-a: radial-gradient(120% 90% at 50% 0%, #ffcfb4 0%, #fbe2d1 50%, #f6ebdf 100%);
  --visual-b: radial-gradient(120% 90% at 50% 0%, #f3c7a6 0%, #f6dcc8 50%, #f3ebe1 100%);
  --reflection: rgba(74, 52, 30, .35);
  --backdrop: rgba(28, 25, 23, .55);
  color-scheme: light;
}
:root[data-theme="light"] .bezel { box-shadow: 0 0 0 1px #000 inset, 0 3cqw 5cqw -1.5cqw rgba(74, 52, 30, .45), 0 0 0 .14cqw #3a3a40; }
:root[data-theme="light"] .phone { box-shadow: 0 30px 50px -24px rgba(74, 52, 30, .45); }
:root[data-theme="light"] .service::before { background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(244, 81, 37, .10), transparent 60%); }
:root[data-theme="light"] .creds li { background: var(--surface); }
:root[data-theme="light"] .field input, :root[data-theme="light"] .field textarea { background: #fffdf9; }
:root[data-theme="light"] .form-card { background: var(--surface); }

/* Theme switch */
.theme-toggle { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; transition: background-color .2s, border-color .2s; }
.theme-toggle:hover { background: var(--ghost-hover); border-color: var(--ghost-hover-line); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
body { transition: background-color .3s ease, color .3s ease; }

/* ---------- Website projects: browser frames ---------- */
.browser { display: block; border-radius: 12px; overflow: hidden; background: #0d0d0f; border: 1px solid #2c2c31; box-shadow: 0 30px 60px -28px rgba(0,0,0,.55); }
.browser-bar { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #17171b; border-bottom: 1px solid #222228; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3f3f46; }
.browser-bar i:nth-child(1) { background: #ff5f57; } .browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin: 0 auto; font-size: 11px; color: #a1a1aa; background: #0d0d0f; padding: 2px 14px; border-radius: 6px; transform: translateX(-20px); }
.browser img { width: 100%; aspect-ratio: 790 / 499; object-fit: cover; object-position: top; }
.project-feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; }
.feature-visual { position: relative; padding: 48px 64px 48px 40px; background: var(--visual-c); min-height: 100%; display: flex; align-items: center; }
.feature-visual .browser { width: 100%; transition: transform .6s var(--ease); }
.feature-phone { position: absolute; right: 22px; bottom: 26px; width: 22%; max-width: 128px; }
.project-feature:hover .feature-visual .browser { transform: translateY(-6px); }
.project-feature .project-body { padding: 40px; }
.web-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: clamp(20px, 3vw, 40px); border-radius: 24px; background: var(--visual-c); }
.web-gallery .browser { transition: transform .4s var(--ease); }
.web-gallery .browser:hover { transform: translateY(-6px); }
.web-phones { display: flex; gap: 20px; justify-content: center; margin-top: 20px; padding: clamp(24px, 3vw, 40px); border-radius: 24px; background: var(--visual-c); }
.web-phones a { width: 200px; }
.web-phones .phone { width: 100%; max-width: none; }
.web-phones span { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
:root { --visual-c: radial-gradient(120% 90% at 50% 0%, #3730a3 0%, #1e1b4b 55%, #0f0d24 100%); }
:root[data-theme="light"] { --visual-c: radial-gradient(120% 90% at 50% 0%, #dcd8fb 0%, #ece9fb 50%, #f6f2ea 100%); }
:root[data-theme="light"] .browser { box-shadow: 0 30px 60px -30px rgba(74, 52, 30, .45); }
@media (max-width: 860px) {
  .project-feature { grid-template-columns: 1fr; }
  .feature-visual { padding: 32px 56px 32px 20px; }
  .project-feature .project-body { padding: 28px 32px 32px; }
  .web-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .feature-phone { width: 26%; right: 12px; bottom: 14px; }
  .web-phones a { width: 46%; }
}
