/*
 * The site's own rules. Everything that could come from brand-core does —
 * this file holds only layout and marketing-page typography, which the design
 * system has no opinion about. No colour literal appears here: every value is
 * a brand-core token (var(--*)).
 *
 * Contrast: --text-mute and --blue-as-text fall under WCAG AA (4.5:1) on
 * several light-theme surfaces, so readable text here uses --text-dim and
 * links use --blue-bright, which clear 5:1 on every background in both themes.
 *
 * Load order (see src/layouts/Base.astro): reset, tokens, fonts, primitives,
 * then this, so these rules win a specificity tie.
 */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}

main {
  flex: 1;
}

a {
  color: var(--blue-bright);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--text);
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--on-accent);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-accent);
}

/* ─────────────────────────── Shared type ─────────────────────────── */

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: -0.4px;
  text-wrap: balance;
}

h1 {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  margin-bottom: 18px;
}

h2 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
  max-width: 24ch;
}

h3 {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 8px;
}

p {
  color: var(--text-dim);
  text-wrap: pretty;
}

strong {
  color: var(--text);
  font-weight: 600;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--blue-bright);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-dim);
}

.meta {
  font-size: 15px;
  color: var(--text-dim);
}

/* brand-core's card label is --text-mute, which is under 4.5:1 on cards in
   light mode; on this site the labels carry content, so lift them. */
.ds-card__label {
  color: var(--text-dim);
}

.text-link {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* brand-core's ghost button is a compact toolbar size; on a marketing page
   it sits next to a primary, so match the primary's footprint. */
.btn-lg {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 14px;
}

/* A primary that fits a header row. */
.btn-compact {
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 13px;
}

a.ds-btn {
  text-decoration: none;
}

a.ds-btn--primary,
a.ds-btn--primary:hover {
  color: var(--on-accent);
}

a.ds-btn--ghost:hover {
  color: var(--text);
}

/* ─────────────────────────── Header ─────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.site-wordmark {
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.site-wordmark:hover {
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.site-header__inner > .ds-btn {
  white-space: nowrap;
}

/* ─────────────────────────── Sections ─────────────────────────── */

.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--bg-0);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__intro {
  max-width: 62ch;
  margin-bottom: 36px;
  font-size: 18px;
}

.section__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.section__cta-note {
  font-size: 17px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ─────────────────────────── Hero ─────────────────────────── */

.hero {
  padding: 80px 0 88px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero__copy .lede {
  max-width: 48ch;
  margin-bottom: 28px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.shot__frame {
  overflow: hidden;
  box-shadow: 0 24px 48px var(--shadow);
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot__caption {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 15px;
  text-align: center;
}

/* ─────────────────────────── Product ─────────────────────────── */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: 28px;
  padding: 36px;
}

.product h3 {
  font-size: 26px;
  margin-bottom: 10px;
}

.product__copy > p {
  font-size: 17px;
  margin-bottom: 18px;
}

.product__copy .product__evidence {
  margin-bottom: 24px;
  padding-left: 16px;
  border-left: 3px solid var(--blue);
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
}

.product__built {
  padding-left: 32px;
  border-left: 1px solid var(--line-strong);
}

.product__built ul {
  margin: 14px 0 20px;
  padding-left: 20px;
  color: var(--text-dim);
}

.product__built li {
  margin-bottom: 12px;
}

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

/* ─────────────────────────── Services ─────────────────────────── */

/* Each card spans three shared rows (title, description, examples), so the
   Examples blocks start at the same height across the row of cards. */
.services .service {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 12px;
  padding: 26px;
}

.service h3 {
  margin-bottom: 0;
}

.service__examples {
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}

.service__examples .ds-card__label {
  margin-bottom: 4px;
}

.service__examples p:last-child {
  color: var(--text);
  font-size: 15px;
}

/* ─────────────────────────── Approach ─────────────────────────── */

.steps {
  margin-top: 28px;
  list-style: none;
}

.step {
  padding: 24px;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: var(--radius-pill);
  background: var(--blue-soft);
  color: var(--blue-bright);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step p {
  font-size: 15px;
}

/* ─────────────────────────── About ─────────────────────────── */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.about__copy p {
  max-width: 60ch;
  margin-bottom: 14px;
  font-size: 17px;
}

.principles {
  display: grid;
  gap: 4px;
  list-style: none;
}

.principles li {
  padding: 18px 0 18px 20px;
  border-left: 2px solid var(--blue);
}

.principles h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.principles p {
  font-size: 15px;
}

/* ─────────────────────────── Inquiry ─────────────────────────── */

.inquiry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.inquiry__copy .lede {
  margin-bottom: 20px;
}

.inquiry__email {
  margin-bottom: 20px;
  font-size: 17px;
}

.inquiry__next {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-1);
}

.inquiry__next h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.inquiry__next p {
  font-size: 15px;
}

.inquiry__form {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.field .ds-field {
  padding: 10px 12px;
  font-size: 16px;
}

.optional {
  color: var(--text-dim);
  font-weight: 400;
}

.field__help {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

.field__error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.field__error:empty {
  display: none;
}

.inquiry__submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.inquiry__submit .ds-status {
  font-size: 15px;
  font-weight: 600;
}

.inquiry__submit .ds-status:empty {
  display: none;
}

/* ─────────────────────────── Footer ─────────────────────────── */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  font-size: 15px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.site-footer__brand .ds-wordmark {
  text-decoration: none;
}

.site-footer__brand p {
  margin-top: 10px;
  max-width: 36ch;
}

.site-footer__nav,
.site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.site-footer__nav a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer__meta {
  color: var(--text-dim);
}

.theme-toggle {
  margin-top: 8px;
  font-size: 13px;
}

/* ─────────────────────────── Prose (privacy page) ─────────────────────────── */

.prose {
  max-width: 760px;
  padding-top: 64px;
  padding-bottom: 80px;
}

.prose h2 {
  font-size: 22px;
  max-width: none;
  margin: 36px 0 10px;
}

.prose p,
.prose ul {
  margin-bottom: 14px;
}

.prose ul {
  padding-left: 22px;
  color: var(--text-dim);
}

.prose li {
  margin-bottom: 6px;
}

/* ─────────────────────────── Responsive ─────────────────────────── */

@media (max-width: 960px) {
  .hero__inner,
  .about,
  .inquiry,
  .product {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product__built {
    padding-left: 0;
    padding-top: 28px;
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }

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

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .site-header__inner > .ds-btn {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 34px;
    letter-spacing: -0.8px;
  }

  h2 {
    font-size: 27px;
  }

  .lede {
    font-size: 17px;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .section {
    padding: 60px 0;
  }

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

  .product,
  .inquiry__form {
    padding: 22px;
  }

  .site-header__inner {
    gap: 12px;
  }

  .site-wordmark {
    font-size: 16px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
