/* ============================================================================
   chassia.com — marketing / legal site
   Self-contained. No external fonts, no CDN, no trackers, no network calls.
   Design language: "the chassis for the modern web" — structural hairlines,
   modular frames, a single restrained signal accent, mono technical labels.
   ============================================================================ */

/* ---- Design tokens -------------------------------------------------------- */
:root {
  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Light theme (default) */
  --paper: #fbfbf9;
  --paper-2: #f3f3ef;
  --surface: #ffffff;
  --ink: #14151a;
  --ink-soft: #33363f;
  --muted: #5b606b;
  --line: rgba(20, 21, 26, 0.12);
  --line-strong: rgba(20, 21, 26, 0.22);
  --accent: #4338ca;
  --accent-ink: #ffffff;
  --accent-2: #0d9488;
  --shadow: 0 1px 2px rgba(20, 21, 26, 0.04), 0 12px 32px rgba(20, 21, 26, 0.06);

  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 10px;
}

:root[data-theme="dark"] {
  --paper: #0a0b0e;
  --paper-2: #101217;
  --surface: #14161c;
  --ink: #f2f3f5;
  --ink-soft: #d3d6dd;
  --muted: #9aa0ab;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #a5b4fc;
  --accent-ink: #10131b;
  --accent-2: #2dd4bf;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 44px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a0b0e;
    --paper-2: #101217;
    --surface: #14161c;
    --ink: #f2f3f5;
    --ink-soft: #d3d6dd;
    --muted: #9aa0ab;
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #a5b4fc;
    --accent-ink: #10131b;
    --accent-2: #2dd4bf;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 44px rgba(0, 0, 0, 0.5);
  }
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 640;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ---- Layout --------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: clamp(56px, 9vw, 104px);
  border-top: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.lead {
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 20px);
  max-width: 62ch;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

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

/* ---- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-size: 18px;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand__tld {
  color: var(--muted);
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav a {
  color: var(--ink-soft);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
}

.header-nav a:hover {
  color: var(--ink);
  background: var(--paper-2);
  text-decoration: none;
}

@media (max-width: 620px) {
  .header-nav a.hide-sm {
    display: none;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(64px, 11vw, 132px);
  overflow: hidden;
}

/* structural dotted grid backdrop — pure CSS, no assets */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    var(--line-strong) 1px,
    transparent 1px
  );
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(
    ellipse 80% 62% at 50% 34%,
    #000 0%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 80% 62% at 50% 34%,
    #000 0%,
    transparent 78%
  );
  opacity: 0.7;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.hero h1 {
  font-size: clamp(38px, 6.4vw, 64px);
  letter-spacing: -0.035em;
  font-weight: 660;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero__sub {
  margin-top: 22px;
  font-size: clamp(17px, 2.3vw, 20px);
  color: var(--muted);
  max-width: 52ch;
}

.hero__cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 560;
  font-size: 15.5px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ---- Hero schematic (inline product visual, no stock photo) --------------- */
.schematic {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box;
  box-shadow: var(--shadow);
  padding: 22px;
  overflow: hidden;
}

.schematic__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.schematic svg {
  width: 100%;
  height: auto;
  display: block;
}

/* corner ticks — chassis frame motif */
.ticked {
  position: relative;
}

.ticked::before,
.ticked::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--accent);
  pointer-events: none;
}

.ticked::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.ticked::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

/* ---- Section headings ----------------------------------------------------- */
.section h2 {
  font-size: clamp(26px, 3.6vw, 36px);
}

.section__intro {
  max-width: 60ch;
  margin-top: 16px;
  color: var(--muted);
}

/* ---- Bento: what it does -------------------------------------------------- */
.bento {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  .bento {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.card__icon svg {
  width: 20px;
  height: 20px;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 15.5px;
}

/* ---- Operator panel ------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

@media (max-width: 780px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.factsheet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.factsheet__row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.factsheet__row:last-child {
  border-bottom: 0;
}

.factsheet__k {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.factsheet__v {
  color: var(--ink-soft);
}

/* ---- Email & communications panel (the SES-review section) ---------------- */
.mailpanel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 5%, var(--surface)),
      var(--surface)
    );
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.mailpanel__body {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--ink-soft);
  max-width: 74ch;
  line-height: 1.7;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 13px;
  background: var(--paper);
}

.chip b {
  color: var(--accent);
  font-weight: 600;
}

/* ---- Contact -------------------------------------------------------------- */
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact-card__mail {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---- Legal (privacy / terms) --------------------------------------------- */
.legal {
  padding-block: clamp(48px, 7vw, 84px);
}

.legal__head {
  max-width: 72ch;
  margin-bottom: 12px;
}

.legal__meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 14px;
}

.legal__body {
  max-width: 74ch;
  margin-top: 44px;
}

.legal__body h2 {
  font-size: 21px;
  margin-top: 44px;
  margin-bottom: 12px;
  scroll-margin-top: 84px;
}

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

.legal__body h3 {
  font-size: 16.5px;
  margin-top: 26px;
  margin-bottom: 8px;
}

.legal__body p,
.legal__body li {
  color: var(--ink-soft);
  font-size: 16px;
}

.legal__body p + p {
  margin-top: 14px;
}

.legal__body ul {
  margin: 12px 0;
  padding-left: 22px;
}

.legal__body li {
  margin-top: 8px;
}

.legal__body li::marker {
  color: var(--accent);
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px 24px;
  margin-top: 32px;
}

.toc__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
}

@media (max-width: 620px) {
  .toc ol {
    columns: 1;
  }
}

.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

/* ---- Footer --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding-block: 48px;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer p {
  color: var(--muted);
  font-size: 14px;
  max-width: 46ch;
  margin-top: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 14.5px;
}

.footer-links a {
  color: var(--ink-soft);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-legal {
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
}

/* ---- Utility -------------------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
}

.nowrap {
  white-space: nowrap;
}
