/* ---------- Fonts (bundled locally) ---------- */
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("./fonts/vazirmatn-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("./fonts/vazirmatn-arabic-500.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("./fonts/vazirmatn-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 800; font-display: swap; src: url("./fonts/vazirmatn-arabic-800.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("./fonts/vazirmatn-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("./fonts/vazirmatn-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("./fonts/vazirmatn-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Vazirmatn"; font-weight: 800; font-display: swap; src: url("./fonts/vazirmatn-latin-800.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

/* ---------- Design tokens ---------- */
:root {
  --bg: #060a18;
  --bg-2: #0a1024;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eef2ff;
  --text-2: #a9b3d1;
  --text-3: #6f7a9c;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --pink: #ec4899;
  --amber: #f59e0b;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 800; }
p { margin: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: rgba(139, 92, 246, 0.45); }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(99, 102, 241, .8); background-size: 160% 160%; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(99, 102, 241, .95); background-position: 100% 0; }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: #c4b5fd; background: rgba(139, 92, 246, .12); border: 1px solid rgba(139, 92, 246, .3);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }

/* ---------- Icons ---------- */
.icon {
  --c: var(--cyan);
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 16px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--c) 12%, transparent);
}
.icon svg { width: 26px; height: 26px; }
.icon--sm { width: 46px; height: 46px; border-radius: 13px; }
.icon--sm svg { width: 22px; height: 22px; }
.c-cyan { --c: var(--cyan); } .c-violet { --c: var(--violet); } .c-blue { --c: var(--blue); }
.c-teal { --c: var(--teal); } .c-pink { --c: var(--pink); } .c-amber { --c: var(--amber); }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.header.scrolled { background: rgba(6, 10, 24, .72); backdrop-filter: blur(16px) saturate(140%); border-color: var(--border); }
.header__inner { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(34, 211, 238, .35)); }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav__link { position: relative; padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-size: 15px; transition: color .25s, background .25s; }
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.active { color: var(--text); background: var(--surface-2); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 12px 11px; flex-direction: column; justify-content: space-between; }
.burger span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s, opacity .3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, transparent 40%, var(--bg) 85%); }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .6; }
.glow { position: absolute; z-index: -2; border-radius: 50%; filter: blur(90px); opacity: .55; }
.glow--a { width: 520px; height: 520px; background: #6366f1; top: -120px; left: -120px; animation: drift 14s ease-in-out infinite alternate; }
.glow--b { width: 440px; height: 440px; background: #06b6d4; bottom: -160px; right: -80px; opacity: .35; animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(80px, 60px) scale(1.15); } }

.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 60px); margin: 22px 0 20px; letter-spacing: -0.5px; }
.lead { color: var(--text-2); font-size: 17px; max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 44px; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 120px; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(8px); }
.stat b { display: block; font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--text-3); font-size: 14px; }

.hero__visual { position: relative; }
.frame { position: relative; border-radius: 28px; padding: 1px; background: linear-gradient(135deg, rgba(34, 211, 238, .6), rgba(255, 255, 255, .06) 40%, rgba(168, 85, 247, .6)); box-shadow: var(--shadow), 0 0 80px -20px rgba(99, 102, 241, .6); overflow: hidden; }
.frame img { border-radius: 27px; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; }
.frame__shine { position: absolute; inset: 0; border-radius: 28px; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .18) 50%, transparent 65%); background-size: 250% 100%; animation: shine 6s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
.hero__visual .frame { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }

