/*
  SAVA P — main stylesheet.
  Order: imports -> reset -> typography -> layout -> components -> responsive.
  Each component lives in one clearly-named block so it can be found and
  edited without reading the whole file. Measured values (widths, sizes)
  come from the production site; see tokens.css.
*/

@import url("tokens.css");
@import url("../assets/fonts/fonts.css");

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-black);
  color: var(--text-on-dark);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-tight);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* ---------- Typography ----------
   The site has a small, strict set of text styles. Use these classes
   rather than inventing new sizes. */

h1,
.t-display {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-tight);
  /* The original balances these three into even lines; everything else
     wraps normally. Don't apply it site-wide. */
  text-wrap: balance;
}

.t-section {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-tight);
}

/* Inner pages run a smaller section heading than the home page. */
.t-section--compact {
  font-size: var(--fs-h2-compact);
}

/* 22px statement text: hero subtitle, section ledes */
h2,
.t-lede {
  font-size: var(--fs-lede);
  font-weight: 400;
  line-height: var(--lh-lede);
  letter-spacing: var(--ls-lede);
}

/* 26px heavy blue label: feature column headings, image caption */
.t-accent {
  font-size: var(--fs-accent);
  font-weight: 900;
  line-height: var(--lh-accent);
  letter-spacing: var(--ls-tight);
  color: var(--color-blue);
}

.t-eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  line-height: var(--lh-lede);
  letter-spacing: var(--ls-lede);
  color: var(--text-on-dark-muted);
}

.t-note {
  font-style: italic;
  color: var(--color-blue);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container-content) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--wide {
  max-width: calc(var(--container-wide) + var(--container-pad) * 2);
}

.container--full {
  max-width: none;
  padding-inline: var(--nav-pad);
}

.section {
  position: relative;
  padding-block: var(--space-3xl);
}

.section--tight {
  padding-block: var(--space-2xl);
}

/* Per-section padding, matched to the original's rhythm. The original
   does not use one uniform section padding — these are its actual
   measured values, scaled down on narrow screens. */
.section--intro {
  padding-top: var(--pad-intro-top);
  padding-bottom: var(--pad-intro-bottom);
}

.section--testimonial {
  padding-top: var(--pad-testimonial-top);
  padding-bottom: var(--pad-testimonial-bottom);
}

.section--features {
  padding-top: var(--pad-features-top);
  padding-bottom: var(--pad-features-bottom);
}

.section--form {
  padding-top: var(--pad-form-top);
  padding-bottom: 0;
}

