/* ============================================================
   FEM Structures — clean light theme with navy header/footer
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --navy: #002569;
  --navy-light: #0d3b8c;
  --ink: #162033;
  --ink-soft: #3d4f6b;
  --muted: #5c677a;
  --faint: #8a95a8;

  --blue: #0d3b8c;
  --gold: #FE9201;
  --cyan: #FE9201;
  --cyan-soft: rgba(254, 146, 1, 0.08);
  --green: #18a957;
  --yellow: #f2a51a;
  --red: #e33732;

  --line: #e5eaf2;
  --line-strong: #d0d9e5;

  --shadow-sm: 0 2px 8px rgba(22, 32, 51, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 32, 51, 0.08);
  --shadow-lg: 0 16px 48px rgba(22, 32, 51, 0.12);

  --radius: 12px;
  --radius-sm: 8px;

  --font-display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::selection { background: rgba(254, 146, 1, 0.22); color: var(--ink); }

img { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--navy);
}

h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0; }
h3 { font-size: 1.2rem; margin: 0 0 10px; }
p { margin: 0; }

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

::selection { background: rgba(254, 146, 1, 0.22); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
  background: #c5d0dc;
  border-radius: 6px;
  border: 2px solid var(--bg-alt);
}
::-webkit-scrollbar-thumb:hover { background: #a8b5c5; }

/* ---------- Utilities ---------- */

.container {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.section { padding: 108px 0; position: relative; }
.section--tight { padding: 84px 0; }

.section-kicker {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.grad-text {
  background: linear-gradient(92deg, #FE9201 0%, #0d3b8c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: linear-gradient(135deg, #FE9201, #0d3b8c);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  box-shadow: 0 6px 20px rgba(13, 59, 140, 0.24);
}

.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 10px 28px rgba(13, 59, 140, 0.32);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--navy);
  box-shadow: none;
}

.btn--ghost:hover, .btn--ghost:focus-visible {
  background: var(--bg-alt);
  box-shadow: none;
  filter: none;
}

.btn--sm { min-height: 40px; padding: 9px 16px; font-size: 0.88rem; }

.text-link {
  color: var(--blue);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

.text-link:hover, .text-link:focus-visible { color: var(--cyan); border-color: currentColor; }

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  transition: background 200ms ease, border-color 200ms ease;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line-strong);
}

.header__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; text-decoration: none; flex: 0 0 auto; background: transparent; border: none; padding: 0; box-shadow: none; transition: opacity 160ms ease, filter 160ms ease; animation: logo-fade-in 0.6s ease-out; }
.logo:hover { opacity: 0.85; }
.logo img { height: 78px; width: auto; }
.logo:hover img { opacity: 0.9; }

@keyframes logo-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav { display: flex; align-items: center; gap: 26px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: rgba(0, 37, 105, 0.82);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 600;
  transition: color 160ms ease;
}

.nav__links a:hover, .nav__links a:focus-visible { color: var(--navy); }

.nav__cta { margin-left: 6px; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 37, 105, 0.25);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav__toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 220ms ease, opacity 220ms ease;
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 27px; }

.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: max-content;
  padding: 96px 0 0;
  overflow: hidden;
  background:
    radial-gradient(1000px 480px at 82% -10%, rgba(254, 146, 1, 0.15), transparent 60%),
    radial-gradient(760px 460px at 8% 110%, rgba(13, 59, 140, 0.18), transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 88%);
  animation: grid-drift 22s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0; }
  to { background-position: 0 46px; }
}

.hero__glow {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 146, 1, 0.18), transparent 65%);
  filter: blur(20px);
  top: -260px;
  right: -140px;
  pointer-events: none;
}

.hero__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.85fr);
  gap: 56px;
  align-items: center;
  padding-bottom: 96px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid rgba(254, 146, 1, 0.4);
  border-radius: 999px;
  background: rgba(254, 146, 1, 0.1);
  color: #a8ecf5;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: pulse-dot 2.2s ease-in-out infinite; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20,184,198,0.5); }
  50% { box-shadow: 0 0 0 7px rgba(20,184,198,0); }
}

