/* Self-hosted variable fonts (latin subset) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
}

/* Brand colours taken from the logo */
:root {
  --brand-navy: #16295a;
  --brand-navy-dark: #0c1733;
  --brand-blue: #2f6fd6;
  --brand-orange: #f08a1c;
  --brand-green: #6dbb3c;
  --ink: #1d2433;
  --muted: #5b6475;
  --surface-alt: #f5f7fb;
  --radius: 14px;
}

html { scroll-padding-top: 72px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}

h1, h2, h3, .brand-text {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 700; color: var(--brand-navy); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-orange);
  margin-bottom: 0.75rem;
}

/* Buttons */
.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand-blue);
  --bs-btn-border-color: var(--brand-blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #2459b0;
  --bs-btn-hover-border-color: #2459b0;
  --bs-btn-active-bg: #1f4d99;
  --bs-btn-active-border-color: #1f4d99;
  --bs-btn-disabled-bg: var(--brand-blue);
  --bs-btn-disabled-border-color: var(--brand-blue);
  font-weight: 600;
}

/* Navbar */
#mainNav {
  padding: 1rem 0;
  transition: background-color .25s ease, padding .25s ease, box-shadow .25s ease;
}
#mainNav.scrolled,
#mainNav.menu-open,
.page-plain #mainNav {
  background: rgba(12, 23, 51, 0.95);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}