.section--security {
  padding-top: var(--pad-security-top);
  padding-bottom: var(--pad-security-bottom);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Section backgrounds ----------
   The page reads as one continuous fade; these hand off to each other in
   document order. */
.panel--navy {
  background: var(--color-navy);
}

.panel--black {
  background: var(--color-black);
}

.panel--navy-to-black {
  background: var(--gradient-navy-to-black);
}

.panel--black-to-deep {
  background: var(--gradient-black-to-deep);
}

.panel--deep-to-navy {
  background: var(--gradient-deep-to-navy);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: var(--ls-link);
  cursor: pointer;
  white-space: nowrap;
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  padding: 0.85em 1.45em;
  background: var(--gradient-cta);
  color: var(--color-white);
}

.btn--dark {
  padding: 0.95em 1.9em;
  background: var(--color-black);
  color: var(--color-white);
}

.btn--dark:hover {
  filter: brightness(2);
}

/* ---------- Site nav ----------
   The bar itself is transparent — the hero and page content run under it.
   Once the page is scrolled, a soft dark scrim fades in behind the links
   so they stay readable over whatever is passing beneath. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-nav-scrim);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.site-header.is-scrolled::after {
  opacity: 1;
}

.site-nav {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--nav-gap-cta);
}

/* The original sits the logo 10px from the viewport edge, inside a
   100x40 contain box, so it hangs slightly left of the nav padding. */
.site-nav__logo {
  margin-right: auto;
  margin-left: var(--nav-logo-offset);
  width: var(--nav-logo-width);
  height: var(--nav-logo-height);
  display: flex;
  align-items: center;
}

.site-nav__logo img {
  width: 100%;
  height: auto;
}

/* On the home page the wordmark belongs to the hero, so the nav copy of
   it stays hidden until you scroll past. */
.site-header--home .site-nav__logo {
  opacity: 0;
  transform: translateY(-50px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.site-header--home.is-scrolled .site-nav__logo {
  opacity: 1;
  transform: none;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

.site-nav__links a {
  font-size: var(--fs-nav);
  font-weight: 500;
  line-height: 30px;
  letter-spacing: var(--ls-link);
  color: var(--color-white);
  transition: opacity var(--transition-fast);
}

.site-nav__links a:hover {
  opacity: 0.75;
}

.site-nav__links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  position: relative;
}

.nav-toggle__bar::before {
  position: absolute;
  top: -7px;
}

.nav-toggle__bar::after {
  position: absolute;
  top: 7px;
}

/* ---------- Hero ----------
   Base is the blue->navy gradient. Any media (video or photo) sits on
   top of it, absolutely positioned. There is no dark scrim at the
   bottom — the section below simply picks up the fade. */
.hero {
  position: relative;
  min-height: var(--hero-height);
  padding-bottom: var(--space-2xl);
  overflow: hidden;
  background: var(--gradient-hero);
  color: var(--color-white);
}

/* Home only: fixed-height hero, no trailing padding. */
.hero--fixed {
  height: var(--hero-height);
  min-height: 0;
  padding-bottom: 0;
}

/* Home only: the video is laid over the gradient at partial opacity,
   which is what gives the hero its soft, blue-washed look rather than
   raw footage. The contact page's photo runs at full opacity. */
.hero--washed .hero__media {
  opacity: var(--hero-video-opacity);
}

/* Pages with no media (Technology, Terms, Privacy): the gradient runs
   all the way to black so it meets the black section below. */
.hero--plain {
  min-height: var(--hero-height-plain);
  background: var(--gradient-hero-plain);
}

/* Inner pages run a slightly smaller lockup than the home hero. */
.hero--plain .hero__content {
  padding-top: var(--hero-content-top-compact);
}

.hero--plain .hero__logo {
  width: var(--hero-logo-width-compact);
  height: var(--hero-logo-height-compact);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media video,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: var(--hero-content-top);
}

.hero__logo {
  width: var(--hero-logo-width);
  height: var(--hero-logo-height);
  margin-bottom: var(--hero-stack-gap);
  display: flex;
  align-items: center;
}

.hero__logo img {
  width: 100%;
  height: auto;
}

.hero h1 {
  margin-bottom: var(--hero-stack-gap);
}

.hero .t-lede {
  text-wrap: balance;
}

.hero__lede {
  margin-top: var(--hero-stack-gap);
  max-width: 62ch;
}

/* ---------- Intro: copy + product shot ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--intro-gap);
  align-items: start;
  margin-top: 36px;
}

.intro__copy p + p {
  margin-top: var(--intro-para-gap);
}

.intro__media img {
  width: 100%;
  height: var(--intro-media-height);
  object-fit: contain;
  object-position: center;
}

/* ---------- Testimonial ---------- */
.testimonial {
  max-width: calc(var(--testimonial-width) + var(--container-pad) * 2);
  margin-inline: auto;
  text-align: center;
}

.testimonial blockquote {
  margin: 0;
  text-wrap: balance;
  font-size: var(--fs-quote);
  font-weight: 300;
  font-style: italic;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-tight);
}

.testimonial cite {
  display: block;
  margin-top: 20px;
  font-style: normal;
  font-size: var(--fs-nav);
  font-weight: 500;
  letter-spacing: var(--ls-link);
}

.testimonial__logo {
  width: 38px;
  height: 38px;
  margin: 20px auto 0;
  object-fit: contain;
}

/* ---------- Features ---------- */
.section__lede {
  margin-top: var(--section-lede-gap);
}

/* Two layered product shots: the wide dashboard sits behind, the sharp
   table card sits on top of it, and the blue caption overlaps the base. */
.feature-stage {
  position: relative;
  margin-top: var(--feature-stage-top);
}

.feature-stage__base {
  width: 100%;
  max-width: var(--feature-base-width);
  height: var(--feature-base-height);
  object-fit: contain;
  margin-inline: auto;
}

.feature-stage__overlay {
  position: absolute;
  top: var(--feature-overlay-top);
  left: 0;
  right: 0;
  width: min(var(--feature-overlay-width), 74%);
  height: auto;
  margin-inline: auto;
}

.feature-stage__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  text-align: center;
}

.feature-cols {
  margin-top: 64px;
  display: grid;
  grid-template-columns: var(--feature-cols);
  gap: var(--feature-cols-gap);
}

/* Hairline rule above each column, as on the original. */
.feature-cols__item {
  border-top: var(--rule-width) solid var(--color-rule);
  padding-top: var(--rule-gap);
}

.feature-cols__item h3 {
  margin-bottom: var(--space-xs);
}

/* ---------- Waitlist / contact form ---------- */
.promo-video {
  width: min(var(--promo-video-width), 100%);
  margin-inline: auto;
  aspect-ratio: var(--promo-video-aspect);
}

.promo-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-eyebrow {
  margin-top: var(--pad-promo-eyebrow);
  text-align: center;
}

.form-card {
  margin-top: var(--space-md);
  padding: var(--form-card-pad);
  border-radius: var(--radius-card);
  background: var(--gradient-cta);
  color: var(--color-white);
}

.form-card__grid {
  display: grid;
  grid-template-columns: var(--form-card-cols);
  gap: var(--form-card-gap);
  align-items: start;
}

.form-card__title {
  font-size: var(--fs-card-title);
  font-weight: 800;
  line-height: var(--lh-accent);
  letter-spacing: var(--ls-tight);
}

.form-card__title + p {
  margin-top: var(--space-md);
}

.field {
  display: block;
  margin-bottom: var(--field-gap);
}

.field label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--ls-link);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  background: var(--color-input-bg);
  color: var(--text-on-light);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-tight);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-link);
  background: var(--color-white);
}

