/* Perigone: static site styles. No build step, no third-party requests. */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --bg: #14101a;
  --bg-alt: #1a1422;
  --surface: #1d1726;
  --surface-2: #221a2c;
  --line: #2e2438;
  --line-2: #3a2d47;
  --line-3: #4a3a59;
  --text: #f4eef3;
  --muted: #b4a8bb;
  --magenta: #ff3d8b;
  --magenta-hover: #ff6aa6;
  --violet: #9a6be0;
  --on-accent: #14101a;
  --mark-a: #ff3d8b;
  --mark-b: #9a6be0;
  --mark-c: #ffe8f1;

  --font-sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbf8fc;
    --bg-alt: #f3edf6;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --line: #e4dbea;
    --line-2: #d3c6dc;
    --line-3: #b7a5c6;
    --text: #1e1526;
    --muted: #5a4d65;
    --magenta: #c8165f;
    --magenta-hover: #a30f4c;
    --violet: #6e3fc0;
    --on-accent: #ffffff;
    --mark-c: #2a1638;
  }
}

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

html {
  color-scheme: dark light;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  padding: 0;
  list-style: none;
}

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

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

a:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 4px;
  border-radius: 6px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--magenta);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: 10px;
}

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

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* Header */

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 28px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

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

.brand-mark {
  flex: none;
}

.brand-name {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-small .brand-name {
  font-size: 20px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.nav-list a {
  color: var(--muted);
  font-size: 16px;
}

.nav-list a:hover {
  color: var(--magenta);
}

/* Hero */

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  padding: 72px 0 120px;
}

.hero-copy {
  flex: 1 1 min(480px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

h1 {
  font-size: clamp(42px, 6.2vw, 76px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.accent {
  color: var(--magenta);
}

.hero-lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 8px;
}

.hero-art {
  flex: 0 1 440px;
  min-width: 0;
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 440px;
  margin-inline: auto;
}

/* Logo mark and hero rings (colors follow the theme) */

.mk-a {
  fill: var(--mark-a);
}

.mk-b {
  fill: var(--mark-b);
}

.mk-c {
  fill: var(--mark-c);
}

.ring-outer {
  stroke: var(--line-2);
}

.ring-inner {
  stroke: var(--line);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 17px;
  line-height: 1.2;
}

.btn-primary {
  background: var(--magenta);
  color: var(--on-accent);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--magenta-hover);
  color: var(--on-accent);
}

.btn-outline {
  border-color: var(--line-3);
  color: var(--text);
  font-weight: 500;
}

.btn-outline:hover {
  border-color: var(--magenta);
  color: var(--text);
}

/* Sections */

.section {
  padding: 112px 0;
}

.section-tight {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section {
  scroll-margin-top: 16px;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}

.eyebrow {
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h2.h2-small {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

/* Cards */

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.cards-4 .card {
  flex: 1 1 min(240px, 100%);
}

.cards-2 .card {
  flex: 1 1 min(440px, 100%);
}

.card-num {
  color: var(--magenta);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.card h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.card-feature {
  gap: 16px;
  padding: 36px;
  background: var(--surface);
}

.card-feature h3 {
  font-size: 28px;
}

.card-feature p {
  font-size: 17px;
}

.icon {
  color: var(--magenta);
}

/* Principles */

.principles {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 32px;
}

.principles li {
  flex: 1 1 min(220px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}

.principles h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.principles p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Status */

.status-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 820px;
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.status-card p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.status-card .btn {
  margin-top: 4px;
}

.pill {
  padding: 7px 14px;
  background: var(--violet);
  color: var(--on-accent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 48px 0;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  color: var(--muted);
  font-size: 15px;
}

/* Components overview */

.layer-groups {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.layer-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.group-label {
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 40px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.layer-head {
  flex: 1 1 min(260px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.layer-tag {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layer h3 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.layer-text,
.layer-desc {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.layer-text {
  flex: 2 1 min(380px, 100%);
}

.layer-text strong {
  color: var(--text);
  font-weight: 500;
}

.layer-ui {
  background: var(--surface-2);
  border: 1px dashed var(--magenta);
}

.layer-ui .layer-tag {
  color: var(--magenta);
}

.layer-core {
  background: var(--surface-2);
  border-color: var(--violet);
}

.layer-core .layer-tag {
  color: var(--violet);
}

.layer-platform {
  align-items: flex-start;
  gap: 24px 40px;
}

.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.badge-outline {
  color: var(--magenta);
  border: 1px solid var(--magenta);
}

.badge-filled {
  color: var(--on-accent);
  background: var(--violet);
}

.tiles {
  flex: 2 1 min(480px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tile {
  flex: 1 1 min(200px, 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.tile-upstream {
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.tile h4 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.tile p:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Smaller screens */

@media (max-width: 640px) {
  .site-header .header-inner {
    padding: 20px 0;
  }

  .nav-list {
    gap: 6px 20px;
  }

  .hero-inner {
    gap: 40px;
    padding: 32px 0 72px;
  }

  .hero-lead {
    font-size: 18px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .section {
    padding: 72px 0;
  }

  .section-tight {
    padding: 64px 0;
  }

  .stack-lg {
    gap: 40px;
  }

  .card,
  .card-feature {
    padding: 26px;
  }

  .card-feature h3 {
    font-size: 24px;
  }

  .status-card {
    padding: 28px;
  }

  .layer {
    padding: 22px;
  }

  .layer h3 {
    font-size: 24px;
  }

  .status-card .btn {
    align-self: stretch;
  }

  .footer-inner {
    padding: 36px 0;
  }
}
