/* =========================================================
   Tagmatic Techsolutions — design system
   A software studio's site: built like the products it ships —
   structured, versioned, precise. Deep navy "ink" as the anchor
   color (from the brand mark), electric indigo for action,
   signal-amber as the one accent that means "live / shipped".
   Display type: Space Grotesk. Body: Inter. Data/labels: JetBrains Mono.
   ========================================================= */

:root {
  color-scheme: light;

  /* ---- Core ---- */
  --background: oklch(0.995 0.002 260);
  --foreground: oklch(0.19 0.03 262);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.19 0.03 262);

  --primary: oklch(0.5 0.205 264);
  --primary-hi: oklch(0.58 0.205 264);
  --primary-foreground: oklch(0.99 0 0);

  --secondary: oklch(0.965 0.008 260);
  --secondary-foreground: oklch(0.26 0.03 262);

  --muted: oklch(0.972 0.006 260);
  --muted-foreground: oklch(0.475 0.025 262);

  --accent: oklch(0.955 0.025 258);
  --accent-foreground: oklch(0.4 0.15 262);

  --border: oklch(0.905 0.008 260);
  --border-strong: oklch(0.85 0.012 260);
  --radius: 1rem;

  /* Signal amber — the one accent color, used only for "live/status" moments */
  --signal: oklch(0.78 0.16 80);
  --signal-ink: oklch(0.32 0.09 70);

  /* Deep navy "ink" — lifted from the wordmark, used for high-contrast bands */
  --ink: oklch(0.225 0.05 262);
  --ink-soft: oklch(0.29 0.055 262);
  --ink-softer: oklch(0.335 0.06 263);
  --ink-foreground: oklch(0.97 0.008 260);
  --ink-muted: oklch(0.73 0.04 260);
  --ink-border: oklch(0.375 0.06 262);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 78rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 32px -12px rgba(20, 30, 60, 0.18);
  --shadow-lg: 0 40px 80px -20px rgba(20, 30, 60, 0.32);
  --shadow-glow: 0 0 0 1px rgba(255,255,255,0.06), 0 30px 70px -20px rgba(30, 64, 175, 0.45);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--background); }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in oklch, var(--primary) 25%, transparent); }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