.form-status {
  margin-top: var(--space-sm);
  font-size: var(--fs-small);
}

.form-status[data-state="success"] {
  color: var(--color-success);
}

.form-status[data-state="error"] {
  color: var(--color-error);
}

/* Contact page: same fields, directly on the hero image. */
.contact-form {
  max-width: 640px;
  margin-top: var(--space-lg);
}

.contact-form .field input,
.contact-form .field textarea {
  background: var(--color-input-bg-strong);
}

/* ---------- Security checklist ---------- */
.check-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--check-grid-gap);
}

.check-item {
  display: flex;
  gap: var(--check-icon-gap);
}

.check-item__icon {
  flex: none;
  width: var(--check-icon-size);
  height: var(--check-icon-size);
  color: var(--color-blue-bright);
}

.check-item h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: var(--lh-lede);
  letter-spacing: normal;
}

.check-item p {
  line-height: var(--lh-lede);
  letter-spacing: normal;
}

/* ---------- Info cards (Technology page) ---------- */
.card-grid {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.info-card {
  padding: var(--card-pad);
  border-radius: var(--radius-panel);
  background: var(--color-navy-card);
}

.info-card h3 {
  margin-bottom: var(--space-md);
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--color-blue-bright);
}

.info-card ul,
.aws-cols ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.info-card li {
  position: relative;
  padding-left: 1.6em;
  font-size: var(--fs-nav);
  letter-spacing: var(--ls-link);
}

