/* ==========================================================================
   Gridsoft — site styles
   Built from Gridsoft Brand Guidelines Vol. 01 · 2026
   Palette rule: paper carries the ground, navy the text, blue the CTAs,
   cyan is a spark only.
   ========================================================================== */

:root {
  --navy: #001F3F;
  --deep: #003B7A;
  --blue: #0066CC;
  --cyan: #00A4E4;
  --ink:  #0E1B2C;
  --paper:#F4F7FB;
  --cream:#F2EBDB;
  --soft: #E6EEF8;
  --line: #C9D6E6;
  --mute: #6B7A8F;
  --rule: rgba(0,31,63,.12);

  --font: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1160px;
  --pad: clamp(20px, 5vw, 56px);
  --section: clamp(72px, 10vw, 128px);
  /* Corner radius. Near-sharp by design — change this one value to
     soften or square off every panel, button, input and tag at once. */
  --r: 2px;
  --nav-h: 72px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--navy);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: var(--r); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--paper); padding: 10px 14px; border-radius: var(--r);
}
.skip:focus { top: 16px; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-top: var(--section); padding-bottom: var(--section); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
}
.title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-top: 12px;
  max-width: 20ch;
}
.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 52ch;
  margin-top: 18px;
}
.label-mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
}
.accent { color: var(--blue); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.section-head .link { flex-shrink: 0; margin-bottom: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.005em;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue); color: var(--paper); }
.btn-primary:hover { background: var(--deep); }

.btn-ghost { border: 1px solid var(--line); color: var(--navy); background: transparent; }
.btn-ghost:hover { border-color: var(--navy); }

.btn-paper { background: var(--paper); color: var(--navy); }
.btn-paper:hover { background: #fff; }

.link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; color: var(--blue);
}
.link svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.link:hover svg { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(244,247,251,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 28px; height: 28px; }
.brand .word { font-size: 20px; font-weight: 600; letter-spacing: -.025em; line-height: 1; }
.brand .word span { color: var(--cyan); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  border-radius: var(--r);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--navy); }
.nav-links a.active { color: var(--navy); background: var(--soft); }

.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { padding: 10px 16px; font-size: 14px; }

/* Language switcher — links to /az/, /en/, /ru/ */
.lang {
  display: flex; gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255,255,255,.6);
}
.lang a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  padding: 6px 9px;
  border-radius: var(--r);
  color: var(--mute);
  text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.lang a:hover { color: var(--navy); }
.lang a[aria-current="true"] { background: var(--navy); color: var(--paper); }

.menu-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--navy); transition: transform .3s var(--ease), opacity .3s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 40;
  background: var(--paper);
  padding: 24px var(--pad);
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 4px; font-size: 22px; font-weight: 500; border-bottom: 1px solid var(--rule); }
.mobile-menu .btn { margin-top: 20px; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,164,228,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,164,228,.10) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, black 0%, transparent 65%);
          mask-image: radial-gradient(ellipse at 70% 30%, black 0%, transparent 65%);
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.0;
  margin-top: 18px;
  max-width: 14ch;
}
.hero .lede { font-size: 18px; margin-top: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin-top: 28px; display: flex; align-items: center; gap: 10px; }
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(0,164,228,.18); }

/* Terminal card */
.terminal {
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--r);
  box-shadow: 0 40px 80px -40px rgba(0,31,63,.55), 0 8px 24px -12px rgba(0,31,63,.3);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  position: relative;
}
.terminal::after {
  content: "";
  position: absolute; right: -40px; bottom: -40px;
  width: 220px; height: 220px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><path d='M22 6H56V56H6V22Q6 6 22 6Z' fill='%23F4F7FB'/><path d='M64 6H98Q114 6 114 22V56H64Z' fill='%2300A4E4'/><path d='M6 64H56V114H22Q6 114 6 98Z' fill='%23F4F7FB' opacity='.75'/><path d='M64 64H114V114H64Z' fill='%23F4F7FB' opacity='.25'/></svg>") no-repeat center / contain;
  opacity: .06;
  pointer-events: none;
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  background: rgba(244,247,251,.05);
  border-bottom: 1px solid rgba(244,247,251,.08);
}
.terminal-bar .d { width: 10px; height: 10px; border-radius: 50%; background: rgba(244,247,251,.18); }
.terminal-bar .t { margin-left: 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(244,247,251,.5); }
.terminal-body { padding: 20px 22px 24px; }
.terminal-body .ln { display: flex; gap: 14px; opacity: 0; transform: translateY(4px); animation: lineIn .5s var(--ease) forwards; }
.terminal-body .ln:nth-child(1) { animation-delay: .2s; }
.terminal-body .ln:nth-child(2) { animation-delay: .6s; }
.terminal-body .ln:nth-child(3) { animation-delay: .9s; }
.terminal-body .ln:nth-child(4) { animation-delay: 1.2s; }
.terminal-body .ln:nth-child(5) { animation-delay: 1.5s; }
.terminal-body .ln:nth-child(6) { animation-delay: 1.8s; }
.terminal-body .ln:nth-child(7) { animation-delay: 2.3s; }
.terminal-body .cmd { color: var(--paper); }
.terminal-body .cmd::before { content: "$ "; color: var(--cyan); }
.terminal-body .ok { color: var(--cyan); width: 14px; flex-shrink: 0; }
.terminal-body .k { color: rgba(244,247,251,.85); width: 110px; flex-shrink: 0; }
.terminal-body .v { color: rgba(244,247,251,.55); }
.terminal-body .done { margin-top: 10px; padding-top: 12px; border-top: 1px dashed rgba(244,247,251,.15); color: var(--paper); }
.terminal-body .done b { font-weight: 500; color: var(--cyan); }
@keyframes lineIn { to { opacity: 1; transform: none; } }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat { padding: 28px 0; }
.stat + .stat { border-left: 1px solid var(--rule); padding-left: 28px; }
.stat .n { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1; font-feature-settings: 'tnum'; }
.stat .n small { font-size: .55em; color: var(--blue); margin-left: 2px; }
.stat .label-mono { margin-top: 10px; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.service {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  display: flex; flex-direction: column;
  min-height: 300px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 24px 48px -24px rgba(0,31,63,.3), 0 2px 6px -2px rgba(0,31,63,.1);
}
.service .num { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--cyan); }
.service h3 { font-size: 22px; margin-top: 36px; letter-spacing: -.02em; }
.service p { color: var(--mute); font-size: 15px; margin-top: 10px; flex: 1; }
.service .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.service .tags li {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--navy); background: var(--soft); padding: 5px 9px; border-radius: var(--r);
}
.service.cta { background: var(--navy); color: var(--paper); border-color: var(--navy); justify-content: space-between; }
.service.cta .num { color: var(--cyan); }
.service.cta h3 { color: var(--paper); }
.service.cta p { color: rgba(244,247,251,.7); flex: 0; }
.service.cta .btn { align-self: flex-start; margin-top: 28px; }

