:root {
  --bg: #1b4f9a;
  --bg-2: #1f5fb8;
  --surface: rgba(255, 255, 255, .08);
  --surface-hover: rgba(255, 255, 255, .13);
  --border: rgba(170, 210, 255, .32);
  --text: #f6f9ff;
  --muted: #e8f1ff;
  --brand: #1f6fd6;
  --brand-deep: #0f4fa8;
  --cyan: #38bdf8;
  --green: #a6e06f;
  --link: #7cc0ff;
  --glow: 0 12px 44px -12px rgba(56, 189, 248, .45);
  --alt-end: #1b52a2;
  --footer-bg: #0f2f66;
  --footer-ink: #e8f1ff;
  --grid: rgba(140, 190, 255, .09);
  --icon-ink: #38bdf8;
  --input-bg: rgba(255, 255, 255, .05);
  --page-bg: linear-gradient(180deg, #245fb0 0%, #1b4f9a 35%, #123a78 100%);
  --hero-fade: #215aa9;
  --radius: 16px;
  --maxw: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--bg); }
body {
  margin: 0; background: var(--page-bg); color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Faint tech grid behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 25%, transparent 80%);
}
main, .site-footer { position: relative; z-index: 1; }
img, video, svg { max-width: 100%; display: block; }
img, video { height: auto; }
a { color: var(--link); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(236, 244, 255, .92);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(15, 47, 94, .12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  --nav-ink: #0f2f5e;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; transition: min-height .25s ease; }
.brand img { height: 54px; width: auto; transition: height .25s ease; }
.site-header.scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.site-header.scrolled .header-inner { min-height: 62px; }
.site-header.scrolled .brand img { height: 40px; }
.site-nav ul { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { text-decoration: none; color: var(--nav-ink); font-weight: 500; position: relative; }
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green)); transform: scaleX(0); transition: transform .25s ease;
}
.site-nav a:not(.btn):hover::after, .site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav a:hover { color: var(--brand); }
.site-nav a.btn { color: #fff; }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(15, 47, 94, .28); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer; color: var(--nav-ink);
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; margin: auto;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

/* Buttons */
.btn {
  display: inline-block; color: #fff; text-decoration: none; font: inherit; font-weight: 600;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1px solid rgba(124, 192, 255, .5); cursor: pointer;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); transition: box-shadow .2s, transform .15s, filter .2s;
}
.btn:hover { box-shadow: 0 0 28px -2px rgba(56, 189, 248, .6); filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-small { padding: .45rem 1.1rem; }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: none; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--border); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--hero-fade));
}
.slides { display: grid; position: relative; }
.slide {
  grid-area: 1 / 1;
  padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(6rem, 12vw, 10rem);
  opacity: 0; visibility: hidden;
  transition: opacity .9s ease, visibility 0s linear .9s;
  background-size: cover; background-position: center;
}
.slide.active { opacity: 1; visibility: visible; transition: opacity .9s ease; }
.slide-1 { background-image: linear-gradient(105deg, rgba(10, 30, 70, .86) 0%, rgba(16, 72, 150, .72) 58%, rgba(24, 96, 186, .34) 100%), url("images/hero-1.jpg"); }
.slide-2 { background-image: linear-gradient(105deg, rgba(10, 30, 70, .86) 0%, rgba(16, 72, 150, .72) 58%, rgba(24, 96, 186, .34) 100%), url("images/hero-2.jpg"); }
.slide-3 { background-image: linear-gradient(105deg, rgba(10, 30, 70, .86) 0%, rgba(16, 72, 150, .72) 58%, rgba(24, 96, 186, .34) 100%), url("images/hero-3.jpg"); }

.slide .hero-inner { position: relative; z-index: 2; }
.slide .hero-inner > * { opacity: 0; }
.slide.active .hero-inner > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.slide.active .hero-inner > :nth-child(1) { animation-delay: .25s; }
.slide.active .hero-inner > :nth-child(2) { animation-delay: .40s; }
.slide.active .hero-inner > :nth-child(3) { animation-delay: .55s; }
.slide.active .hero-inner > :nth-child(4) { animation-delay: .70s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero-inner > * { max-width: 780px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: #9fd0ff; }
.hero h1, .hero .slide-title { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-weight: 800; }
.hero h1, .hero .slide-title, .hero .lead, .hero .eyebrow { text-shadow: 0 2px 20px rgba(4, 18, 48, .6); }
.hero .accent { text-shadow: none; }
.accent {
  color: var(--green);
  background: linear-gradient(90deg, #5ab8ff, var(--green)); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lead { font-size: 1.2rem; max-width: 58ch; color: #cfdcf0; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.hero-controls {
  position: absolute; left: 0; right: 0; bottom: 1.4rem; margin-inline: auto; z-index: 3;
  display: flex; align-items: center; gap: .9rem;
}
.hero-dots { display: flex; gap: .55rem; }
.hero-dots button {
  width: 34px; height: 6px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(255, 255, 255, .3); transition: background .2s, width .2s;
}
.hero-dots button[aria-selected="true"] { background: linear-gradient(90deg, var(--cyan), var(--green)); width: 52px; }
.hero-arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .06); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background .15s;
}
.hero-arrow:hover { background: rgba(255, 255, 255, .2); }

/* Sections */
.section { padding: clamp(3.2rem, 8vw, 5.5rem) 0; position: relative; }
.section-alt { background: rgba(255, 255, 255, .05); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); text-align: center; margin-bottom: 1rem; }
.section-title::after {
  content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; margin: .7rem auto 0;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}