.info-card li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-blue-bright);
  font-weight: 700;
}

.aws-cols {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.aws-cols h3 {
  margin-bottom: var(--space-md);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--color-blue-bright);
}

.aws-cols li {
  position: relative;
  padding-left: 20px;
  font-size: var(--fs-nav);
  letter-spacing: var(--ls-link);
  color: var(--text-on-dark-muted);
}

.aws-cols li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--color-blue-bright);
}

.aws-cols li strong,
.info-card li strong {
  color: var(--color-white);
}

.delivers-list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.delivers-list li {
  position: relative;
  padding-left: 1.6em;
}

.delivers-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.trust-panel {
  background: var(--gradient-cta);
  color: var(--color-white);
}

.trust-grid {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* ---------- Legal pages ---------- */
.prose h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: var(--fs-prose-h2);
  font-weight: 700;
  line-height: var(--lh-lede);
  letter-spacing: var(--ls-lede);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: var(--space-sm);
}

.prose ul {
  margin: 0 0 var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.prose li {
  position: relative;
  padding-left: 20px;
}

.prose li::before {
  content: "\2022";
  position: absolute;
  left: 6px;
  color: var(--text-on-dark);
}

.prose ul ul {
  margin-top: var(--space-2xs);
  padding-left: var(--space-md);
}

.prose .meta {
  color: var(--text-on-dark-muted);
  font-size: var(--fs-small);
}

/* ---------- Insights ----------
   /insights/: masthead with a subscribe box, a role picker that reorders the
   articles (js/insights.js), a data room request for capital raise / M&A
   readers, then the article cards. */
.subscribe {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-panel);
  background: var(--gradient-cta);
}

.subscribe__title {
  font-size: var(--fs-prose-h2);
  font-weight: 700;
  line-height: var(--lh-lede);
  letter-spacing: var(--ls-lede);
}

.subscribe__title + p {
  margin-top: var(--space-2xs);
  margin-bottom: var(--space-md);
}

.subscribe__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: var(--space-xs);
  align-items: end;
}

.subscribe__row .field {
  margin-bottom: 0;
}

.consent {
  display: flex;
  gap: var(--space-2xs);
  align-items: flex-start;
  margin-top: var(--space-sm);
  font-size: var(--fs-small);
  cursor: pointer;
}

.consent input {
  margin-top: 0.2em;
  accent-color: var(--color-navy);
}

.consent a {
  text-decoration: underline;
}

.dataroom .consent {
  margin-bottom: var(--field-gap);
}

/* Role picker */
.role-picker__eyebrow {
  font-size: var(--fs-nav);
  color: var(--color-blue-bright);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow-wide);
}

.role-picker__intro {
  margin-top: var(--space-2xs);
  color: var(--text-on-dark-muted);
}

.role-picker__options {
  margin-top: var(--space-md);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--role-card-min), 1fr));
  gap: var(--space-xs);
}

.role-option {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-sm);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-panel);
  background: var(--color-navy-card);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.role-option strong {
  font-size: var(--fs-body);
}

.role-option span {
  color: var(--text-on-dark-muted);
  font-size: var(--fs-small);
}

.role-option:hover,
.role-option[aria-pressed="true"] {
  border-color: var(--color-blue-bright);
}

.role-option[aria-pressed="true"] {
  background: var(--color-blue);
}

.role-option[aria-pressed="true"] span {
  color: var(--text-on-dark);
}

/* Once a role is picked the cards shrink to a row of pills. */
.role-picker.is-picked .role-picker__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-top: var(--space-sm);
}

.role-picker.is-picked .role-option {
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
}

.role-picker.is-picked .role-option span {
  display: none;
}

.role-picker__all {
  margin-top: var(--space-sm);
  padding: 0;
  border: none;
  background: none;
  color: var(--text-on-dark-muted);
  font-size: var(--fs-small);
  text-decoration: underline;
  cursor: pointer;
}