/* ===== Helpers ===== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--signal) 25%, transparent);
  flex: none;
}
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.icon { width: 1.25rem; height: 1.25rem; stroke-width: 2; flex: none; }
.icon-sm { width: 1rem; height: 1rem; stroke-width: 2; flex: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: var(--foreground); }
h1 { line-height: 1.02; }
h2 { line-height: 1.1; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 0.7rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.6rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 12px 24px -10px color-mix(in oklch, var(--primary) 65%, transparent);
}
.btn-primary:hover { background: var(--primary-hi); box-shadow: 0 18px 34px -10px color-mix(in oklch, var(--primary) 70%, transparent); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--foreground);
}
.btn-outline:hover { border-color: var(--foreground); background: var(--secondary); transform: translateY(-2px); }

.hero .btn-outline, .page-hero .btn-outline {
  border-color: var(--ink-border);
  color: var(--ink-foreground);
}
.hero .btn-outline:hover, .page-hero .btn-outline:hover {
  border-color: var(--ink-muted);
  background: var(--ink-soft);
}

.btn-light {
  background: var(--ink-foreground);
  color: var(--ink);
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.35);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -10px rgba(0,0,0,0.4); }

.btn-ghost-light {
  background: transparent;
  border-color: var(--ink-border);
  color: var(--ink-foreground);
}
.btn-ghost-light:hover { background: var(--ink-soft); border-color: var(--ink-muted); transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklch, var(--background) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.scrolled { border-color: var(--border); box-shadow: 0 1px 0 rgba(15,23,42,0.02), 0 8px 24px -18px rgba(15,23,42,0.25); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand-logo { height: 52px; width: auto !important; }
.nav-desktop { display: flex; align-items: center; gap: 2.1rem; }
.nav-desktop a {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--muted-foreground);
  position: relative;
  padding-block: 0.3rem;
  transition: color 0.2s;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--primary);
  transition: right 0.25s var(--ease);
}
.nav-desktop a:hover { color: var(--foreground); }
.nav-desktop a:hover::after,
.nav-desktop a.active::after { right: 0; }
.nav-desktop a.active { color: var(--foreground); font-weight: 600; }
.header-cta { display: flex; align-items: center; }
.header-cta .btn { padding: 0.75rem 1.35rem; font-size: 0.95rem; }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.6rem;
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
}
.menu-btn .icon { width: 1.4rem; height: 1.4rem; }
.hidden { display: none !important; }

.nav-mobile {
  display: none;
  max-height: 0;
  overflow: hidden;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  transition: max-height 0.35s var(--ease);
}
.nav-mobile.open { max-height: 30rem; }
.nav-mobile nav { display: flex; flex-direction: column; padding-block: 0.5rem 1.25rem; gap: 0.15rem; }
.nav-mobile a {
  padding: 0.85rem 0.25rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.nav-mobile a.active { color: var(--primary); font-weight: 600; }
.nav-mobile a.btn { border-bottom: none; margin-top: 0.85rem; text-align: center; }
.nav-mobile a.btn-primary { color: var(--primary-foreground); }

/* ===== Backgrounds / decoration ===== */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in oklch, var(--ink-foreground) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--ink-foreground) 6%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 40rem; height: 40rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--primary) 55%, transparent), transparent 70%);
  filter: blur(10px);
  top: -14rem; right: -10rem;
  opacity: 0.55;
  pointer-events: none;
}
.blob.secondary {
  width: 26rem; height: 26rem;
  top: auto; bottom: -10rem; left: -8rem; right: auto;
  background: radial-gradient(circle, color-mix(in oklch, var(--signal) 45%, transparent), transparent 70%);
  opacity: 0.35;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--ink-foreground);
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 4.5rem) 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem);
}
.hero .eyebrow { color: var(--signal); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  background: color-mix(in oklch, var(--ink-foreground) 8%, transparent);
  border: 1px solid var(--ink-border);
  color: var(--ink-muted);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
}
.badge .icon-sm { color: var(--signal); }
.hero h1 {
  font-size: clamp(2.75rem, 5.6vw, 4.75rem);
  color: var(--ink-foreground);
  max-width: 16ch;
}
.hero .lead {
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 40rem;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.hero-actions .btn { font-size: 1.05rem; padding: 1.05rem 1.85rem; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.25rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ink-border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.hero-meta strong { font-family: var(--font-display); color: var(--ink-foreground); font-size: 1.05rem; margin-right: 0.4rem; }

/* Hero visual — a bespoke build console (no photography) */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 27rem;
  margin-inline: auto;
  padding: 2rem 1.5rem;
}

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card);
  color: var(--foreground);
  border-radius: 0.9rem;
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  animation: floaty 5s ease-in-out infinite;
}
.float-chip .fc-num { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--foreground); line-height: 1; }
.float-chip .fc-label { color: var(--muted-foreground); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.float-chip.chip-1 { top: -1.5rem; left: -1.75rem; animation-delay: 0s; }
.float-chip.chip-2 { bottom: 2.5rem; right: -2rem; animation-delay: 1.2s; }
.float-chip.chip-3 {
  bottom: -1.25rem; left: 1rem;
  background: var(--ink-soft);
  color: var(--ink-foreground);
  border: 1px solid var(--ink-border);
  animation-delay: 2.1s;
}
.float-chip .dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px color-mix(in oklch, var(--signal) 30%, transparent); flex: none; }

/* Hero visual — a bespoke "build console" (no photography), styled as a
   real terminal shipping the studio's own products */