.hero h1 { margin: 26px 0 22px; color: #fff; }

.hero__lead {
  max-width: 620px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.12rem;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero__meta span::before { content: "//"; color: var(--cyan); font-family: var(--font-mono); font-size: 0.75rem; }

/* Hero blueprint panel */

.blueprint {
  position: relative;
  aspect-ratio: 4 / 4.4;
  border: 1px solid rgba(254, 146, 1, 0.35);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(254, 146, 1, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(254, 146, 1, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 37, 105, 0.85), rgba(0, 37, 105, 0.95));
  background-size: 32px 32px, 32px 32px, 100% 100%;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35), inset 0 0 60px rgba(254, 146, 1, 0.05);
  overflow: hidden;
}

.blueprint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 37, 105, 0.4));
  pointer-events: none;
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(254, 146, 1, 0.12), transparent);
  animation: scan 5.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes scan {
  0% { top: -130px; }
  55% { top: calc(100% + 10px); }
  100% { top: -130px; }
}

.bp-cross, .bp-cross::before {
  content: "";
  position: absolute;
  background: rgba(254, 146, 1, 0.65);
}
.bp-cross { width: 18px; height: 2px; }
.bp-cross::before { width: 2px; height: 18px; top: -8px; left: 8px; }
.bp-cross.c1 { top: 16%; left: 12%; }
.bp-cross.c2 { top: 68%; right: 14%; }

.bp-beam {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(254, 146, 1, 0.85), rgba(13, 59, 140, 0.15));
  transform-origin: left center;
  z-index: 1;
}
.bp-beam.b1 { width: 58%; top: 26%; left: 16%; transform: rotate(4deg); }
.bp-beam.b2 { width: 46%; top: 27%; left: 24%; transform: rotate(42deg); }
.bp-beam.b3 { width: 40%; top: 54%; right: 12%; left: auto; transform: rotate(112deg); transform-origin: right center; }

.bp-node {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(254, 146, 1, 0.18), 0 0 22px rgba(254, 146, 1, 0.7);
  z-index: 2;
  animation: node-pulse 2.6s ease-in-out infinite;
}
.bp-node.n1 { top: 24%; left: 14%; }
.bp-node.n2 { top: 31%; right: 22%; animation-delay: 0.4s; }
.bp-node.n3 { top: 58%; left: 46%; animation-delay: 0.8s; }
.bp-node.n4 { bottom: 20%; right: 16%; animation-delay: 1.2s; }

@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(20,184,198,0.16), 0 0 20px rgba(20,184,198,0.6); }
  50% { box-shadow: 0 0 0 9px rgba(20,184,198,0.06), 0 0 30px rgba(20,184,198,0.9); }
}

.bp-title {
  position: absolute;
  top: 20px;
  left: 22px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(168, 236, 245, 0.85);
  text-transform: uppercase;
  z-index: 2;
}