/* Data room request */
.dataroom {
  margin-top: var(--space-xl);
  padding: var(--form-card-pad);
  border-radius: var(--radius-card);
  background: var(--gradient-cta);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--form-card-gap);
  align-items: start;
}

.dataroom[hidden] {
  display: none;
}

.dataroom .t-eyebrow {
  color: var(--text-on-dark);
}

.dataroom__title {
  margin-top: var(--space-2xs);
  margin-bottom: var(--space-md);
  font-size: var(--fs-card-title);
  font-weight: 800;
  line-height: var(--lh-accent);
  letter-spacing: var(--ls-tight);
}

/* Articles */
.post-group {
  margin-top: var(--space-xl);
}

.post-group[hidden] {
  display: none;
}

.post-group__sub {
  margin-top: var(--space-2xs);
  color: var(--text-on-dark-muted);
}

.post-grid {
  margin-top: var(--space-md);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--post-card-min), 1fr));
  gap: var(--space-sm);
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--card-pad);
  border-top: var(--rule-width) solid var(--color-rule);
  background: var(--color-navy-card);
  border-radius: var(--radius-input);
}

.post-card h3 {
  font-size: var(--fs-prose-h2);
  font-weight: 700;
  line-height: var(--lh-lede);
  letter-spacing: var(--ls-lede);
}

.post-card p {
  color: var(--text-on-dark-muted);
}

.post-card .post-card__cat {
  color: var(--color-blue-bright);
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow-wide);
}

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-top: auto;
  padding-top: var(--space-2xs);
}

.post-card__tags span {
  padding: 0.2em 0.7em;
  border-radius: var(--radius-pill);
  background: var(--color-tag-bg);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-label);
}

.post-card__tags span.is-active {
  background: var(--color-blue);
  color: var(--text-on-dark);
}

.post-card .post-card__status {
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-link);
}

.insights-disclaimer {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-rule);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  color: var(--text-fine);
  font-size: var(--fs-label);
  line-height: var(--lh-body);
}

/* Published articles: the whole card is the link. */
.post-card {
  position: relative;
}

.post-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-card:has(.post-card__link):hover h3 {
  text-decoration: underline;
}

.post-card__img {
  width: calc(100% + var(--card-pad) * 2);
  max-width: none;
  margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) var(--space-2xs);
  aspect-ratio: var(--post-img-aspect);
  object-fit: cover;
  border-radius: var(--radius-input) var(--radius-input) 0 0;
}

/* A single article: /insights/<name>/, written by scripts/build-insights.js. */
.container--article {
  max-width: calc(var(--container-article) + var(--container-pad) * 2);
}

.article__header .post-card__cat a:hover {
  text-decoration: underline;
}

.article__header h1 {
  margin-top: var(--space-xs);
}

.article__summary {
  font-size: var(--fs-lede);
  line-height: var(--lh-lede);
  letter-spacing: var(--ls-lede);
  color: var(--text-on-dark-muted);
}

.article__byline {
  margin-top: var(--space-md);
  padding-block: var(--space-sm);
  border-block: 1px solid var(--color-rule);
  font-size: var(--fs-small);
  color: var(--text-on-dark-muted);
}

.article__cover {
  margin-top: var(--space-lg);
  width: 100%;
  height: auto;
  aspect-ratio: var(--post-img-aspect);
  object-fit: cover;
  border-radius: var(--radius-panel);
}

.article__body {
  margin-top: var(--space-lg);
  font-size: var(--fs-reading);
  line-height: var(--lh-reading);
  letter-spacing: normal;
}

.article__body > * + * {
  margin-top: var(--space-md);
}

.article__body h2 {
  margin-top: var(--space-xl);
  font-size: var(--fs-h2-compact);
  font-weight: 700;
  line-height: var(--lh-accent);
  letter-spacing: var(--ls-tight);
}