.hero-visual .console {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 1.1rem;
  overflow: hidden;
  background: oklch(0.16 0.03 262);
  border: 1px solid color-mix(in oklch, var(--ink-foreground) 12%, transparent);
  box-shadow: var(--shadow-glow);
  transform: rotate(-1.25deg);
  transition: transform 0.5s var(--ease);
}
.hero-visual:hover .console { transform: rotate(0deg); }
.console-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  background: color-mix(in oklch, var(--ink-foreground) 5%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--ink-foreground) 10%, transparent);
}
.console-bar .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.console-bar .dot.red { background: #ef5350; }
.console-bar .dot.amber { background: #f5b942; }
.console-bar .dot.green { background: #58c46b; }
.console-title { margin-left: 0.6rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-muted); }
.console-body { padding: 1.5rem 1.35rem; font-family: var(--font-mono); font-size: 0.85rem; line-height: 2; }
.console-body p { color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-body .pr { color: var(--signal); margin-right: 0.4rem; }
.console-body .ok { color: #7fd99a; }
.console-body .caret { color: var(--ink-foreground); }
.blink { animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.console-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid color-mix(in oklch, var(--ink-foreground) 10%, transparent);
}
.console-stats > div {
  padding: 1rem 0.75rem;
  text-align: center;
  border-right: 1px solid color-mix(in oklch, var(--ink-foreground) 10%, transparent);
}
.console-stats > div:last-child { border-right: none; }
.console-stats strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-foreground); }
.console-stats span { display: block; margin-top: 0.15rem; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Marquee */
.marquee {
  position: relative;
  background: var(--ink-soft);
  border-top: 1px solid var(--ink-border);
  border-bottom: 1px solid var(--ink-border);
  overflow: hidden;
  padding-block: 1.1rem;
}
.marquee .fade { position: absolute; top: 0; bottom: 0; width: 6rem; z-index: 2; pointer-events: none; }
.marquee .fade.left { left: 0; background: linear-gradient(90deg, var(--ink-soft), transparent); }
.marquee .fade.right { right: 0; background: linear-gradient(-90deg, var(--ink-soft), transparent); }
.marquee-track {
  display: flex;
  width: max-content;
  gap: 3.5rem;
  animation: marquee 26s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.stat {
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
}
.stat .value { font-family: var(--font-display); font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; color: var(--primary); }
.stat .label { margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.03em; }

/* ===== Section head ===== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.75rem;
  flex-wrap: wrap;
}
.section-head h2 { margin-top: 0.65rem; font-size: clamp(2rem, 3.6vw, 2.75rem); max-width: 30rem; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  padding-bottom: 0.3rem;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s, gap 0.2s;
}
.link-arrow:hover { border-color: var(--primary); gap: 0.75rem; }

/* ===== Project cards (index) ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.project-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--muted); }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s var(--ease); }
.project-card:hover .thumb img { transform: scale(1.05); }
.project-card .body { padding: 1.75rem; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-foreground);
  background: var(--accent);
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
}
.project-card h3 { margin-top: 0.9rem; font-size: 1.4rem; }
.tagline { margin-top: 0.35rem; color: var(--muted-foreground); font-weight: 500; }
.desc { margin-top: 0.75rem; color: var(--muted-foreground); font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.35rem 0.7rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ===== Services band ===== */
.band { background: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2.75rem; }
.service {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  padding: 1.85rem 1.6rem;
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service .index {
  position: absolute; top: 1.5rem; right: 1.6rem;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--border-strong);
}
.icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 0.85rem;
  background: var(--accent); color: var(--accent-foreground);
  margin-bottom: 1.1rem;
}
.icon-box.solid { background: var(--primary); color: var(--primary-foreground); }
.service h3 { font-size: 1.15rem; }
.service p { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 0.93rem; }

.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.trust-item { display: flex; flex-direction: column; align-items: flex-start; }
.trust-item h3 { font-size: 1.02rem; margin-top: 0.25rem; }
.trust-item p { margin-top: 0.4rem; color: var(--muted-foreground); font-size: 0.9rem; }

/* ===== Process — connected timeline ===== */
.process-list { position: relative; display: flex; flex-direction: column; gap: 1.5rem; }
.process-list::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--border-strong) 0 6px, transparent 6px 12px);
}
.process-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.75rem;
  align-items: flex-start;
}
.process-step .node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  flex: none;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.process-step:hover .node { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); transform: scale(1.08); }
.process-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  padding: 1.6rem 1.85rem;
  margin-bottom: 0.35rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.process-step:hover .process-content { transform: translateX(6px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.process-content .stage {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.process-content h3 { margin-top: 0.4rem; font-size: 1.3rem; }
.process-content p { margin-top: 0.5rem; color: var(--muted-foreground); max-width: 40rem; }

/* ===== CTA ===== */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border-radius: 1.75rem;
  padding: clamp(2.75rem, 6vw, 4.5rem);
}
.cta .grid-bg { -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, black 30%, transparent 85%); mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, black 30%, transparent 85%); }
.cta-inner { position: relative; z-index: 1; max-width: 40rem; }
.cta h2 { color: var(--ink-foreground); font-size: clamp(1.9rem, 4vw, 2.6rem); }
.cta p { margin-top: 1rem; color: var(--ink-muted); font-size: 1.08rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: var(--ink-foreground); padding-block: clamp(3.5rem, 6vw, 5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--ink-border); }
.footer-logo { height: 46px; width: auto !important; filter: none; }
.footer-about p { margin-top: 1.25rem; color: var(--ink-muted); max-width: 28rem; font-size: 0.95rem; }
.footer-mail { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.25rem; font-weight: 600; color: var(--ink-foreground); border-bottom: 1px solid var(--ink-border); padding-bottom: 0.25rem; }
.footer-mail:hover { border-color: var(--ink-foreground); }
.footer-col h3 { font-size: 0.85rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); font-weight: 500; }
.footer-col ul { margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a { color: var(--ink-muted); transition: color 0.2s; }
.footer-col a:hover { color: var(--ink-foreground); }
.footer-col li { color: var(--ink-muted); font-size: 0.95rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; padding-top: 1.75rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-muted); }

