/* ─── FONTS (self-hosted: no third-party requests, no GDPR exposure) ─── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Logo red, exactly as supplied. Only ever used to paint the U mark.
     Its contrast on white is 3.91:1 — below AA — which is fine for a
     logotype (WCAG 1.4.3 exempts them) but not for anything else. */
  --brand: #ff171d;
  /* Same hue as --brand, darkened until it clears AA (5.03:1) both as
     text on white and as a background under white text. Everything in the
     UI uses this, never --brand. */
  --primary: #E00010;
  --primary-hover: #b8000d;
  /* --primary is too dark to read on the hero (4.06:1). This tint is the
     same hue lightened for dark backgrounds: 7.37:1 over the hero. */
  --primary-on-dark: #ff6b6f;
  --bg: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --text-mid: #6e6e73;
  /* Was #86868b, which is only 3.62:1 on white — below AA for the 11-13px
     text this token is used on (footer headings, copyright, card numbers). */
  --text-light: #74747a;
  --border: #d2d2d7;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-h: 56px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Anchor targets clear the fixed nav instead of hiding under it. */
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* Visible keyboard focus everywhere. Pointer users never see this. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: translateY(0); }

/* ─── NAV ─── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  transition: background 0.4s, border-bottom 0.4s;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1152px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* The U mark is the "U" of the wordmark — the text node is only "Comply".
   The mark holds the brand red; the word inherits colour from context
   (white over the hero, ink once scrolled or in the footer). */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  height: 1.35em;
  width: auto;
  flex-shrink: 0;
  fill: var(--brand);
  display: block;
}
#navbar.scrolled .logo { color: var(--text); }
#navbar:not(.scrolled) .logo { color: #fff; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s;
}
#navbar.scrolled .nav-links a { color: var(--text); }
#navbar:not(.scrolled) .nav-links a { color: rgba(255,255,255,0.85); }

/* --primary is tuned for contrast against white; over the near-black hero
   it only reaches 4.06:1, so accent text there uses the lighter tint.
   These beat the rules above on specificity — no !important needed. */
#navbar.scrolled .nav-links a:hover,
#navbar.scrolled .nav-links .nav-cta { color: var(--primary); }
#navbar:not(.scrolled) .nav-links a:hover,
#navbar:not(.scrolled) .nav-links .nav-cta { color: var(--primary-on-dark); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
#navbar.scrolled .hamburger span { background: var(--text); }
#navbar:not(.scrolled) .hamburger span { background: #fff; }
/* Open state morphs the bars into an X. */
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* No open-state colour override here on purpose: the menu panel starts at
   top:56px, *below* the nav bar, so the hamburger is never on top of it.
   Over the hero the bars must stay white in both states — forcing them dark
   when open put the X at 1.22:1 against the near-black hero. */

.mobile-menu {
  display: none;
  position: absolute;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--primary); }
.mobile-menu .nav-cta { color: var(--primary); }

/* ─── HERO ─── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0005;
}
#hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 24px;
  display: block;
}
.hero-content h1 {
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 28px;
}
.hero-content h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-content p {
  font-size: clamp(17px, 2vw, 22px);
  /* Was 0.6 alpha — too low against the animated backdrop. */
  color: rgba(255,255,255,0.78);
  font-weight: 300;
  line-height: 1.55;
  max-width: 600px;
  margin: 0 auto 48px;
}
/* Hero eyebrow sits on near-black; the brand red alone is too dim there. */
#hero .eyebrow { color: var(--primary-on-dark); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  padding: 15px 40px;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ─── SECTIONS ─── */
section { width: 100%; }
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── ABOUT ─── */
#about {
  background: var(--surface);
  padding: 160px 0;
  text-align: center;
}
#about blockquote {
  font-size: clamp(24px, 3.5vw, 46px);
  font-weight: 600;
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.5px;
  max-width: 860px;
  margin: 0 auto 48px;
}
#about .about-sub {
  font-size: 20px;
  color: var(--text-mid);
  line-height: 1.6;
  font-weight: 400;
  max-width: 700px;
  margin: 0 auto;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding-top: 48px;
}
.stat-value {
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.stat-label {
  font-size: 15px;
  color: var(--text-mid);
}

/* ─── SHARED SECTION HEADER ─── */
/* Centred header block, reused by every section that has one, so they all
   line up. Body copy stays left-aligned — centred prose is measurably
   harder to read once it passes a couple of lines. */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 72px;
}
.section-head h2 {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 19px;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ─── SERVICES (dark editorial index) ─── */
#services {
  background: #0a0005;
  padding: 160px 0;
  position: relative;
  overflow: hidden;
}
/* Same radial the hero canvas paints, so the page's two dark bands read as
   one system rather than two unrelated black boxes. */