.article__body h3 {
  margin-top: var(--space-lg);
  font-size: var(--fs-prose-h2);
  font-weight: 700;
  line-height: var(--lh-lede);
  letter-spacing: var(--ls-lede);
}

.article__body ul,
.article__body ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding-left: var(--space-md);
}

.article__body ul {
  list-style: disc;
}

.article__body ol {
  list-style: decimal;
}

.article__body li::marker {
  color: var(--color-blue-bright);
}

.article__body a {
  color: var(--color-blue-bright);
  text-decoration: underline;
}

.article__body blockquote {
  margin: var(--space-lg) 0;
  padding-left: var(--space-md);
  border-left: var(--pull-quote-bar) solid var(--color-blue-bright);
  font-size: var(--fs-quote);
  font-style: italic;
}

.article__body figure {
  margin: var(--space-lg) 0;
}

.article__body figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-input);
}

.article__body hr {
  margin: var(--space-lg) 0;
  border: 0;
  border-top: 1px solid var(--color-rule);
}

.article__body code {
  padding: 0.1em 0.35em;
  border-radius: var(--radius-input);
  background: var(--color-tag-bg);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.article__body p img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-input);
}

.article__body figcaption {
  margin-top: var(--space-2xs);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-small);
  text-align: center;
}

.article__end {
  margin-top: var(--space-xl);
  padding: var(--space-md);
  border-radius: var(--radius-panel);
  background: var(--gradient-cta);
}

.article__end .subscribe__title + p {
  margin-top: var(--space-2xs);
}

.article__end-actions {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.article__back {
  font-size: var(--fs-small);
  text-decoration: underline;
}

/* ---------- Insights admin ----------
   /admin/, driven by js/admin.js. A working tool rather than a page:
   dense tables, the editor beside a live preview of the article. */
body.admin {
  background: var(--color-navy-deepest);
  letter-spacing: normal;
}

/* Views and panels are switched with the hidden attribute; some of them
   set display, which would otherwise win. */
body.admin [hidden] {
  display: none !important;
}

.admin-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-xs) var(--container-pad);
  background: var(--color-navy);
  border-bottom: 1px solid var(--color-rule);
}

.admin-bar__logo img {
  width: auto;
  height: var(--nav-logo-height);
}

.admin-bar__title {
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  gap: var(--space-md);
  font-size: var(--fs-nav);
  font-weight: 600;
}

.admin-tabs a {
  color: var(--text-on-dark-muted);
  padding-block: var(--space-2xs);
  border-bottom: var(--pull-quote-bar) solid transparent;
}

.admin-tabs a[aria-current="page"],
.admin-tabs a:hover {
  color: var(--text-on-dark);
  border-bottom-color: var(--color-blue-bright);
}

.admin-bar__user {
  margin-left: auto;
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  font-size: var(--fs-small);
  color: var(--text-on-dark-muted);
}

.admin-main {
  max-width: var(--admin-width);
  margin-inline: auto;
  padding: var(--space-md) var(--container-pad) var(--space-2xl);
}

.admin-panel {
  max-width: var(--container-content);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.admin-h1 {
  font-size: var(--fs-h2-compact);
  font-weight: 700;
  line-height: var(--lh-accent);
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.admin-actions {
  display: flex;
  gap: var(--space-2xs);
  flex-wrap: wrap;
}

.admin-help,
.admin-hint,
.admin-muted,
.admin-count {
  color: var(--text-on-dark-muted);
  font-size: var(--fs-small);
}

.admin-help {
  margin-bottom: var(--space-md);
}

.admin-hint {
  margin-top: var(--space-2xs);
}

.admin-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--color-blue-bright);
  font-size: var(--fs-small);
  text-decoration: underline;
  cursor: pointer;
}

.admin-status {
  min-height: var(--space-md);
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-small);
}

.admin-status[data-state="error"] {
  color: var(--color-error);
}