.float-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(10, 16, 36, .78); border: 1px solid var(--border-strong); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.float-card b { display: block; font-size: 15px; }
.float-card small { color: var(--text-3); font-size: 12px; }
.float-card__icon { --c: var(--cyan); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.float-card__icon svg { width: 20px; height: 20px; }
.float-card--top { top: -22px; right: -18px; animation: float 6s ease-in-out infinite .5s; }
.float-card--bottom { bottom: -24px; left: -18px; animation: float 8s ease-in-out infinite 1s; }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 20px; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite; }
@keyframes wheel { to { transform: translateY(14px); opacity: 0; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: 110px 0; overflow-x: clip; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 18%, var(--bg-2) 82%, var(--bg) 100%); }
.section--alt::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 60px; }
.section__head h2 { font-size: clamp(28px, 3.6vw, 42px); margin: 18px 0 14px; }
.section__head p { color: var(--text-2); }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Service cards */
.card {
  position: relative; padding: 32px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
  transform-style: preserve-3d;
}
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(99, 102, 241, .18), transparent 45%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card:hover { border-color: rgba(139, 92, 246, .45); box-shadow: 0 24px 60px -24px rgba(99, 102, 241, .55); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 21px; margin: 22px 0 10px; }
.card p { color: var(--text-2); font-size: 15px; }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about h2 { font-size: clamp(28px, 3.6vw, 44px); margin: 18px 0 18px; }
.mini-grid { margin-top: 34px; gap: 16px; }
.mini { display: flex; gap: 14px; padding: 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: background .3s, transform .3s var(--ease); }
.mini:hover { background: var(--surface-2); transform: translateY(-3px); }
.mini h4 { font-size: 16px; margin-bottom: 2px; }
.mini p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.about__visual { position: relative; }
.frame--glow img { aspect-ratio: 5 / 4; }
.orbit { position: absolute; inset: -30px; pointer-events: none; z-index: -1; }
.orbit span { position: absolute; inset: 0; border: 1px dashed rgba(139, 92, 246, .25); border-radius: 50%; animation: spin 40s linear infinite; }
.orbit span:nth-child(2) { inset: 40px; border-color: rgba(34, 211, 238, .2); animation-duration: 30s; animation-direction: reverse; }
.orbit span:nth-child(3) { inset: -40px; border-style: solid; border-color: rgba(255, 255, 255, .04); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Projects ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -24px 0 44px; }
.filter { font: inherit; font-size: 14px; padding: 8px 20px; border-radius: 999px; cursor: pointer; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); transition: all .3s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 8px 24px -10px rgba(99, 102, 241, .9); }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.project {
  border-radius: 24px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border);
  transition: transform .5s var(--ease), box-shadow .5s, border-color .5s, opacity .4s;
}
.project:hover { transform: translateY(-8px); border-color: rgba(139, 92, 246, .5); box-shadow: 0 30px 70px -30px rgba(99, 102, 241, .7); }
.project.is-hidden { display: none; }
.project__cover { position: relative; height: 230px; overflow: hidden; display: grid; place-items: center; }
.project__cover > * { transition: transform .7s var(--ease); }
.project:hover .project__cover > .cover__art,
.project:hover .project__cover > .mock,
.project:hover .project__cover > .sun { transform: scale(1.06); }
.cover__name { position: absolute; bottom: 16px; left: 20px; font-size: 30px; font-weight: 800; letter-spacing: 1px; color: #fff; text-shadow: 0 4px 20px rgba(0, 0, 0, .35); font-family: "Vazirmatn", system-ui, sans-serif; }
.tag { position: absolute; top: 16px; right: 16px; font-size: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px); color: #fff; }

.cover--famo { background: radial-gradient(circle at 30% 20%, #22d3ee 0%, transparent 50%), radial-gradient(circle at 80% 80%, #a855f7 0%, transparent 55%), linear-gradient(135deg, #1e1b4b, #312e81); }
.cover__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(180deg, #000, transparent); }
.cover__art { width: 78%; position: relative; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .5)); }
.cover__art circle { animation: blink 3s ease-in-out infinite; }
.cover__art circle:nth-child(2n) { animation-delay: 1s; }
.cover__art circle:nth-child(3n) { animation-delay: 2s; }
@keyframes blink { 50% { opacity: .35; } }

.cover--tsg { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 50%, #1e3a8a 100%); }
.mock { width: 72%; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .95); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .5); transform: perspective(800px) rotateX(8deg) rotateY(-10deg); margin-bottom: 20px; }
.project:hover .project__cover > .mock { transform: perspective(800px) rotateX(0) rotateY(0) scale(1.04); }
.mock__bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: #e2e8f0; }
.mock__bar i { width: 8px; height: 8px; border-radius: 50%; background: #f87171; }
.mock__bar i:nth-child(2) { background: #fbbf24; } .mock__bar i:nth-child(3) { background: #34d399; }
.mock__bar span { flex: 1; height: 8px; margin-inline-start: 8px; border-radius: 4px; background: #fff; }
.mock__body { padding: 10px; }
.mock__hero { height: 52px; border-radius: 6px; background: linear-gradient(90deg, #1e3a8a, #0ea5e9); }
.mock__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.mock__row span { height: 26px; border-radius: 5px; background: #e2e8f0; }

.cover--sun { background: linear-gradient(160deg, #f59e0b 0%, #ea580c 45%, #7c2d12 100%); align-items: start; }
.sun { position: absolute; top: 34px; left: 50%; margin-left: -45px; width: 90px; height: 90px; }
.sun span { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #fff7d6 0%, #fde047 45%, #fbbf24 70%); box-shadow: 0 0 60px 20px rgba(253, 224, 71, .55); }
.sun::before { content: ""; position: absolute; inset: -26px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 255, 255, .55) 0 4deg, transparent 4deg 30deg); mask-image: radial-gradient(circle, transparent 54%, #000 56%, #000 64%, transparent 66%); animation: spin 18s linear infinite; }
.cover__chart { position: absolute; bottom: 0; left: 0; width: 100%; height: 90px; }

.project__body { padding: 26px 26px 28px; }
.project__body h3 { font-size: 21px; margin-bottom: 10px; }
.project__body p { color: var(--text-2); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.chips li { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- Features & results ---------- */
.feature { display: flex; gap: 16px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .4s var(--ease), border-color .4s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, .35); }
.feature h4 { font-size: 17px; margin-bottom: 4px; }
.feature p { color: var(--text-2); font-size: 14.5px; line-height: 1.8; }

.results { margin-top: 56px; padding: 44px; border-radius: 28px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, .28), transparent 55%), radial-gradient(circle at 100% 100%, rgba(34, 211, 238, .18), transparent 55%), var(--surface); border: 1px solid var(--border-strong); }
.results__head h3 { font-size: 28px; margin-bottom: 12px; }
.results__head p { color: var(--text-2); }
.bars { display: grid; gap: 18px; }
.bar__label { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; margin-bottom: 8px; }
.bar__label b { color: var(--cyan); }
.bar__track { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar__track i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); box-shadow: 0 0 14px rgba(99, 102, 241, .8); transition: width 1.6s var(--ease); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.5fr; gap: 26px; }
.contact__info, .form { padding: 34px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.contact__info h3, .form h3 { font-size: 22px; margin-bottom: 26px; }
.info { display: flex; gap: 14px; margin-bottom: 22px; }
.info h4 { font-size: 15px; margin-bottom: 2px; }
.info a, .info p { display: block; color: var(--text-2); font-size: 14.5px; text-align: right; }
.info a:hover { color: var(--cyan); }
.hours { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.hours h4 { margin-bottom: 12px; font-size: 15px; }
.hours div { display: flex; justify-content: space-between; color: var(--text-2); font-size: 14.5px; padding: 6px 0; }
.hours b { color: var(--text); font-weight: 500; direction: ltr; }
.hours .muted { color: var(--pink); }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  padding: 13px 16px; border-radius: 12px; resize: vertical;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border);
  transition: border-color .25s, box-shadow .25s, background .25s; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--violet); background: rgba(0, 0, 0, .35); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }
.field input.invalid, .field textarea.invalid { border-color: #f87171; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn.loading .spinner { display: inline-block; }
.btn.loading { pointer-events: none; opacity: .85; }
.alert { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 14.5px; }
.alert.ok { background: rgba(16, 185, 129, .12); border: 1px solid rgba(16, 185, 129, .4); color: #6ee7b7; }
.alert.err { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .4); color: #fca5a5; }

/* ---------- Footer ---------- */
.footer { position: relative; padding: 70px 0 0; border-top: 1px solid var(--border); background: linear-gradient(180deg, var(--bg), #040712); }
.footer::before { content: ""; position: absolute; top: -1px; left: 10%; right: 10%; height: 1px; background: var(--grad); opacity: .7; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer h4 { font-size: 16px; margin-bottom: 16px; }
.footer a:not(.brand), .footer p { display: block; color: var(--text-3); font-size: 14.5px; margin-bottom: 8px; transition: color .2s; }
.footer__grid a[dir="ltr"] { text-align: right; }
.footer a:not(.brand):hover { color: var(--cyan); }
.footer__about { margin-top: 16px; max-width: 300px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 50px; padding: 22px 0; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13.5px; }
.footer__bottom a { display: inline !important; margin: 0 0 0 18px !important; font-size: 13.5px !important; }

.to-top { position: fixed; bottom: 24px; left: 24px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(99, 102, 241, .9); opacity: 0; transform: translateY(20px); pointer-events: none; transition: all .4s var(--ease); }
.to-top svg { width: 22px; height: 22px; stroke-width: 2.4; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner, .about { grid-template-columns: 1fr; gap: 56px; }
  .hero__visual { max-width: 620px; margin-inline: auto; width: 100%; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .results { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { position: fixed; inset: 76px 0 auto; flex-direction: column; gap: 2px; padding: 14px 20px 22px; background: rgba(6, 10, 24, .96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all .3s var(--ease); }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 12px 14px; }
  .burger { display: flex; }
  .header__cta { display: none; }
  .grid--3, .contact { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 80px 0; }
  .grid--3, .grid--2, .projects, .form__row, .footer__grid { grid-template-columns: 1fr; }
  .float-card--top { right: 4px; } .float-card--bottom { left: 4px; }
  .results, .contact__info, .form { padding: 26px 20px; }
  .card { padding: 26px; }
  .stat { min-width: 0; padding: 12px; } .stat b { font-size: 22px; } .stat span { font-size: 12px; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Clickable project cards ---------- */
a.project { display: block; color: inherit; cursor: pointer; }
.project:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.project__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 14.5px; font-weight: 700; color: var(--cyan); transition: gap .3s var(--ease); }
.project__cta svg { width: 18px; height: 18px; }
.project:hover .project__cta { gap: 10px; }

/* ---------- Product screenshot covers ---------- */
.cover--shot { background: linear-gradient(160deg, #13284f, #0b1530); }
.cover--shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform .7s var(--ease); }
.cover--shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6, 10, 24, .85) 100%); pointer-events: none; }
.cover--shot .cover__name, .cover--shot .tag { z-index: 1; }
.cover--shot .cover__name { font-size: 24px; }
.project:hover .cover--shot img { transform: scale(1.05); }

/* Center the last row of project cards */
.projects { display: flex; flex-wrap: wrap; justify-content: center; }
.projects > .project { flex: 0 0 calc((100% - 52px) / 3); }
.cover--shot img { object-position: center top; }
@media (max-width: 1024px) { .projects > .project { flex-basis: calc((100% - 26px) / 2); } }
@media (max-width: 640px) { .projects > .project { flex-basis: 100%; } }
.cover--gold { background: linear-gradient(160deg, #3a2a08, #120d02); }