.brand-text { font-weight: 800; font-size: 1.3rem; color: #fff; }
.brand-text span { color: var(--brand-orange); }
.nav-wordmark { display: flex; flex-direction: column; line-height: 1; }
.nav-wordmark .brand-text { font-size: 1.45rem; }
.brand-sub {
  margin-top: 0.3rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
#mainNav .nav-link { font-weight: 500; color: rgba(255, 255, 255, 0.8); }
#mainNav .nav-link:hover,
#mainNav .nav-link.active { color: #fff; }
/* Menu button: three bars coloured like the logo's layers (top to bottom),
   folding into an X while the menu is open */
.stack-toggler {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
}
.stack-toggler span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.stack-toggler span:nth-child(1) { background: #3b7be8; }
.stack-toggler span:nth-child(2) { background: #f08a1c; }
.stack-toggler span:nth-child(3) { background: #5bb247; }
.stack-toggler[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.stack-toggler[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.stack-toggler[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Scrollspy marks the CTA active too; keep it looking like a normal button */
#mainNav .btn-brand.active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }

/* Hero */
.hero {
  position: relative;
  /* Exactly one screen tall (svh avoids jumps when mobile address bars show/hide).
     The nav is fixed over the hero, so equal padding keeps the content centred. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 96px 0;
  color: #fff;
  background: #080f23;
  overflow: hidden;
}
/* Image sits on the right and fades into the dark background on the left */
.hero-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 68%;
  background: var(--hero-img) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}

/* Pulses of light travelling out from the logo along the circuit traces.
   Each path is normalised to a length of 100, so a short dash followed by a long
   gap shows a single pulse; sliding the dash offset moves it to the edge. */
.hero-circuits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-circuits .pulse {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 120;
  stroke-dashoffset: 14;
  opacity: 0;
  animation: pulse-run var(--dur, 3s) cubic-bezier(.45, .05, .55, .95) var(--delay, 0s) infinite;
}
/* site.js sets this once the hero is scrolled out of view, so nothing repaints */
.hero.is-offscreen .pulse { animation-play-state: paused; }
.pulse-orange { stroke: #ffb04d; }
.pulse-green { stroke: #9cf05a; }
.pulse-blue { stroke: #5aa8ff; }
@keyframes pulse-run {
  0% { stroke-dashoffset: 14; opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}
.hero h1 { line-height: 1.1; }
.hero .lead { color: rgba(255, 255, 255, 0.8); max-width: 34rem; }

/* Scroll cue at the bottom of the hero */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-orange);
  text-decoration: none;
  transition: color .2s ease;
}
.scroll-cue:hover { color: #ffb15e; }
.scroll-cue i { font-size: 1.1rem; animation: cue-bounce 2s ease-in-out infinite; }
@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Sections */
.section { padding: 100px 0; }
.section-alt { background: var(--surface-alt); }
.section-dark { background: var(--brand-navy-dark); color: #fff; }
.section-dark h2 { color: #fff; }
.section-head { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }

/* Service cards */
.service-card {
  background: #fff;
  border: 1px solid #e6e9f0;
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(22, 41, 90, 0.1);
  border-color: transparent;
}
.service-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--brand-navy); margin: 1.25rem 0 0.75rem; }
.service-card p { color: var(--muted); margin: 0; }

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  transition: background-color .2s ease, color .2s ease;
}
.accent-blue { background: rgba(47, 111, 214, 0.1); color: var(--brand-blue); }
.accent-orange { background: rgba(240, 138, 28, 0.12); color: var(--brand-orange); }
.accent-green { background: rgba(109, 187, 60, 0.14); color: #4f9a22; }
/* On hover the icon tile fills with its own colour */
.service-card:hover .accent-blue { background: var(--brand-blue); color: #fff; }
.service-card:hover .accent-orange { background: var(--brand-orange); color: #fff; }
.service-card:hover .accent-green { background: #4f9a22; color: #fff; }

/* Approach steps: a coloured line over a faint track. When the steps scroll
   into view (site.js adds .reveal, then .visible) the lines draw in from the
   left, one after another on wide screens. */
.step { position: relative; border-top: 3px solid #e3e7ef; padding-top: 1.5rem; --step-color: var(--brand-blue); }
.step::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--step-color);
  transform-origin: left;
}
.step.reveal::before { transform: scaleX(0); }
.step.reveal.visible::before {
  transform: scaleX(1);
  transition: transform .6s cubic-bezier(.65, 0, .35, 1) var(--step-delay, 0s);
}
.col-lg-3:nth-child(2) .step { --step-color: var(--brand-orange); }
.col-lg-3:nth-child(3) .step { --step-color: var(--brand-green); }
.col-lg-3:nth-child(4) .step { --step-color: var(--brand-navy); }
@media (min-width: 992px) {
  .col-lg-3:nth-child(2) .step { --step-delay: .25s; }
  .col-lg-3:nth-child(3) .step { --step-delay: .5s; }
  .col-lg-3:nth-child(4) .step { --step-delay: .75s; }
}
.step-num { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 2rem; color: #c9d1e2; }
.step h3 { font-size: 1.25rem; font-weight: 700; color: var(--brand-navy); margin: 0.5rem 0; }
.step p { color: var(--muted); margin: 0; }

/* About */
.code-card {
  background: #0d1530;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(22, 41, 90, 0.25);
  overflow: hidden;
  max-width: 460px;
  margin: 0 auto;
}
.code-card-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: #16204a;
}
.code-card-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-card-bar span:nth-child(2) { background: #febc2e; }
.code-card-bar span:nth-child(3) { background: #28c840; }
.code-card-bar em { margin-left: auto; font-style: normal; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.code-card pre {
  margin: 0;
  padding: 1.5rem;
  color: #dbe4ff;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}
.code-card .k { color: #ff9f43; }
.code-card .f { color: #6fb1ff; }
.code-card .c { color: #8bc96a; }
.code-cursor {
  display: inline-block;
  width: .55em;
  height: 1.15em;
  margin-left: .2em;
  vertical-align: -0.2em;
  background: #8bc96a;
  animation: cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }

/* Arrow on the main call to action nudges forward on hover */
.btn-arrow i { display: inline-block; margin-left: .35rem; transition: transform .2s ease; }
.btn-arrow:hover i,
.btn-arrow:focus-visible i { transform: translateX(4px); }

.project-card {
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--brand-blue);
  padding: 2rem;
  box-shadow: 0 6px 24px rgba(22, 41, 90, 0.06);
}
.project-client { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.project-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--brand-navy); }
.project-card p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.check-list li { padding: 0.35rem 0; }
.check-list i { color: var(--brand-green); margin-right: 0.5rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tags span {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--brand-navy);
  border: 1px solid #e3e7ef;
}

/* Contact */
.contact-item { display: flex; gap: 1rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 1.25rem; }
.contact-item a { color: #fff; overflow-wrap: anywhere; }
.contact-item i { font-size: 1.4rem; color: var(--brand-orange); flex-shrink: 0; }
.contact-item > div { min-width: 0; }
.contact-form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
}
.contact-form .form-label { font-weight: 500; font-size: 0.9rem; }
.contact-form .form-control {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.contact-form .form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 214, 0.35);
  color: #fff;
}
.contact-form .invalid-feedback { color: #ff9b8f; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 0.95rem; }
.form-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.form-note a { color: rgba(255, 255, 255, 0.85); }
.form-status.success { color: #9be07a; display: flex; align-items: center; gap: .5rem; }
.form-status.success i { font-size: 1.25rem; animation: status-pop .3s cubic-bezier(.2, .8, .3, 1.4) both; }
@keyframes status-pop {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: none; }
}
.form-status.error { color: #ff9b8f; }

/* Footer */
.site-footer {
  background: #070e21;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}
.footer-top { padding: 3.5rem 0 2.5rem; }
.site-footer h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
/* Icon and text stay on one line; long addresses wrap inside their own column */
.footer-contact a { display: inline-flex; align-items: center; gap: 0.6rem; max-width: 100%; overflow-wrap: anywhere; }
.footer-contact a span { min-width: 0; }
.footer-contact i { color: var(--brand-orange); flex-shrink: 0; }

/* Social icons: muted circles that turn brand orange on hover */
.social-icons { display: flex; gap: 0.6rem; margin-top: 1.25rem; }
.social-icons a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  transition: background-color .2s ease, color .2s ease;
}
.social-icons a:hover,
.social-icons a:focus-visible {
  background: var(--brand-orange);
  color: #fff;
}
.site-footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Plain pages (privacy, 404) */
.legal, .not-found { padding-top: 140px; }
.not-found { min-height: 70vh; }
.legal-body { max-width: 760px; margin: 0 auto; }
.legal h1, .not-found h1 { font-weight: 800; color: var(--brand-navy); margin-bottom: 0.5rem; }
.legal h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; scroll-margin-top: 90px; }
.legal p, .legal li { color: #3a4252; line-height: 1.7; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-cue i { animation: none; }
  .stack-toggler span { transition: none; }
  .hero-circuits { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .step::before { transform: none !important; transition: none !important; }
  .service-icon, .btn-arrow i { transition: none; }
  .code-cursor, .form-status.success i { animation: none; }
}

@media (max-width: 991.98px) {
  .hero-art { width: 100%; -webkit-mask-image: none; mask-image: none; opacity: 0.35; }
}

@media (max-width: 767.98px) {
  .section { padding: 70px 0; }
  .hero { padding: 96px 0 80px; }
}