/* ---------- Process ---------- */
.process { background: var(--soft); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 56px;
  counter-reset: step;
}
.step { position: relative; padding-top: 24px; border-top: 2px solid var(--line); }
.step::before {
  content: "";
  position: absolute; top: -2px; left: 0;
  width: 36px; height: 2px; background: var(--cyan);
}
.step h3 { font-size: 20px; }
.step p { color: var(--mute); font-size: 15px; margin-top: 10px; }
.step .dur { margin-top: 18px; font-family: var(--mono); font-size: 11px; color: var(--blue); }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.case {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.case:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(0,31,63,.3); }
.case .visual {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.case .visual.navy { background: linear-gradient(140deg, var(--navy), var(--deep)); }
.case .visual.blue { background: linear-gradient(140deg, var(--deep), var(--blue)); }
.case .visual.cyan { background: linear-gradient(140deg, var(--blue), var(--cyan)); }
.case .visual .g {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,247,251,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,247,251,.08) 1px, transparent 1px);
  background-size: 32px 32px;
}
.case .visual .metric {
  position: relative;
  text-align: center;
  color: var(--paper);
  padding: 0 20px;
}
.case .visual .metric .big { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.case .visual .metric .sm { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; opacity: .75; margin-top: 12px; }
.case .visual .mark { position: absolute; right: 16px; bottom: 16px; width: 28px; height: 28px; opacity: .9; }

/* The "visit site" link is stretched over the whole card, so the card is clickable
   while the link keeps a short, unique accessible name (the domain). */
.case .visit {
  margin-top: 18px;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: var(--blue); font-weight: 500;
}
.case .visit::after { content: ""; position: absolute; inset: 0; }
.case .visit svg { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.case:hover .visit { color: var(--deep); }
.case:hover .visit svg { transform: translate(2px, -2px); }
.case:focus-within { box-shadow: 0 0 0 2px var(--cyan); }
.case .body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.case .client { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.case h3 { font-size: 20px; margin-top: 8px; }
.case p { color: var(--mute); font-size: 15px; margin-top: 10px; flex: 1; }
.case .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.case .tags li { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.case .tags li + li::before { content: "·"; margin-right: 6px; color: var(--line); }

/* ---------- Projects ---------- */
.projects { background: var(--soft); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.filters button {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--mute);
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.filters button:hover { color: var(--navy); border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--paper); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.project {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  display: flex; flex-direction: column;
  min-height: 250px;
  transition: opacity .2s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.project:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 24px 48px -24px rgba(0,31,63,.3), 0 2px 6px -2px rgba(0,31,63,.1);
}
.project.fading { opacity: 0; }
.project.hide { display: none; }
.project .meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}
.project .meta .cat { color: var(--cyan); font-weight: 500; }
.project .meta .yr { color: var(--mute); }
.project h3 { font-size: 18px; margin-top: 22px; letter-spacing: -.015em; }
.project .client { font-size: 13px; font-weight: 500; color: var(--blue); margin-top: 4px; }
.project p { font-size: 14px; color: var(--mute); margin-top: 12px; }
.project .stack {
  margin-top: auto; padding-top: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--mute);
}

/* ---------- Pillars (dark) ---------- */
.pillars { background: var(--navy); color: var(--paper); position: relative; overflow: hidden; }
.pillars .eyebrow { color: var(--cyan); }
.pillars .lede { color: rgba(244,247,251,.7); }
.pillars .bg {
  position: absolute; right: -8%; top: 50%; transform: translateY(-50%);
  width: clamp(320px, 45vw, 640px); aspect-ratio: 1;
  opacity: .05; pointer-events: none;
}
.pillars .wrap { position: relative; }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(244,247,251,.16);
}
.pillar h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); font-weight: 500; }
.pillar .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 10px; }
.pillar p { color: rgba(244,247,251,.68); font-size: 15px; margin-top: 8px; max-width: 34ch; }

