/* ==========================================================================
   DCS Technology Solutions — styles.css
   Palette and tokens follow the approved brand guide exactly.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours (approved) */
  --dcs-midnight: #0B132B;
  --dcs-electric: #2563EB;
  --dcs-cyan: #00D4FF;
  --dcs-slate: #64748B;
  --dcs-light: #E5E7EB;
  --dcs-very-light: #F3F4F6;

  /* Derived */
  --dcs-navy-2: #111B3C;          /* slightly lifted navy for dark-section cards */
  --dcs-electric-dark: #1D4FC4;   /* hover state */
  --ink: var(--dcs-midnight);
  --body: #47536B;                /* slate, darkened slightly for AA body contrast */

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  /* Layout */
  --container: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 76px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dcs-electric); text-decoration: none; }
a:hover { color: var(--dcs-electric-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible {
  outline: 3px solid var(--dcs-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--dcs-midnight); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Eyebrow labels (engineering-drawing accent) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dcs-electric);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--dcs-electric), var(--dcs-cyan));
  border-radius: 2px;
}
.on-dark .eyebrow { color: var(--dcs-cyan); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-primary { background: var(--dcs-electric); color: #fff; }
.btn-primary:hover { background: var(--dcs-electric-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--dcs-light); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--dcs-electric); color: var(--dcs-electric); }
.on-dark .btn-ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.on-dark .btn-ghost:hover { border-color: var(--dcs-cyan); color: var(--dcs-cyan); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--dcs-light);
  box-shadow: 0 6px 24px -18px rgba(11,19,43,.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand img { height: 44px; width: auto; }
.brand .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.brand .brand-name span { display: block; font-weight: 500; font-size: 0.8rem; color: var(--dcs-slate); letter-spacing: .02em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
}
.site-nav a:hover { background: var(--dcs-very-light); color: var(--dcs-electric); }
.site-nav a.active { color: var(--dcs-electric); }
.site-nav a.nav-cta {
  background: var(--dcs-midnight);
  color: #fff;
  margin-left: 8px;
  padding: 10px 20px;
}
.site-nav a.nav-cta:hover { background: var(--dcs-electric); color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--dcs-light);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block; width: 20px; height: 2px;
  background: var(--ink); margin: 4px 0;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(700px 340px at 85% 10%, rgba(0,212,255,.10), transparent 60%),
    radial-gradient(600px 300px at 8% 90%, rgba(37,99,235,.08), transparent 60%),
    var(--dcs-very-light);
  border-bottom: 1px solid var(--dcs-light);
  overflow: hidden;
}
.hero::after {           /* faint engineering grid */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(11,19,43,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,19,43,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(760px 480px at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(760px 480px at 70% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px;
  align-items: center;
  padding: 84px 0 92px;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead {
  font-size: 1.14rem;
  max-width: 34em;
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual img {
  width: min(100%, 400px);
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(11,19,43,.22));
}

/* Hero load-in: eyebrow leads, the rest follows in sequence */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero h1,
  .hero .lead,
  .hero .hero-actions,
  .hero .hero-visual {
    opacity: 0;
    transform: translateY(16px);
    animation: heroIn .8s cubic-bezier(.22,.8,.3,1) forwards;
  }
  .hero .eyebrow      { animation-delay: .05s; }   /* leads */
  .hero h1            { animation-delay: .38s; }
  .hero .lead         { animation-delay: .56s; }
  .hero .hero-actions { animation-delay: .74s; }
  .hero .hero-visual  {
    transform: translateY(10px) scale(.97);
    animation-delay: .45s;
  }
}
@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.tint { background: var(--dcs-very-light); border-top: 1px solid var(--dcs-light); border-bottom: 1px solid var(--dcs-light); }
.section-head { max-width: 620px; margin-bottom: 46px; }
.section-head p { font-size: 1.06rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--dcs-light);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 18px 40px -24px rgba(11,19,43,.35);
}
.card .icon {
  width: 54px; height: 54px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: var(--dcs-very-light);
  border: 1px solid var(--dcs-light);
  display: flex; align-items: center; justify-content: center;
}
.card .icon img { width: 34px; height: 34px; }
.card p { font-size: 0.98rem; margin-bottom: 0; }
.card .card-link {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.card .tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dcs-slate);
  background: var(--dcs-very-light);
  border: 1px solid var(--dcs-light);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 14px;
}

/* Feature cards (service pages / homepage services) */
.card.feature { padding: 36px 32px; }
.card.feature h3 { font-size: 1.35rem; }

/* Wide highlight card (icon beside text) */
.card.wide { flex-direction: row; align-items: flex-start; gap: 24px; }
.card.wide .icon { margin-bottom: 0; flex: 0 0 54px; }
.card.wide .wide-body h3 { margin-bottom: 8px; }
.card.wide .wide-body p { margin: 0; max-width: 62em; }
@media (max-width: 760px) {
  .card.wide { flex-direction: column; }
}

/* ---------- Method section (signature) ---------- */
.method {
  background:
    radial-gradient(720px 400px at 15% 0%, rgba(37,99,235,.28), transparent 60%),
    radial-gradient(600px 380px at 95% 100%, rgba(0,212,255,.14), transparent 55%),
    var(--dcs-midnight);
  color: #C7D0E2;
}
.method h2, .method h3 { color: #fff; }
.method .section-head p { color: #C7D0E2; }
.method-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}
.layers-figure { display: flex; justify-content: center; }
.layers-figure svg { width: min(100%, 420px); height: auto; overflow: visible; }

.layer { transition: transform 1s cubic-bezier(.22,.8,.3,1); }
/* Stacked start position (only when animation is armed) */
.anim-armed .layer-top    { transform: translateY(84px); }
.anim-armed .layer-bottom { transform: translateY(-84px); }
.anim-armed.in-view .layer-top,
.anim-armed.in-view .layer-bottom { transform: translateY(0); }

.method-steps { display: grid; gap: 10px; }
.method-step {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  transition: opacity .8s ease, transform .8s ease, border-color .3s ease;
}
.method-step:hover { border-color: rgba(0,212,255,.4); }
.anim-armed ~ .method-copy .method-step { opacity: 0; transform: translateY(14px); }
.anim-armed.in-view ~ .method-copy .method-step { opacity: 1; transform: translateY(0); }
.anim-armed.in-view ~ .method-copy .method-step:nth-child(1) { transition-delay: .25s; }
.anim-armed.in-view ~ .method-copy .method-step:nth-child(2) { transition-delay: .45s; }
.anim-armed.in-view ~ .method-copy .method-step:nth-child(3) { transition-delay: .65s; }
.method-step .step-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-top: 4px;
}
.step-name.s1 { color: var(--dcs-cyan); }
.step-name.s2 { color: #7AA6FF; }
.step-name.s3 { color: #A9B6D6; }
.method-step p { margin: 0; font-size: 0.97rem; color: #C7D0E2; }
.method-tagline {
  margin-top: 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  color: #fff;
}
.method-tagline em { color: var(--dcs-cyan); font-style: normal; }

/* ---------- Why strip ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; }
.why-item {
  border-top: 3px solid var(--dcs-electric);
  background: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-left: 1px solid var(--dcs-light);
  border-right: 1px solid var(--dcs-light);
  border-bottom: 1px solid var(--dcs-light);
  padding: 24px 22px;
}
.why-item:nth-child(2) { border-top-color: #178FE0; }
.why-item:nth-child(3) { border-top-color: #0BB6EC; }
.why-item:nth-child(4) { border-top-color: var(--dcs-cyan); }
.why-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.why-item p { font-size: 0.94rem; margin: 0; }

/* ---------- Chip list (capabilities) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chips li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--dcs-light);
  border-radius: 999px;
  padding: 9px 18px;
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background:
    radial-gradient(620px 300px at 90% 0%, rgba(0,212,255,.10), transparent 60%),
    var(--dcs-very-light);
  border-bottom: 1px solid var(--dcs-light);
  padding: 72px 0 60px;
}
.page-head .lead { font-size: 1.12rem; max-width: 42em; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(640px 320px at 85% 20%, rgba(0,212,255,.16), transparent 60%),
    linear-gradient(120deg, var(--dcs-midnight), #12225C 70%, #16307E);
  color: #C7D0E2;
}
.cta-band .cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 64px 0;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; max-width: 34em; }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 56px;
  align-items: start;
}
.about-aside {
  background: var(--dcs-very-light);
  border: 1px solid var(--dcs-light);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.about-aside h3 { font-size: 1rem; }
.about-aside ul { margin: 0; padding-left: 20px; }
.about-aside li { margin-bottom: 8px; font-size: 0.97rem; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--dcs-light);
  border-radius: var(--radius);
  padding: 34px 32px;
}
.contact-card.primary {
  background:
    radial-gradient(480px 260px at 90% 0%, rgba(0,212,255,.14), transparent 60%),
    var(--dcs-midnight);
  border-color: transparent;
  color: #C7D0E2;
}
.contact-card.primary h3 { color: #fff; font-size: 1.3rem; }
.contact-card.primary .email-line {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--dcs-cyan);
  margin: 18px 0 24px;
  word-break: break-all;
}
.contact-card h3 { font-size: 1.15rem; }
.contact-card ul { padding-left: 20px; margin: 0; }
.contact-card li { margin-bottom: 10px; font-size: 0.97rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dcs-midnight);
  color: #98A4BE;
  padding: 56px 0 34px;
  font-size: 0.94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.site-footer .brand { color: #fff; }
.site-footer .brand .brand-name span { color: #98A4BE; }
.footer-tagline { margin-top: 14px; max-width: 30em; }
.footer-nav { display: grid; gap: 8px; justify-items: start; }
.footer-nav a { color: #C7D0E2; }
.footer-nav a:hover { color: var(--dcs-cyan); }
.footer-legal {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .layer, .method-step { transition: none !important; }
  .anim-armed .layer-top, .anim-armed .layer-bottom { transform: translateY(0); }
  .anim-armed ~ .method-copy .method-step { opacity: 1; transform: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 0 72px; text-align: left; }
  .hero-visual { order: -1; }
  .hero-visual img { width: min(60%, 300px); }
  .method-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }

  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--dcs-light);
    box-shadow: 0 24px 40px -28px rgba(11,19,43,.4);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
    gap: 6px;
    display: none;
  }
  .site-nav a { padding: 12px 14px; }
  .site-nav a.nav-cta { margin-left: 0; text-align: center; }
  .nav-open .site-nav { display: flex; }
  .nav-open .nav-toggle .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