.admin-status[data-state="success"] {
  color: var(--color-success);
}

.admin-draft {
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border: 1px dashed var(--color-warning);
  border-radius: var(--radius-input);
  font-size: var(--fs-small);
}

.admin-draft a,
.admin-table a:not(.btn) {
  color: var(--color-blue-bright);
  text-decoration: underline;
}

/* Tables */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-input);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.admin-table th,
.admin-table td {
  padding: var(--space-2xs) var(--space-xs);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-rule);
}

.admin-table th {
  background: var(--color-navy);
  font-weight: 600;
  white-space: nowrap;
}

.admin-table tbody tr:nth-child(even) {
  background: var(--color-surface);
}

.admin-table .btn {
  padding: 0.5em 1.1em;
}

.admin-notes {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: var(--radius-pill);
  background: var(--color-tag-bg);
  white-space: nowrap;
}

.admin-badge[data-kind="published"] {
  background: var(--color-blue);
}

.admin-badge[data-kind="draft"] {
  background: var(--color-warning);
  color: var(--text-on-light);
}

.admin-filters {
  display: flex;
  gap: var(--space-sm);
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.admin-filters .field {
  margin-bottom: 0;
}

/* Editor */
.admin-editor {
  display: grid;
  grid-template-columns: var(--admin-editor-cols);
  gap: var(--space-lg);
  align-items: start;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.admin-checks {
  border: none;
  padding: 0;
  margin-inline: 0;
}

.admin-checks legend {
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-label);
  font-weight: 500;
}

.admin-checks .admin-check {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-small);
  font-weight: 400;
}

.admin-checks .admin-check input {
  width: auto;
  padding: 0;
  accent-color: var(--color-blue-bright);
}

.field select {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  background: var(--color-input-bg);
  color: var(--text-on-light);
  font-size: var(--fs-small);
}

.admin-image {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.admin-image img {
  width: auto;
  height: var(--check-icon-size);
  border-radius: var(--radius-input);
}

.admin-upload,
.admin-toolbar__upload {
  cursor: pointer;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-bottom: var(--space-2xs);
}

.admin-toolbar button,
.admin-toolbar .admin-toolbar__upload {
  margin: 0;
  padding: 0.35em 0.8em;
  font-weight: 400;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-input);
  background: var(--color-navy);
  color: var(--text-on-dark);
  font-size: var(--fs-small);
  cursor: pointer;
}

.admin-toolbar button:hover,
.admin-toolbar .admin-toolbar__upload:hover {
  border-color: var(--color-blue-bright);
}

.field textarea.admin-body {
  min-height: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-reading);
}

/* The article editor (Milkdown). It carries .article__body, so what's
   typed looks as it will on the site. */
.admin-rich {
  margin-top: 0;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-input);
  background: var(--color-navy-card);
  color: var(--text-on-dark);
}

.admin-rich:focus-within {
  border-color: var(--color-link);
}

.admin-rich .ProseMirror {
  min-height: var(--admin-rich-min-height);
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.admin-rich .ProseMirror > * + * {
  margin-top: var(--space-md);
}

.admin-rich .ProseMirror > h2 {
  margin-top: var(--space-xl);
}

.admin-rich .ProseMirror > h3 {
  margin-top: var(--space-lg);
}

.admin-rich .ProseMirror > :first-child {
  margin-top: 0;
}

.admin-rich .ProseMirror li > p {
  margin: 0;
}

.admin-rich .ProseMirror img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-input);
}

.admin-rich .ProseMirror-selectednode {
  outline: var(--focus-ring) solid var(--color-blue-bright);
}

.admin-preview {
  position: sticky;
  top: var(--space-sm);
  max-height: calc(100vh - var(--space-lg));
  overflow-y: auto;
  padding: var(--space-md);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-panel);
  background: var(--gradient-hero-plain);
}

.admin-preview__label {
  margin-bottom: var(--space-sm);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow-wide);
  text-transform: uppercase;
}