/* ---------- Testimonials ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.quote .mark-q { font-family: var(--mono); font-size: 28px; color: var(--cyan); line-height: 1; }
.quote blockquote { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.015em; line-height: 1.4; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.quote .who .av {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--paper);
}
.quote .who .nm { font-size: 14px; font-weight: 600; }
.quote .who .role { font-size: 12px; color: var(--mute); margin-top: 1px; }

/* ---------- Stack strip ---------- */
.stack { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 28px 0; overflow: hidden; }
.stack .wrap { display: flex; align-items: center; gap: 32px; }
.stack .label-mono { flex-shrink: 0; }
.stack-track { display: flex; gap: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
.stack-track ul { display: flex; gap: 40px; flex-shrink: 0; animation: marquee 40s linear infinite; }
.stack-track li { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--navy); white-space: nowrap; }
.stack:hover .stack-track ul { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 40px)); } }

/* ---------- Contact ---------- */
.contact.section { padding-top: var(--section); }
.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
}
.contact-meta { margin-top: 40px; display: grid; gap: 22px; }
.contact-meta .row h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); font-weight: 500; }
.contact-meta .row p { margin-top: 6px; font-size: 15px; }
.contact-meta .row a { color: var(--blue); font-weight: 500; }

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 15px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,102,204,.15);
}
.form .actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.form .actions .note { font-size: 13px; color: var(--mute); }
.form-success {
  grid-column: 1 / -1;
  display: none;
  padding: 22px 24px;
  border-radius: var(--r);
  background: var(--soft);
  align-items: center; gap: 14px;
}
.form-success.show { display: flex; }
.form-success svg { width: 22px; height: 22px; color: var(--blue); flex-shrink: 0; }
.form-success b { font-weight: 600; }
.form-success p { font-size: 14px; color: var(--mute); }

/* Honeypot — hidden from people, left in the DOM for bots to trip over. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-error {
  grid-column: 1 / -1;
  display: none;
  padding: 18px 20px;
  border-radius: var(--r);
  background: rgba(176, 82, 74, .08);
  border: 1px solid rgba(176, 82, 74, .28);
  align-items: center; gap: 14px;
}
.form-error.show { display: flex; }
.form-error svg { width: 22px; height: 22px; color: #B0524A; flex-shrink: 0; }
.form-error b { font-weight: 600; color: #8E3F39; }
.form-error p { font-size: 14px; color: var(--mute); margin-top: 2px; }

/* ---------- Footer ---------- */
/* content-visibility lets the browser skip laying out the footer until it is
   scrolled near. Applied only here: every other section holds scroll-reveal
   elements whose IntersectionObserver needs a real layout box. */
.footer {
  background: var(--ink); color: var(--paper); padding: 64px 0 32px;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}
.footer .top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(244,247,251,.12);
}
.footer .brand .word { color: var(--paper); }
.footer .tag { margin-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.footer .desc { margin-top: 14px; font-size: 14px; color: rgba(244,247,251,.6); max-width: 34ch; }
.footer h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(244,247,251,.5); font-weight: 500; }
.footer ul { margin-top: 16px; display: grid; gap: 10px; }
.footer ul a { font-size: 14px; color: rgba(244,247,251,.8); transition: color .2s; }
.footer ul a:hover { color: var(--paper); }
.footer .bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 24px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(244,247,251,.45);
}

/* ---------- Reveal on scroll ----------
   Scoped to html.js, which the inline script in <head> sets. Without
   JavaScript the content is simply visible: it is never hidden behind a
   script that might not run, which keeps it readable for crawlers and for
   anyone whose JS fails to load. */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .terminal-body .ln { opacity: 1; transform: none; animation: none; }
  .stack-track ul { animation: none; }
  .service, .case, .btn, .btn svg, .link svg { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links a { padding: 8px 9px; font-size: 13px; }
  .nav-cta .btn { display: none; }
}

@media (max-width: 1024px) {
  .services-grid, .work-grid, .quotes, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .footer .top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .terminal { max-width: 520px; }
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px 0; }
  .stat + .stat { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--rule); padding-left: 24px; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .pillar-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact .wrap { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 600px) {
  .services-grid, .work-grid, .quotes, .projects-grid { grid-template-columns: 1fr; }
  .project { min-height: 0; }
  .lang a { padding: 6px 7px; }
  .steps { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .footer .top { grid-template-columns: 1fr; gap: 32px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .service { min-height: 0; }
  .service h3 { margin-top: 24px; }
}
