/* Ridgelume Labs — site styles.
   Source of truth for visuals: .ai/design/Ridgelume Labs Website.dc.html */

:root {
  --bg: #F6F8F9;
  --ink: #0B1620;
  --text: #1C2A36;
  --muted: #5B6B7A;
  --muted-2: #4A5C6B;
  --border: #DCE4E9;
  --hover: #EDF2F5;
  --surface: #FFFFFF;

  --primary: #123A5A;
  --primary-hover: #0B2A44;
  --link: #3A6E9E;
  --accent: #5FD4D6;
  --accent-hover: #7FE0E1;

  --dark: #0B1620;
  --dark-2: #132430;
  --dark-border: #223A4C;
  --dark-border-2: #2A4256;
  --on-dark: #F4F7F9;
  --on-dark-soft: #C3D2DC;
  --on-dark-muted: #9FB2C0;
  --on-dark-mono: #7F93A3;

  --font: Archivo, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --gutter: clamp(20px, 4vw, 28px);
  --split-gap: clamp(28px, 5vw, 48px);
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  padding-top: var(--header-h); /* room for the fixed header, see "header" below */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--primary); }

h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: 10px 14px; border-radius: 4px;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 500;
}
.skip-link:focus { top: 12px; color: #fff; }

.page { display: flex; flex-direction: column; min-height: 100vh; position: relative; }
.site-main { flex: 1; position: relative; z-index: 1; }

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

/* ---------- header ---------- */

/* The design keeps the header sticky (in flow) and toggles it between a full
   and a compact state after 40px of scroll. An in-flow header that shrinks on
   scroll moves the content under it, the browser's scroll anchoring scrolls
   back up to compensate and the header jitters; a two-state header over a
   fixed reserve leaves a gap under it at small scroll offsets. So the header is
   fixed, the body reserves its full height (--header-h) and the header shrinks
   in step with the scroll: site.js sets --p (0 = full, 1 = compact) to
   scrollY / (--header-h - --header-h-min), so the header's bottom edge stays on
   the content until it is fully compact. Heights are explicit so the reserve is
   exact: row = design padding x 2 + tallest item (desktop 26+40+26 = 92px to
   12+36+12 = 60px; mobile 18+44+18 = 80px to 13+44+13 = 70px), label = 15px
   line + 10px padding, plus the 1px border. */

:root { --header-h: 118px; --header-h-min: 61px; }

.site-header {
  --p: 0;
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header__row {
  max-width: 1180px; margin: 0 auto;
  height: calc(92px - 32px * var(--p)); padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: calc(14px - 4px * var(--p));
  color: var(--ink); cursor: pointer;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: calc(40px - 16px * var(--p)); height: calc(40px - 16px * var(--p)); }
.brand__word {
  font-size: calc(26px - 9px * var(--p)); font-weight: 600;
  letter-spacing: calc(-0.03em + 0.005em * var(--p));
}
.brand__labs { margin-left: 0.34em; font-weight: 500; color: var(--muted-2); }

.nav-desktop { display: flex; align-items: center; gap: 8px; }
.nav-desktop__link {
  padding: 8px 12px; font-size: 15px; color: var(--text); border-radius: 4px;
}
.nav-desktop__link:hover { background: var(--hover); color: var(--text); }
.nav-desktop .btn { margin-left: 8px; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; margin-right: -10px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: 0; border-radius: 4px; cursor: pointer;
}
.menu-toggle:hover { background: var(--hover); }
.menu-toggle span {
  display: block; width: 20px; height: 2px; border-radius: 1px; background: var(--ink);
  transition: transform 220ms var(--ease), opacity 160ms linear;
}
.is-menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.is-menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 8px 20px 24px;
  flex-direction: column;
  height: calc(100vh - 70px);
  height: calc(100dvh - 70px);
  overflow-y: auto;
}
.nav-mobile__link {
  padding: 18px 0; border-bottom: 1px solid var(--border);
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink);
}
.nav-mobile__link:hover { color: var(--ink); }
.nav-mobile .btn { margin-top: 28px; font-size: 16px; padding: 16px 20px; text-align: center; }
.nav-mobile__foot {
  margin-top: auto; padding-top: 28px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

.site-header__label {
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  overflow: hidden; height: calc(25px * (1 - var(--p))); opacity: calc(1 - var(--p));
}
.site-header__label > div {
  padding-bottom: 10px; line-height: 15px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

@media (max-width: 819.98px) {
  :root { --header-h: 106px; --header-h-min: 71px; }
  .site-header__row { height: calc(80px - 10px * var(--p)); padding: 0 20px; }
  .brand { gap: 10px; }
  .brand__mark { width: calc(30px - 6px * var(--p)); height: calc(30px - 6px * var(--p)); }
  .brand__word { font-size: calc(20px - 3px * var(--p)); }
  .is-menu-open .site-header__row { height: 70px; }
  .is-menu-open .brand__mark { width: 24px; height: 24px; }
  .is-menu-open .brand__word { font-size: 17px; }
  .nav-desktop { display: none; }
  .menu-toggle { display: flex; }
  .is-menu-open .nav-mobile { display: flex; }
  .site-header__label { padding: 0 20px; }
}

/* ---------- buttons & links ---------- */

.btn {
  display: inline-block;
  font-size: 15px; font-weight: 500;
  padding: 14px 24px; border-radius: 4px;
  cursor: pointer; text-align: center;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--accent { background: var(--accent); color: var(--ink); font-weight: 600; }
.btn--accent:hover { background: var(--accent-hover); color: var(--ink); }
.btn--ghost-dark { border: 1px solid var(--dark-border-2); color: var(--on-dark); }
.btn--ghost-dark:hover { background: var(--dark-2); color: var(--on-dark); }
.btn--outline { border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: 13px 22px; }
.btn--outline:hover { background: var(--hover); color: var(--ink); }
.btn--sm { font-size: 14px; padding: 10px 18px; }
.btn--md { padding: 13px 22px; }

.text-link { font-size: 15px; font-weight: 500; color: var(--link); }
.text-link:hover { color: var(--primary); }

/* ---------- sections & layout ---------- */

.section { padding-block: clamp(56px, 10vw, 96px); }
.section--xl { padding-block: clamp(64px, 11vw, 110px); }
.section--md { padding-block: clamp(52px, 9vw, 88px); }
.section--sm { padding-block: clamp(48px, 8vw, 80px); }
.section--notfound { padding-block: clamp(80px, 14vw, 140px); }
.section--contact-block { padding-top: clamp(40px, 6vw, 60px); padding-bottom: clamp(52px, 9vw, 88px); }

.rule { border-top: 1px solid var(--border); }

.section--dark { background: var(--dark); position: relative; z-index: 1; }

.stack { display: flex; flex-direction: column; }
.stack--8 { gap: 8px; }
.stack--14 { gap: 14px; }
.stack--18 { gap: 18px; }
.stack--20 { gap: 20px; }
.stack--22 { gap: 22px; }
.stack--24 { gap: 24px; }
.stack--26 { gap: 26px; }
.stack--28 { gap: 28px; }
.stack--44 { gap: 44px; }
.stack--48 { gap: 48px; }
.stack--start { align-items: flex-start; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--split-gap);
  align-items: start;
}
.split--290 { grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); }
.split > * { min-width: 0; }
/* side-by-side panels: shared top edge, equal height, card-grid spacing */
.split--cards { gap: 24px; align-items: stretch; }

.measure-560 { max-width: 560px; }
.measure-620 { max-width: 620px; }
.measure-720 { max-width: 720px; }
.measure-760 { max-width: 760px; }
.measure-820 { max-width: 820px; }
.measure-900 { max-width: 900px; }

/* ---------- typography ---------- */

.h-hero {
  font-size: clamp(34px, 5.2vw, 62px); line-height: 1.08; font-weight: 600; letter-spacing: -0.035em;
  color: #fff; text-wrap: pretty;
}
.h-page { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.1; font-weight: 600; letter-spacing: -0.035em; }
.h-sub { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25; font-weight: 500; letter-spacing: -0.025em; text-wrap: pretty; }
.h-section { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; text-wrap: pretty; }
.h-section--intro { font-size: clamp(26px, 3vw, 34px); line-height: 1.22; }
.h-topic { font-size: clamp(24px, 2.8vw, 34px); line-height: 1.18; font-weight: 600; letter-spacing: -0.03em; text-wrap: pretty; }
.h-brand { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.03em; }
.h-cta { font-size: clamp(30px, 4vw, 48px); line-height: 1.1; font-weight: 600; letter-spacing: -0.035em; color: #fff; }

.h-card { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.h-card--20 { font-size: 20px; }
.h-card--19 { font-size: 19px; }
.h-card--18 { font-size: 18px; letter-spacing: -0.015em; }
.h-card--26 { font-size: 26px; letter-spacing: -0.025em; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.eyebrow--tight { letter-spacing: 0.1em; }
.eyebrow--on-dark { color: var(--on-dark-mono); }
.descriptor {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary);
}

.prose { display: flex; flex-direction: column; gap: 18px; font-size: 17px; line-height: 1.65; color: var(--text); text-wrap: pretty; }
.prose--16 { font-size: 16px; }
.prose--14 { gap: 14px; }
.prose--12 { gap: 12px; }
.prose--10 { gap: 10px; }
.prose .statement { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }

.body-16 { font-size: 16px; line-height: 1.65; color: var(--text); text-wrap: pretty; }
.body-16--tight { line-height: 1.6; }
.body-17 { font-size: 17px; line-height: 1.65; color: var(--text); text-wrap: pretty; }
.body-17--tight { line-height: 1.6; }

.on-dark .h-topic, .on-dark .h-section { color: #fff; }
.on-dark .body-17, .on-dark .body-16, .on-dark .prose { color: var(--on-dark-soft); }

/* ---------- hero ---------- */

.hero { background: var(--dark); position: relative; overflow: hidden; }
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__inner {
  position: relative; z-index: 1;
  padding-top: clamp(64px, 11vw, 110px);
  padding-bottom: clamp(72px, 12vw, 120px);
  display: flex; flex-direction: column; gap: 34px;
}
.hero__lead { max-width: 620px; font-size: 19px; line-height: 1.6; color: var(--on-dark-soft); text-wrap: pretty; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 6px; }

/* ---------- cards & grids ---------- */

/* Fixed column counts (1 / 2 / 4) so the shared grey gap-background never shows as an empty cell. */
.cells {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.cell {
  background: var(--surface);
  padding: clamp(24px, 5vw, 34px);
  display: flex; flex-direction: column; gap: 16px;
}
.cell__more { margin-top: auto; padding-top: 10px; }
@media (min-width: 640px) { .cells { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .cells { grid-template-columns: repeat(4, 1fr); } }

.product-grid {
  display: grid;
  /* auto-fill keeps empty tracks, so a lone card stays one column wide instead of stretching */
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 30px; display: flex; flex-direction: column; gap: 14px;
}
a.product-card { color: var(--text); transition: border-color .2s ease; }
a.product-card:hover { color: var(--text); border-color: var(--link); }
.product-card__bar { height: 2px; width: 40px; background: var(--accent); }
.product-card__more { margin-top: auto; padding-top: 10px; font-size: 15px; font-weight: 500; color: var(--link); }
a.product-card:hover .product-card__more { color: var(--primary); }
.product-logo img { display: block; width: auto; height: 56px; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }
.pillar { border-top: 2px solid var(--primary); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }

.steps { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .steps { grid-template-columns: repeat(4, 1fr); } }
/* number, title, body share rows across a line of steps, so a two-line title doesn't push its body below the others */
.step { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 14px; }

.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 36px; }
.value { display: flex; flex-direction: column; gap: 12px; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 30px; display: flex; flex-direction: column; gap: 14px;
}
.panel--26 { padding: 26px; gap: 8px; }
.panel--fluid { padding: clamp(24px, 5vw, 34px); gap: 18px; }
.panel--wide {
  padding: clamp(24px, 5vw, 40px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 40px;
}
.panel--wide > * { min-width: 0; }

.plain-list { display: flex; flex-direction: column; gap: 11px; font-size: 16px; color: var(--text); }

.bullets { display: flex; flex-direction: column; gap: 12px; font-size: 16px; color: var(--text); }
.bullets--10 { gap: 10px; padding: 4px 0; }
.bullets li { display: flex; align-items: baseline; gap: 12px; }
.bullets li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none;
}

.dark-list { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.5; color: var(--on-dark); }
.dark-list li { border-top: 1px solid var(--dark-border); padding-top: 12px; }

.brand-row { display: flex; align-items: center; gap: 12px; }

.contact-details { gap: 22px; }
.contact-value { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.contact-value:hover { color: var(--primary); }
address { font-style: normal; }

.address { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--muted); }

/* ---------- footer ---------- */

.site-footer { background: var(--dark); }
.site-footer__grid {
  position: relative; z-index: 1;
  padding-top: clamp(48px, 7vw, 64px); padding-bottom: 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 16px; }
.site-footer__brand-row { display: flex; align-items: center; gap: 11px; }
.site-footer__name { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.site-footer__tagline { max-width: 300px; font-size: 15px; line-height: 1.6; color: var(--on-dark-muted); text-wrap: pretty; }
.site-footer__links { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.site-footer__links a { color: var(--on-dark); width: fit-content; }
.site-footer__links--muted a { color: var(--on-dark-muted); }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__bottom { position: relative; z-index: 1; padding-bottom: 48px; }
.site-footer__copy {
  border-top: 1px solid var(--dark-border); padding-top: 24px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--on-dark-mono);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