/* ===== Page hero (inner pages) ===== */
.page-hero { position: relative; background: var(--ink); color: var(--ink-foreground); overflow: hidden; padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.page-hero-inner { position: relative; z-index: 1; max-width: 44rem; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase;
  background: color-mix(in oklch, var(--ink-foreground) 8%, transparent);
  border: 1px solid var(--ink-border); color: var(--signal);
  padding: 0.45rem 0.95rem; border-radius: 100px; margin-bottom: 1.5rem;
}
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); color: var(--ink-foreground); }
.page-hero p { margin-top: 1.25rem; font-size: 1.1rem; color: var(--ink-muted); max-width: 38rem; }

/* ===== Project rows (projects.html) ===== */
.project-rows { display: flex; flex-direction: column; gap: clamp(4rem, 8vw, 6rem); padding-block: clamp(3rem, 6vw, 4.5rem); }
.project-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
.project-row.reversed .media { order: 2; }
.project-row.reversed .content { order: 1; }
.media { position: relative; border-radius: 1.5rem; overflow: hidden; box-shadow: var(--shadow-lg); }
.media .glow { position: absolute; inset: -20%; filter: blur(50px); opacity: 0.5; z-index: 0; }
.media img { position: relative; z-index: 1; width: 100%; display: block; }
.content .tag { margin-bottom: 0.5rem; }
.content h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); margin-top: 0.5rem; }
.content .tagline { font-size: 1.05rem; margin-top: 0.5rem; }
.content .desc { margin-top: 1rem; font-size: 1rem; line-height: 1.7; }
.highlights { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.highlights li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.96rem; color: var(--foreground); }
.check { flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--accent); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-top: 0.1rem; }
.check svg { width: 0.8rem; height: 0.8rem; stroke-width: 3; }
.content .chips { margin-top: 1.5rem; }

/* ===== Two-col / About ===== */
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.two-col h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 1.5rem; }
.prose p { color: var(--muted-foreground); margin-top: 1rem; font-size: 1.02rem; line-height: 1.75; }
.prose p:first-child { margin-top: 0; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.about-stat { padding: 1.75rem; border-radius: 1.1rem; border: 1px solid var(--border); background: var(--card); }
.about-stat .value { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.about-stat .label { margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.03em; }

.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 2.75rem; }
.value-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 1.1rem; padding: 1.85rem; display: flex; gap: 1.25rem; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-card .index { position: absolute; top: 1.5rem; right: 1.6rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--border-strong); }
.value-card h3 { font-size: 1.1rem; }
.value-card p { margin-top: 0.4rem; color: var(--muted-foreground); font-size: 0.92rem; }

