@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #2a2a2a;
  --muted: rgba(42, 42, 42, 0.64);
  --paper: #fcfcf0;
  --paper-2: rgba(42, 42, 42, 0.06);
  --line: rgba(42, 42, 42, 0.2);
  --accent: #00f1bb;
  --accent-soft: rgba(0, 241, 187, 0.2);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: "Poppins", "Avenir Next", "Helvetica Neue", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(42, 42, 42, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(42, 42, 42, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(0, 241, 187, 0.2), transparent 28rem),
    radial-gradient(circle at 84% 6%, rgba(42, 42, 42, 0.08), transparent 26rem),
    var(--paper);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-color: rgba(0, 241, 187, 0.72);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

.site-header,
.site-main,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 154px;
  height: auto;
  filter: invert(1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-link,
.eyebrow,
.meta,
.tag,
.button,
.footer-grid,
.post-count {
  font-family: "Poppins", "Avenir Next", "Helvetica Neue", sans-serif;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.nav-link {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--ink);
}

.index-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 44px;
  align-items: end;
  padding: 56px 0 38px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.05;
  font-weight: 700;
}

h1 {
  max-width: 13ch;
  margin: 14px 0 18px;
  font-size: clamp(52px, 10vw, 118px);
  letter-spacing: 0;
}

.hero-copy {
  max-width: 58ch;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.45;
}

.editorial-panel {
  padding: 24px 0 0;
  border-top: 3px solid var(--accent);
}

.editorial-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.editorial-row strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.editorial-row span {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.35;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px 0;
}

.button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(252, 252, 240, 0.42);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 13px;
  text-transform: uppercase;
}

.button[aria-pressed="true"],
.button:hover {
  border-color: var(--ink);
  background: var(--accent);
  color: var(--ink);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.post-card {
  min-height: 260px;
  padding: 26px;
  background: rgba(252, 252, 240, 0.96);
  text-decoration: none;
}

.post-card:hover {
  background: rgba(0, 241, 187, 0.08);
}

.post-card h2 {
  margin: 24px 0 14px;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
}

.post-card p {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

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

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  padding: 48px 0 70px;
}

.article-header h1 {
  max-width: 920px;
  font-size: clamp(44px, 7vw, 88px);
}

.article-dek {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

.article-body {
  max-width: 760px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.66;
}

.article-body h2 {
  margin: 56px 0 16px;
  font-size: clamp(32px, 5vw, 54px);
}

.article-body h3 {
  margin: 36px 0 12px;
  font-size: 26px;
  font-weight: 600;
}

.article-body p {
  margin: 0 0 24px;
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 32px 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.35;
}

.article-body td,
.article-body th {
  min-width: 160px;
  padding: 12px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.article-body tr:first-child td,
.article-body th {
  background: var(--paper-2);
  font-family: "Poppins", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.article-body hr {
  margin: 42px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-body em {
  color: var(--ink);
}

.article-aside {
  position: sticky;
  top: 20px;
  align-self: start;
  padding-top: 8px;
}

.aside-box {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.aside-box h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.aside-box a {
  display: block;
  margin: 10px 0;
  color: var(--muted);
}

.cta-box {
  margin: 48px 0 0;
  padding: 24px;
  border: 1px solid var(--ink);
  background: var(--accent-soft);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.cta-box p {
  margin: 0 0 18px;
}

.cta-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}

.cta-action:hover {
  background: var(--accent);
  color: var(--ink);
}

.lead-modal[hidden] {
  display: none;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
}

.lead-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 42, 42, 0.54);
  backdrop-filter: blur(4px);
}

.lead-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(86vh, 840px);
  overflow: auto;
  border: 1px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(42, 42, 42, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(42, 42, 42, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px, 44px 44px, auto;
  padding: 30px;
  box-shadow: 12px 12px 0 rgba(0, 241, 187, 0.42);
}

.lead-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lead-dialog h2 {
  margin: 8px 42px 10px 0;
  font-size: clamp(32px, 6vw, 58px);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.lead-dialog p {
  margin: 0 0 22px;
  color: var(--muted);
}

.lead-form {
  display: grid;
  gap: 16px;
}

.lead-form label,
.lead-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(252, 252, 240, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form textarea {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 10px 0 0;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.lead-form textarea {
  resize: vertical;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.lead-form fieldset {
  grid-template-columns: 1fr;
}

.lead-form legend {
  padding: 0;
  color: var(--ink);
}

.lead-choice {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.lead-choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.lead-status {
  min-height: 22px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.lead-submit {
  min-height: 48px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.lead-submit:hover,
.lead-submit:focus {
  background: var(--accent);
  color: var(--ink);
}

.lead-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 820px) {
  .site-header,
  .index-hero,
  .site-footer {
    display: block;
  }

  .site-nav {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .index-hero {
    padding-top: 38px;
  }

  .editorial-panel {
    margin-top: 34px;
  }

  .post-grid,
  .article-shell {
    display: block;
  }

  .post-card {
    display: block;
    min-height: auto;
    border-bottom: 1px solid var(--line);
  }

  .article-aside {
    position: static;
    margin-top: 42px;
  }
}

@media (max-width: 520px) {
  .site-header,
  .site-main,
  .site-footer {
    width: min(var(--max), calc(100% - 28px));
  }

  h1 {
    font-size: 48px;
  }

  .hero-copy,
  .article-dek,
  .article-body,
  .cta-box {
    font-size: 18px;
  }

  .editorial-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