.bp-card {
  position: absolute;
  z-index: 3;
  padding: 13px 16px;
  border: 1px solid rgba(254, 146, 1, 0.35);
  border-radius: 10px;
  background: rgba(0, 37, 105, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.bp-card small { display: block; color: rgba(168, 236, 245, 0.7); font-size: 0.68rem; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.bp-card strong { display: block; margin-top: 3px; color: #fff; font-family: var(--font-display); font-size: 1.02rem; }
.bp-card .bar { height: 3px; margin-top: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--blue)); }

.bp-card.c1 { top: 18%; left: -18px; width: 175px; }
.bp-card.c2 { top: 44%; right: -14px; width: 168px; }
.bp-card.c3 { bottom: 12%; left: 10%; width: 190px; }
.bp-card.c3 .bar { width: 72%; }
.bp-card.c1 .bar { width: 55%; }
.bp-card.c2 .bar { width: 88%; }

/* ---------- Marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  overflow: hidden;
  padding: 18px 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  margin-right: 56px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__track span::after { content: "◆"; color: var(--cyan); font-size: 0.6rem; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Intro ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
}

.intro-grid h2 { margin-bottom: 0; }
.intro-grid > div > p { color: var(--muted); margin-top: 22px; font-size: 1.06rem; }

.quote-line {
  margin-top: 34px;
  padding: 22px 24px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  background: var(--cyan-soft);
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Services ---------- */

.services { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.services__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 46px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), transparent 70%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease;
}

.service-card:hover, .service-card:focus-within {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.service-card:hover::before, .service-card:focus-within::before { transform: scaleX(1); }

.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  border: 1px solid rgba(254, 146, 1, 0.25);
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.service-card__icon svg { width: 24px; height: 24px; }

.service-card h3 { font-size: 1.18rem; }
.service-card p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Process ---------- */

.process { background: var(--bg); }

.process__head { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.process__head .lead { margin: 0 auto; }

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}

.timeline__step {
  position: relative;
  text-align: left;
  padding-top: 66px;
}

.timeline__num {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--cyan);
  z-index: 1;
}

.timeline__step h3 { margin-top: 4px; }
.timeline__step p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Tools band ---------- */

.tools {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tools__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 60px;
  align-items: center;
}

.tool-list { display: grid; gap: 14px; margin-top: 30px; }

.tool-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.tool-item:hover { border-color: var(--line-strong); transform: translateX(5px); box-shadow: var(--shadow-md); }

.tool-item__badge {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
  border: 1px solid rgba(254, 146, 1, 0.25);
}
.tool-item__badge svg { width: 20px; height: 20px; }

.tool-item strong { display: block; color: var(--navy); font-family: var(--font-display); font-size: 1.02rem; }
.tool-item small { color: var(--muted); font-size: 0.87rem; }

/* Mock window */

.mock-window {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mock-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.mock-window__bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.mock-window__bar i:nth-child(1) { background: #ef5b5b; }
.mock-window__bar i:nth-child(2) { background: var(--yellow); }
.mock-window__bar i:nth-child(3) { background: var(--green); }

.mock-window__title { margin-left: 10px; color: var(--faint); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; }

.mock-window__body { padding: 20px; }

.mock-row { display: flex; gap: 10px; margin-bottom: 12px; }
.mock-row:last-child { margin-bottom: 0; }

.mock-pill {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  background: var(--cyan-soft);
  border: 1px solid rgba(254, 146, 1, 0.25);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
}

.mock-pill.dark { background: rgba(13, 59, 140, 0.08); border-color: rgba(13, 59, 140, 0.25); color: var(--blue); }

.mock-swatches { display: flex; gap: 8px; margin: 16px 0; }

.mock-swatch { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); }
.mock-swatch.s1 { background: linear-gradient(135deg, #FE9201, #0d3b8c); }
.mock-swatch.s2 { background: linear-gradient(135deg, #18a957, #0f7a3f); }
.mock-swatch.s3 { background: linear-gradient(135deg, #f2a51a, #c67a0f); }
.mock-swatch.s4 { background: linear-gradient(135deg, #9d8df2, #5b4ac2); }

.mock-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mock-table__row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 9px 12px; font-size: 0.78rem; font-family: var(--font-mono); }
.mock-table__row + .mock-table__row { border-top: 1px solid var(--line); }
.mock-table__row.head { color: var(--faint); background: var(--bg-alt); }
.mock-table__row .v { color: var(--cyan); }

/* ---------- Calculators ---------- */

.calculators { background: var(--bg); }

.calculators__head { text-align: center; max-width: 680px; margin: 0 auto 50px; }
.calculators__head .lead { margin: 0 auto; }

.calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.calc-card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.calc-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }

.calc-card__tag {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(242, 165, 26, 0.35);
  background: rgba(242, 165, 26, 0.08);
  color: #b87a0f;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calc-card h3 { font-size: 1.16rem; margin-top: 18px; }
.calc-card p { color: var(--muted); font-size: 0.94rem; }
.calc-card__icon { color: var(--cyan); }
.calc-card__icon svg { width: 26px; height: 26px; }

/* ---------- Projects ---------- */

.projects { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.projects__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(254, 146, 1, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(254, 146, 1, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #fff, var(--bg-alt));
  background-size: 34px 34px, 34px 34px, 100% 100%;
  cursor: pointer;
}

.project-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-tile:hover img { transform: scale(1.06); }

.project-tile__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 37, 105, 0.88));
}

.project-tile__overlay .tag {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(254, 146, 1, 0.18);
  border: 1px solid rgba(254, 146, 1, 0.45);
  color: #a8ecf5;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-tile__overlay h3 { font-size: 1.12rem; color: #fff; }
.project-tile__overlay p { color: rgba(255, 255, 255, 0.78); font-size: 0.85rem; margin-top: 4px; }

/* ---------- Stats ---------- */

.stats {
  background: var(--navy);
  color: #fff;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.stat {
  text-align: center;
  padding: 26px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat__value .suffix { color: var(--cyan); }

.stat__label {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */

.contact { background: var(--bg); }

.contact__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 60px;
  align-items: start;
}

.contact__side .lead { margin-top: 20px; }

.contact-details { display: grid; gap: 16px; margin-top: 34px; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-alt);
}

.contact-detail__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--cyan-soft);
  border: 1px solid rgba(254, 146, 1, 0.25);
  color: var(--cyan);
}
.contact-detail__icon svg { width: 20px; height: 20px; }

.contact-detail small { display: block; color: var(--faint); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-mono); }
.contact-detail a, .contact-detail span { color: var(--navy); font-weight: 600; text-decoration: none; }
.contact-detail a:hover { color: var(--cyan); }

/* Form */

.form-panel {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.form-panel h3 { margin-bottom: 20px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-field { display: grid; gap: 7px; }
.form-field--full { grid-column: 1 / -1; }

.form-field label { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-alt);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-field textarea { resize: vertical; min-height: 120px; }

.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(254, 146, 1, 0.12);
}

.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.form-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 0.82rem;
}

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(24, 169, 87, 0.35);
  border-radius: 10px;
  background: rgba(24, 169, 87, 0.08);
  color: #0f7a3f;
  font-size: 0.92rem;
}

.form-success.is-visible { display: block; }

/* Newsletter */

.newsletter {
  margin-top: 20px;
  padding: 22px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--cyan-soft);
}

.newsletter h4 { margin: 0 0 6px; font-size: 1.02rem; }
.newsletter p { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }

.newsletter__row { display: flex; gap: 10px; }
.newsletter__row input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
}
.newsletter__row input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(254, 146, 1, 0.12); }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 60px 0 34px;
  color: rgba(0, 37, 105, 0.75);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer__brand p { color: rgba(0, 37, 105, 0.65); font-size: 0.92rem; margin-top: 16px; max-width: 300px; }

.footer__brand .logo img { height: 60px; width: auto; }

.footer h4 {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 37, 105, 0.55);
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer ul a { color: rgba(0, 37, 105, 0.75); text-decoration: none; font-size: 0.93rem; transition: color 160ms ease; }
.footer ul a:hover { color: var(--cyan); }

.footer__contact ul { gap: 14px; }
.footer__contact li { color: rgba(0, 37, 105, 0.75); font-size: 0.93rem; }
.footer__contact strong { color: rgba(0, 37, 105, 0.55); display: block; font-size: 0.8rem; font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 3px; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: rgba(0, 37, 105, 0.55);
  font-size: 0.85rem;
}

/* ---------- Subpages ---------- */

.subpage-hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 85% -20%, rgba(254, 146, 1, 0.15), transparent 60%),
    var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.subpage-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.8), transparent 90%);
}