/* ===== Technologies ===== */
.stacks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.stack { background: var(--card); border: 1px solid var(--border); border-radius: 1.25rem; padding: 2rem; }
.stack h2 { font-size: 1.5rem; margin-top: 1rem; }
.stack > p { margin-top: 0.4rem; color: var(--muted-foreground); font-size: 0.95rem; }
.stack-list { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.stack-item .row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.stack-item .name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.stack-item .area { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.03em; }
.stack-item p { margin-top: 0.4rem; color: var(--muted-foreground); font-size: 0.92rem; }

.tech-panel { margin-top: 3.5rem; background: var(--ink); border-radius: 1.5rem; padding: clamp(2rem, 4vw, 3rem); color: var(--ink-foreground); }
.tech-panel-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 1.5rem; }
.tech-panel .lead { grid-row: span 2; padding-right: 1rem; }
.tech-panel .lead h3 { color: var(--ink-foreground); font-size: 1.5rem; }
.tech-panel .lead p { margin-top: 0.75rem; color: var(--ink-muted); }
.tech-mini { background: color-mix(in oklch, var(--ink-foreground) 6%, transparent); border: 1px solid var(--ink-border); border-radius: 0.9rem; padding: 1.1rem 1.25rem; }
.tech-mini .name { font-family: var(--font-display); font-weight: 700; }
.tech-mini .area { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.3rem; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.contact-info h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.contact-info > p { margin-top: 0.75rem; color: var(--muted-foreground); font-size: 1.02rem; }
.contact-cards { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-card {
  display: flex; align-items: center; gap: 1.1rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 1.1rem; padding: 1.35rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
a.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.contact-card .icon-box { margin-bottom: 0; flex: none; }
.contact-card .title { font-weight: 600; font-size: 1.02rem; }
.contact-card .sub { margin-top: 0.2rem; color: var(--muted-foreground); font-size: 0.92rem; }
.contact-card .sub.link { color: var(--primary); font-weight: 500; }

.form { background: var(--card); border: 1px solid var(--border); border-radius: 1.25rem; padding: clamp(1.75rem, 4vw, 2.5rem); display: flex; flex-direction: column; gap: 1.35rem; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.88rem; font-weight: 600; }
.control {
  border: 1.5px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--background);
  font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in oklch, var(--primary) 15%, transparent); outline: none; }
textarea.control { resize: vertical; min-height: 8rem; }
.form .btn { margin-top: 0.25rem; align-self: flex-start; }
.form-note { font-size: 0.88rem; color: var(--muted-foreground); }
.form-note a { color: var(--primary); font-weight: 600; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip { animation: none; }
  .marquee-track { animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 24rem; margin-top: 1rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .stacks { grid-template-columns: 1fr; }
  .tech-panel-grid { grid-template-columns: 1fr 1fr; }
  .tech-panel .lead { grid-row: span 1; grid-column: span 2; }
}

@media (max-width: 900px) {
  .nav-desktop, .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-mobile { display: block; }

  .two-col, .contact-grid { grid-template-columns: 1fr; }
  .project-row, .project-row.reversed { grid-template-columns: 1fr; }
  .project-row.reversed .media, .project-row.reversed .content { order: initial; }
  .values-grid { grid-template-columns: 1fr; }
  .process-step { gap: 1rem; }
  .process-content { padding: 1.25rem 1.4rem; }
}

@media (max-width: 720px) {
  .container { padding-inline: 1.25rem; }
  .section { padding-block: 3.25rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .footer-bottom { flex-direction: column; }
  .cta { padding: 2.25rem 1.5rem; border-radius: 1.25rem; }
  .brand-logo { height: 42px; }
  .footer-logo { height: 40px; }
  .hero-meta { gap: 0.5rem 1.5rem; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .hero-actions, .cta-actions { flex-direction: column; }
  .float-chip { font-size: 0.72rem; padding: 0.55rem 0.8rem; }
  .float-chip .fc-num { font-size: 1rem; }
  .float-chip.chip-1 { left: -0.5rem; top: -1rem; }
  .float-chip.chip-2 { right: -0.5rem; }
  .float-chip.chip-3 { left: 0.25rem; }
  .console-body { font-size: 0.72rem; padding: 1.1rem 1rem; }
  .console-stats strong { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.15rem; }
  .badge { font-size: 0.72rem; padding: 0.4rem 0.8rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .stat { padding: 1.35rem 1.1rem; }
  .cards { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .tech-panel-grid { grid-template-columns: 1fr; }
  .tech-panel .lead { grid-column: span 1; }
  .hero-visual { max-width: 17rem; }
  .process-step { grid-template-columns: 42px 1fr; gap: 1rem; }
  .process-step .node { width: 42px; height: 42px; font-size: 0.85rem; }
  .process-list::before { left: 20px; }
  .process-content { padding: 1.1rem 1.15rem; }
}