.section-intro { max-width: 74ch; margin: 1.2rem auto 2.4rem; text-align: center; color: var(--muted); }
.subhead { text-align: center; font-size: 1.3rem; margin: 3.4rem 0 1.6rem; }

/* AI section glow */
.ai-section { overflow: hidden; }
.ai-section::before {
  content: ""; position: absolute; width: 760px; height: 760px; left: 50%; top: -260px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(56, 189, 248, .24), transparent 62%); pointer-events: none;
}
.ai-section > .container { position: relative; }

/* Cards */
.cards { display: grid; gap: 1.4rem; margin-top: 2.4rem; }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.section-intro + .cards { margin-top: 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; backdrop-filter: blur(6px);
  transition: transform .2s, border-color .25s, background .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(56, 189, 248, .6); background: var(--surface-hover); box-shadow: var(--glow); }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.icon {
  width: 46px; height: 46px; padding: 10px; margin-bottom: 1rem; border-radius: 12px;
  fill: none; stroke: var(--icon-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(56, 189, 248, .1); border: 1px solid rgba(56, 189, 248, .3); transition: transform .3s ease, background .3s;
}
.card:hover .icon { transform: scale(1.1) rotate(-6deg); background: rgba(56, 189, 248, .2); }
.card-media { padding: 0; overflow: hidden; }
.card-media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: transform .6s ease; }
.card-media:hover img { transform: scale(1.05); }
.card-media h3, .card-media p { padding-inline: 1.5rem; }
.card-media h3 { margin-top: 1.3rem; }
.card-media p { padding-bottom: 1.6rem; }
.services .card { position: relative; overflow: hidden; }
.services .card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green)); opacity: .75;
}

/* Pipeline */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; position: relative; counter-reset: p; }
.pipeline::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 23px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--green)); opacity: .5;
}
.pipeline li { position: relative; text-align: center; padding: 0 .4rem; }
.pipeline .node {
  display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); color: var(--text); font-weight: 700;
  animation: pulse 3.6s ease-in-out infinite;
}
.pipeline li:nth-child(2) .node { animation-delay: .5s; }
.pipeline li:nth-child(3) .node { animation-delay: 1s; }
.pipeline li:nth-child(4) .node { animation-delay: 1.5s; }
.pipeline li:nth-child(5) .node { animation-delay: 2s; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); } 40% { box-shadow: 0 0 0 10px rgba(56, 189, 248, .18), 0 0 24px rgba(56, 189, 248, .6); } }
.pipeline h4 { font-size: 1.05rem; margin-bottom: .3em; }
.pipeline p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 2rem; }
.chips li {
  padding: .45rem 1rem; border-radius: 999px; font-weight: 500; font-size: .95rem;
  background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.chips li:hover { border-color: var(--cyan); box-shadow: 0 0 18px -4px rgba(56, 189, 248, .7); transform: translateY(-2px); }

/* Steps */
.steps { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 2.4rem; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; position: relative; overflow: hidden; }
.step-no {
  display: block; font-size: 2.6rem; font-weight: 800; line-height: 1; margin-bottom: .6rem;
  background: linear-gradient(90deg, var(--cyan), var(--green)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; }

/* Video */
.video { margin: 2rem 0 0; }
.video video {
  width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--border); box-shadow: 0 20px 60px -20px rgba(56, 189, 248, .35);
}

/* Contact */
.contact-grid { display: grid; gap: 2.4rem; grid-template-columns: 1.4fr 1fr; align-items: start; }
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
input, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--border); border-radius: 10px; padding: .75rem .9rem;
}
input:focus, textarea:focus { border-color: var(--cyan); outline: 3px solid rgba(56, 189, 248, .3); outline-offset: 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #ff7b72; }
.form-footer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#form-status { margin: 0; font-weight: 600; }
#form-status.ok { color: #7dd87f; }
#form-status.err { color: #ff8a80; }
.contact-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.contact-info h3 { font-size: 1.05rem; }
.contact-info ul { margin-bottom: 1.4rem; }
.contact-info li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.contact-info li:last-child { border-bottom: 0; }
.contact-info strong { color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.6rem 0; color: var(--footer-ink); font-size: .95rem; background: var(--footer-bg); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.footer-inner p { margin: 0; }

/* Mobile */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: #ecf4ff;
    border-bottom: 1px solid rgba(15, 47, 94, .15); box-shadow: 0 14px 28px rgba(0, 0, 0, .25); display: none; padding: 1rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: .2rem; }
  .site-nav a { display: block; padding: .7rem .4rem; }
  .site-nav a.btn { text-align: center; margin-top: .4rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; gap: 1.4rem; padding-left: 1.4rem; }
  .pipeline::before { left: calc(1.4rem + 23px); right: auto; top: 24px; bottom: 24px; width: 2px; height: auto; }
  .pipeline li { text-align: left; display: grid; grid-template-columns: 48px 1fr; column-gap: 1rem; padding: 0; }
  .pipeline .node { grid-row: span 2; margin: 0; }
  .brand img { height: 44px; }
  .site-header.scrolled .brand img { height: 36px; }
}

/* Scroll reveal (classes added by main.js only when motion is allowed) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in:hover { transform: translateY(-4px); transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .slide .hero-inner > *, .reveal { opacity: 1; transform: none; }
}
