/* OpsNorth marketing site (feature 019).
   Visual system derived from cloudsafe.com — OpsNorth is a CloudSAFE product and the endorsement
   is the credibility. Dark-first, with light reserved for conversion moments only (cloudsafe.com
   uses exactly two white sections, both CTAs; so does this page).

   Self-hosted from the marketing bucket (FR-061). No external font host at all, which is why the
   FR-063 CSP can say `font-src 'self'` with no exception.

   IBM Plex Sans (c) 2017 IBM Corp., Reserved Font Name "Plex" — SIL OFL 1.1.
   Geist (c) 2023 Vercel, in collaboration with basement.studio — SIL OFL 1.1.
   Geist (c) 2024 The Geist Project Authors — SIL OFL 1.1.
   Full licences: /licenses/                                                                    */

/* --- IBM Plex Sans: IBM's official Latin1 split, unmodified. ---------------------------------- */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-Regular-Latin1.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-Medium-Latin1.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-SemiBold-Latin1.woff2') format('woff2');
}

/* --- Geist: subset to the glyphs the stats and labels actually render. ------------------------ */
@font-face {
  font-family: 'Geist Stats';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Geist-Stats-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono Labels';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/GeistMono-Labels-500.woff2') format('woff2');
}

:root {
  --blue: #1955a6;
  /* Decorative only: 1px rules, hover glows, fills. 4.42:1 on --black passes the 3:1 non-text
     threshold but NOT the 4.5:1 text one — measured with axe, not assumed. */
  --blue-bright: #2e7bd6;
  /* SMALL TEXT on dark. 7.65:1 on --black. Also a CloudSAFE palette colour, so this is a tint
     choice inside the brand rather than a departure from it. */
  --blue-text: #5ea8ff;
  --black: #121111;
  --navy: #112337;
  --white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-on-light: #2a2a2a;
  --rule: rgba(255, 255, 255, 0.08);

  --font: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-stat: 'Geist Stats', var(--font);
  --font-mono: 'Geist Mono Labels', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(4rem, 9vw, 8rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section-y);
}

/* --- The section signature: eyebrow -> gradient headline -> muted body. ----------------------- */
.pre-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 1.25rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
}

.pre-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--blue-bright);
}

h1,
h2 {
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  background: linear-gradient(180deg, #fff, #d9d9d9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: hsla(0, 0%, 100%, 0.2) 0 0 10.8px;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  max-width: 22ch;
}

/* The gradient headline paints text with a transparent fill, so anything that suppresses the
   background paints NOTHING — the headline vanishes rather than degrading. Two guards:
   a browser without background-clip:text, and Windows High Contrast / forced-colors, where the
   UA replaces backgrounds wholesale (NFR-008). */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  h1,
  h2 {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--white);
    text-shadow: none;
  }
}

@media (forced-colors: active) {
  h1,
  h2 {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: CanvasText;
    text-shadow: none;
  }
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

p {
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 0 1rem;
}

/* --- Buttons: square, 1px, wide-glow hover — the CloudSAFE signature. ------------------------- */
.btn {
  display: inline-block;
  border-radius: 0;
  border: 1px solid transparent;
  padding: 0.7rem 1.3rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.btn-secondary {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.btn:hover,
.btn:focus-visible {
  box-shadow: 0 0 10rem var(--blue-bright);
}

.btn-arrow {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

.btn-arrow::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--blue-bright);
}

a:focus-visible,
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue-text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: var(--white);
  padding: 0.7rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* --- Header ----------------------------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark svg {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* --- Hero ------------------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 8vw, 7rem) clamp(3rem, 7vw, 6rem);
}

.hero p {
  font-size: 1.125rem;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

/* --- Proof band ------------------------------------------------------------------------------- */
.stat-bar {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.stat-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.stat-number {
  font-family: var(--font-stat);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 7rem);
  letter-spacing: -0.05em;
  line-height: 0.85;
  color: var(--white);
  display: block;
}

.stat-unit {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-text);
  display: block;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  margin-top: 0.9rem;
}

.stat-desc {
  max-width: 34ch;
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

/* --- Marquee strip ---------------------------------------------------------------------------- */
.marquee {
  background: var(--blue);
  padding-block: 0.95rem;
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  animation: marquee 40s linear infinite;
}

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

/* --- Offerings -------------------------------------------------------------------------------- */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.offer-card {
  border: 1px solid var(--rule);
  padding: 1.75rem 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.offer-card .stat-eyebrow {
  color: var(--blue-text);
}

.offer-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Endorsement ------------------------------------------------------------------------------ */
.endorsement {
  background: var(--navy);
}

.endorsement .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
}

/* --- Light sections: conversion moments ONLY (exactly two). ----------------------------------- */
.light {
  background: var(--white);
  color: var(--text-on-light);
}

.light h2 {
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--black);
  text-shadow: none;
}

.light p {
  color: #4a4a4a;
}

.light .pre-title {
  color: var(--blue);
}

.light .pre-title::after {
  background: var(--blue);
}

/* --- Form ------------------------------------------------------------------------------------- */
.lead-form {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
  margin-top: 2rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  background: var(--white);
  color: var(--text-on-light);
}

.field textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: #5a5a5a;
  max-width: 44ch;
}

/* Links inside the light sections had NO rule, so they fell back to the UA default #0000ee —
   browser-blue and default-underlined inside a carefully designed section. Caught by the axe
   pass, which reported them as unstyled anchors. */
.light a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.light a:hover {
  color: var(--black);
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.4rem;
}

/* --- Footer ----------------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 3rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  color: var(--white);
  border-bottom-color: var(--blue-bright);
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
}

/* --- Not found -------------------------------------------------------------------------------- */
.notfound {
  min-height: 60vh;
  display: grid;
  align-content: center;
}

/* --- Responsive ------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .stat-grid,
  .offer-grid {
    grid-template-columns: 1fr;
  }
  .stat-desc {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-wrap: wrap;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
}