.subpage-hero .container { position: relative; }
.subpage-hero h1 { margin: 0 0 16px; color: #fff; }
.subpage-hero p { max-width: 640px; color: rgba(255, 255, 255, 0.72); font-size: 1.08rem; }

.subpage-section { padding: 72px 0; background: var(--bg); }

/* Download card */

.download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.download-card .update-note {
  margin-top: 20px;
  padding: 15px 17px;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: rgba(242, 165, 26, 0.08);
  color: #8a5a0f;
  font-size: 0.93rem;
}

.download-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.download-meta span, .release-date {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.download-actions { display: grid; gap: 12px; justify-items: start; }

/* Release notes */

.release-list { display: grid; gap: 16px; }

.release-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.release-item:first-child { border-top: 0; padding-top: 0; }

.release-version {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}

.release-item h3 { font-size: 1.2rem; }
.release-item > div:last-child > p { color: var(--muted); font-size: 0.95rem; }

.check-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.92rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--cyan);
  box-shadow: inset 0 0 0 3px #fff;
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  color: var(--cyan);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, background 180ms ease;
}

.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--bg-alt); }

.to-top svg { width: 20px; height: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero__layout, .tools__layout, .contact__layout, .intro-grid {
    grid-template-columns: 1fr;
  }
  .hero__layout { padding-bottom: 72px; }
  .blueprint { max-width: 460px; margin: 0 auto; width: 100%; }

  .services__grid, .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .timeline::before { display: none; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav { gap: 14px; }
  .nav__links {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { display: block; padding: 13px 26px; }
  .nav__cta { margin: 12px 26px 0; }
  .nav__toggle { display: block; }
}

@media (max-width: 640px) {
  .section { padding: 76px 0; }
  .services__grid, .calc-grid, .projects__grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }

  .bp-card.c1 { left: 8px; }
  .bp-card.c2 { right: 6px; }

  .logo img { height: 64px; width: auto; }
  .footer__brand .logo img { height: 52px; width: auto; }

  .form-grid { grid-template-columns: 1fr; }
  .form-panel { padding: 26px 20px; }
  .download-card { grid-template-columns: 1fr; padding: 28px 22px; }
  .release-item { grid-template-columns: 1fr; gap: 12px; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .stat { padding: 20px 10px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