#services::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, #2d0010 0%, #0a0005 72%);
  z-index: 0;
}
#services .container { position: relative; z-index: 1; }

#services .section-head h2 { color: #fff; }
#services .eyebrow { color: var(--primary-on-dark); }
#services .section-sub { color: rgba(255,255,255,0.66); }

.services-index {
  border-top: 1px solid rgba(255,255,255,0.16);
  max-width: 940px;
  margin: 0 auto;
}
.service-row { border-bottom: 1px solid rgba(255,255,255,0.16); }

/* Whole row is the control — no small target to hunt for. */
.row-head {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  align-items: baseline;
  gap: 20px;
  padding: 34px 16px;
  text-align: left;
  transition: background 0.25s, padding-left 0.25s;
}
.row-head:hover {
  background: rgba(255,23,29,0.06);
  padding-left: 26px;
}
.row-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  /* 0.45 alpha only reaches ~4:1 here — below AA for 13px. */
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.08em;
}
.row-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.6px;
  line-height: 1.15;
  transition: color 0.25s;
}
.row-head:hover .row-title,
.row-head[aria-expanded="true"] .row-title { color: var(--primary-on-dark); }
.row-tags {
  grid-column: 2;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-top: 10px;
  line-height: 1.5;
}
.row-tags span + span::before {
  content: '·';
  margin: 0 8px;
  color: rgba(255,255,255,0.3);
}
.row-arrow {
  grid-row: 1 / span 2;
  grid-column: 3;
  align-self: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  transition: transform 0.3s, background 0.25s, border-color 0.25s, color 0.25s;
}
.row-head:hover .row-arrow {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: translateX(4px);
}
.row-head[aria-expanded="true"] .row-arrow {
  transform: rotate(90deg);
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.row-arrow svg { width: 16px; height: 16px; }

.row-detail { display: none; padding: 0 16px 40px; }
.row-detail.open { display: block; }
.row-detail-inner {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
}
.row-summary {
  grid-column: 2;
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: 28px;
}
.row-items {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.row-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  padding-top: 14px;
  /* Decorative rule, not text — the full brand red is fine and reads hot
     against the black. */
  border-top: 2px solid var(--brand);
}
.row-item p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.62);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .row-items { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 768px) {
  .row-head { grid-template-columns: 40px 1fr 32px; gap: 12px; padding: 26px 6px; }
  .row-head:hover { padding-left: 6px; }
  .row-arrow { width: 32px; height: 32px; }
  .row-detail-inner { grid-template-columns: 1fr; gap: 0; }
  .row-summary, .row-items { grid-column: 1; }
  .row-detail { padding: 0 6px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .hamburger span { transition: none; }
  .row-head, .row-arrow, .row-title { transition: none; }
  .row-head:hover { padding-left: 16px; }
}

/* ─── CONTACT ─── */
#contact {
  background: var(--surface);
  padding: 160px 0;
  text-align: center;
}
/* Contact's header uses .section-head like the others; only the gap to the
   buttons is tightened. */
#contact .section-head { margin-bottom: 48px; }
.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-row {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.linkedin-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.linkedin-btn:hover { color: var(--primary); border-color: var(--primary); }
.linkedin-btn svg { width: 18px; height: 18px; }

/* ─── FOOTER ─── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-grid {
  max-width: 1152px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  /* Equal columns: with centred text, a wider brand column would sit off
     the visual thirds and read as misaligned. */
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}
.footer-brand .logo { font-size: 17px; color: var(--text); }
.footer-brand p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 260px;
  margin: 12px auto 0;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li + li { margin-top: 12px; }
.footer-col ul li a {
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  max-width: 1152px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-light);
}
/* space-between used to hold these apart at opposite ends; centred and
   adjacent they run together ("…rights reserved. Georgia"), so separate
   them explicitly. */
.footer-bottom p + p::before {
  content: '·';
  margin-right: 12px;
}

.chevron { display: inline-block; vertical-align: middle; }

/* ─── 404 ─── */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface);
  padding: 24px;
}
.page-404 h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.05;
  margin-bottom: 24px;
}
.page-404 p {
  font-size: 20px;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 48px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .stats { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: center; }
  /* Stacked, the items are already separated by the line break — a leading
     dot on its own line would just look like a stray glyph. */
  .footer-bottom p + p::before { content: none; }
  .section-head { margin-bottom: 48px; }
  #about { padding: 100px 0; }
  #services { padding: 100px 0; }
  #contact { padding: 100px 0; }
}