.admin-preview__page h1 {
  margin-block: var(--space-xs);
}

@media (max-width: 900px) {
  .admin-editor,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-preview {
    position: static;
    max-height: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-black);
  padding-block: var(--footer-pad);
}

/* Three columns: logo, link list, legal copy — measured at 168 / 158 /
   the remainder across the 1036px footer container. */
.site-footer__grid {
  display: grid;
  grid-template-columns: var(--footer-cols);
  gap: 0;
}

.site-footer__logo {
  display: block;
  width: var(--footer-logo-width);
}

.site-footer__logo img {
  width: auto;
  height: var(--footer-logo-height);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: var(--fs-nav);
  font-weight: 500;
  letter-spacing: var(--ls-link);
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__legal {
  color: var(--text-fine);
  font-size: var(--fs-fine);
  line-height: var(--lh-body);
}

.site-footer__legal p + p {
  margin-top: var(--space-sm);
}

.site-footer__legal strong {
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .intro,
  .form-card__grid,
  .dataroom,
  .card-grid,
  .trust-grid,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .feature-cols,
  .check-grid,
  .aws-cols {
    grid-template-columns: 1fr 1fr;
  }

  .subscribe__row {
    grid-template-columns: 1fr 1fr;
  }

  .feature-stage__base {
    height: auto;
  }

  .feature-stage__overlay {
    display: none;
  }

  .feature-stage__label {
    position: static;
    margin-top: var(--space-md);
  }
}

/* Nav collapses to a menu well before the other content does — the
   links plus CTA need roughly 800px of bar to sit inline. */
@media (max-width: 820px) {
  :root {
    --nav-height: 64px;
    --nav-pad: 20px;
  }

  .site-nav__links,
  .site-nav__actions .btn {
    display: none;
  }

  .nav-toggle {
    display: block;
    order: 2;
  }

  .site-nav__logo {
    order: 1;
    opacity: 1;
    transform: none;
  }

  /* Open state: the header grows into a translucent panel holding
     right-aligned links and the CTA. */
  .site-header.is-open {
    height: auto;
    background: var(--color-overlay);
  }

  .site-header.is-open::after {
    opacity: 0;
  }

  .site-header.is-open .site-nav {
    height: auto;
    flex-wrap: wrap;
    padding-bottom: var(--space-lg);
  }

  .site-header.is-open .site-nav__links {
    order: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--menu-link-gap);
    margin-top: 4px;
  }

  .site-header.is-open .site-nav__links a {
    font-size: var(--fs-menu);
    font-weight: 600;
    line-height: var(--menu-line-height);
  }

  .site-header.is-open .site-nav__actions {
    order: 4;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-md);
  }

  .site-header.is-open .site-nav__actions .btn {
    display: inline-flex;
  }

  /* Hamburger becomes an X */
  .site-header.is-open .nav-toggle__bar {
    background: transparent;
  }

  .site-header.is-open .nav-toggle__bar::before {
    top: 0;
    transform: rotate(45deg);
  }

  .site-header.is-open .nav-toggle__bar::after {
    top: 0;
    transform: rotate(-45deg);
  }
}

@media (max-width: 640px) {
  :root {
    --hero-height: 520px;
    --hero-content-top: 118px;
    --hero-logo-width: 132px;
    --hero-logo-height: 92px;
  }

  .feature-cols,
  .check-grid,
  .aws-cols {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: var(--space-lg) var(--space-md);
  }

  .subscribe__row {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: var(--space-2xl);
  }
}

/* ---------- Scroll effects ----------
   Driven by js/main.js. Elements carrying data-scroll-scale get a
   transform written on every frame while they're on screen. */
[data-scroll-scale] {
  will-change: transform;
  transform-origin: center center;
}

@media (prefers-reduced-motion: reduce) {
  [data-scroll-scale] {
    will-change: auto;
    transform: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
