:root {
  --paper: #f5f0e7;
  --paper-deep: #e8e0d2;
  --ink: #151816;
  --muted: #5f625d;
  --green: #173f35;
  --green-2: #245e4d;
  --lime: #d8f368;
  --peach: #ffb59f;
  --blue: #9dc7ff;
  --line: rgba(21, 24, 22, .16);
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: "DM Sans", Arial, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; }
button { color: inherit; }
code, pre { font-family: var(--mono); }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  background: var(--green);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 4vw;
  background: rgba(245, 240, 231, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--lime);
  background: var(--green);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}
.site-nav { display: flex; gap: 28px; }
.site-nav a, .home-link, .footer-links a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a { position: relative; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }
.home-link { justify-self: end; }
.menu-button { display: none; }

.section-shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.section-pad { padding-top: 128px; padding-bottom: 128px; }
.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding-top: 74px;
  padding-bottom: 74px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow span {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: var(--paper);
  background: var(--green);
  border-radius: 50%;
  letter-spacing: 0;
}
.eyebrow-light { color: rgba(255,255,255,.62); }
.eyebrow-light span { color: var(--green); background: var(--lime); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.055em; }
h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(58px, 7.4vw, 108px);
  line-height: .9;
  font-weight: 600;
}
h1 em {
  color: var(--green-2);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.hero-lede {
  max-width: 610px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
}
.hero-actions { display: flex; align-items: center; gap: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.button-dark { color: #fff; background: var(--green); }
.button-dark:hover { background: var(--green-2); }
.text-link { font-size: 14px; font-weight: 600; text-underline-offset: 5px; }
.hero-stats {
  display: flex;
  max-width: 620px;
  margin: 56px 0 0;
  border-top: 1px solid var(--line);
}
.hero-stats div { flex: 1; padding: 20px 16px 0 0; }
.hero-stats div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.hero-stats dt { margin-bottom: 4px; font-family: var(--mono); font-size: 15px; font-weight: 500; }
.hero-stats dd { margin: 0; color: var(--muted); font-size: 12px; }

.hero-visual { position: relative; min-height: 590px; }
.hero-visual::before {
  content: "";
  position: absolute;
  top: 2%;
  right: 2%;
  width: 85%;
  aspect-ratio: 1;
  background: var(--peach);
  border-radius: 50%;
  opacity: .82;
}
.hero-visual::after {
  content: "";
  position: absolute;
  right: -4%;
  bottom: 5%;
  width: 37%;
  aspect-ratio: 1;
  background: var(--lime);
  border-radius: 50%;
  mix-blend-mode: multiply;
}
.code-window {
  position: absolute;
  top: 12%;
  right: 4%;
  z-index: 2;
  width: min(530px, 93%);
  overflow: hidden;
  color: #e9eee9;
  background: #111713;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(21,24,22,.25);
  transform: rotate(2deg);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 47px;
  padding: 0 17px;
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-family: var(--mono);
  font-size: 10px;
}
.window-bar span:last-child { margin-left: 8px; }
.window-dot { width: 8px; height: 8px; background: rgba(255,255,255,.22); border-radius: 50%; }
.code-window pre { margin: 0; padding: 30px; font-size: clamp(11px, 1.2vw, 15px); line-height: 1.75; white-space: pre-wrap; }
.code-blue { color: var(--blue); }
.code-green { color: #9ae3b7; }
.code-yellow { color: #f7df8c; }
.code-muted { color: #8b938d; }
.floating-note {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(21,24,22,.12);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}
.floating-note span { color: var(--green-2); }
.note-one { top: 4%; left: 2%; transform: rotate(-3deg); }
.note-two { top: 49%; left: -2%; transform: rotate(2deg); }
.note-three { right: 2%; bottom: 4%; transform: rotate(-2deg); }

.marquee { overflow: hidden; padding: 15px 0; color: #fff; background: var(--green); transform: rotate(-1deg) scale(1.02); }
.marquee div { display: flex; justify-content: center; align-items: center; gap: 28px; width: max-content; min-width: 100%; white-space: nowrap; animation: marquee-scroll 22s linear infinite; }
.marquee span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.marquee i { color: var(--lime); font-style: normal; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section-intro { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 40px; align-items: end; margin-bottom: 72px; }
.section-intro .eyebrow { align-self: start; }
.section-intro h2, .code-lab-heading h2, .workflow-heading h2, .checklist-card h2 { margin: 0; font-size: clamp(42px, 5vw, 70px); line-height: .98; font-weight: 600; }
.section-intro > p:last-child { margin: 0; color: var(--muted); }
.anatomy-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: start; }
.layer-list { margin: 0; padding: 0; list-style: none; }
.layer-card {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}
.layer-card:last-child { border-bottom: 1px solid var(--line); }
.layer-number { padding-top: 3px; color: var(--green-2); font-family: var(--mono); font-size: 11px; }
.layer-card h3 { margin-bottom: 6px; font-size: 19px; }
.layer-card p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.layer-card code { padding: 6px 8px; color: var(--green); background: rgba(23,63,53,.08); border-radius: 4px; font-size: 10px; white-space: nowrap; }
.layer-card .preheader-pattern { max-width: 220px; white-space: normal; }
.email-blueprint { position: sticky; top: 104px; margin: 0; padding: 18px; background: var(--paper-deep); border: 1px solid var(--line); border-radius: var(--radius); }
.email-blueprint figcaption, .blueprint-label, .blueprint-wrapper > span, .blueprint-container > span { display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.blueprint-wrapper { padding: 22px; background: #d5c9b8; border: 1px dashed rgba(21,24,22,.35); border-radius: 10px; }
.blueprint-container { width: 84%; margin: 0 auto; padding: 14px; background: #fffdf8; border: 1px solid var(--ink); border-radius: 5px; }
.blueprint-row { display: grid; place-items: center; margin-top: 7px; color: rgba(21,24,22,.68); border: 1px solid rgba(21,24,22,.15); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.blueprint-header { height: 46px; background: #d8e9ff; }
.blueprint-hero { height: 130px; background: var(--peach); }
.blueprint-body { height: 90px; background: #f9f2e8; }
.blueprint-cta { width: 40%; height: 34px; margin: 12px auto; color: #fff; background: var(--green); }
.blueprint-footer { height: 58px; background: #e4dfd6; }

.code-lab { color: #f2f4f1; background: var(--green); }
.code-lab-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: end; margin-bottom: 58px; }
.code-lab-heading > p { max-width: 440px; margin-bottom: 4px; color: rgba(255,255,255,.68); }
.code-explorer { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); }
.code-tabs { grid-column: 1 / -1; display: flex; border-bottom: 1px solid rgba(255,255,255,.18); }
.code-tabs button {
  padding: 15px 22px;
  color: rgba(255,255,255,.72);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
}
.code-tabs button[aria-selected="true"] { color: var(--lime); border-bottom-color: var(--lime); }
.code-tabs button:focus-visible, .copy-button:focus-visible, .menu-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.code-panel { min-width: 0; background: #101c18; border-right: 1px solid rgba(255,255,255,.16); }
.code-panel-top { display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--mono); font-size: 10px; }
.copy-button { padding: 7px 10px; color: var(--lime); background: rgba(216,243,104,.08); border: 1px solid rgba(216,243,104,.3); border-radius: 4px; cursor: pointer; font-family: var(--mono); font-size: 10px; }
.code-panel pre { min-height: 500px; max-height: 620px; margin: 0; padding: 30px; overflow: auto; color: #dce8e2; font-size: 13px; line-height: 1.75; tab-size: 2; }
#panel-button:not([hidden]) { display: flex; flex-direction: column; }
#panel-button pre { display: flex; flex: 1; align-items: center; }
.code-notes { padding: 32px; background: #224c40; }
.note-kicker { margin-bottom: 26px; color: var(--lime); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.code-notes > div { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.14); }
.code-notes span { color: var(--lime); font-family: var(--mono); font-size: 10px; }
.code-notes p { margin: 0; color: rgba(255,255,255,.68); font-size: 13px; }
.code-notes strong { color: #fff; font-weight: 600; }

.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule-card { display: flex; flex-direction: column; min-height: 470px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.rule-do { background: #d8e9ff; }
.rule-careful { background: #ffd8cc; }
.rule-why { color: #fff; background: var(--green); }
.rule-label { width: fit-content; margin-bottom: 38px; padding: 6px 9px; border: 1px solid currentColor; border-radius: 20px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.rule-card h3 { margin-bottom: 20px; font-size: 27px; line-height: 1.12; letter-spacing: -.03em; }
.rule-card ul { margin: 0; padding-left: 19px; }
.rule-card li, .rule-card > p:not(.rule-label) { margin-bottom: 10px; font-size: 14px; }
.mini-code { margin-top: auto; padding: 16px; color: #dce8e2; background: #111713; border-radius: 6px; font-family: var(--mono); font-size: 11px; }
.mini-code span { color: var(--lime); }
.support-meter { margin-top: auto; font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.support-meter div { height: 7px; margin-top: 10px; background: rgba(21,24,22,.15); border-radius: 10px; }
.support-meter i { display: block; width: 67%; height: 100%; background: var(--ink); border-radius: inherit; }
.client-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.client-list span { padding: 8px 10px; border: 1px solid rgba(255,255,255,.28); border-radius: 4px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; }

.workflow { color: #fff; background: #171a18; }
.workflow-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 60px; }
.workflow-steps { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.17); }
.workflow-steps li { min-height: 250px; padding: 24px 24px 0 0; border-right: 1px solid rgba(255,255,255,.17); }
.workflow-steps li + li { padding-left: 24px; }
.workflow-steps li:last-child { border-right: 0; }
.workflow-steps span { display: block; margin-bottom: 72px; color: var(--lime); font-family: var(--mono); font-size: 11px; }
.workflow-steps h3 { margin-bottom: 10px; font-size: 20px; }
.workflow-steps p { margin: 0; color: rgba(255,255,255,.56); font-size: 13px; }

.checklist-card { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; padding: 64px; background: var(--lime); border-radius: var(--radius); }
.checklist-card > div > p:last-child { max-width: 430px; margin: 28px 0 0; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 34px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid rgba(21,24,22,.18); }
.check-list li:last-child { border-bottom: 1px solid rgba(21,24,22,.18); }
.check-list span { display: grid; place-items: center; width: 26px; height: 26px; color: #fff; background: var(--green); border-radius: 50%; font-size: 12px; }
.check-list p { margin: 0; font-size: 14px; }
.check-list strong { display: block; margin-bottom: 3px; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 50px;
  align-items: end;
  padding: 58px 4vw;
  color: #fff;
  background: var(--green);
  border-top: 1px solid rgba(255,255,255,.15);
}
.footer-brand { color: #fff; }
.footer-brand .brand-mark { color: var(--green); background: var(--lime); }
.site-footer p { margin: 13px 0 0; color: rgba(255,255,255,.55); font-size: 12px; }
.footer-links { display: flex; gap: 24px; }
.footer-credit { text-align: right; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .marquee { transform: none; }
  .marquee div { animation: none; }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .home-link { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 90px; }
  .hero-copy { position: relative; z-index: 2; }
  .hero-visual { min-height: 520px; }
  .section-intro { grid-template-columns: 1fr 2fr; }
  .section-intro > p:last-child { grid-column: 2; }
  .anatomy-grid { gap: 35px; }
  .code-explorer { grid-template-columns: 1fr; }
  .code-panel { border-right: 0; }
  .code-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; }
  .note-kicker { grid-column: 1 / -1; }
  .rules-grid { grid-template-columns: 1fr 1fr; }
  .rule-why { grid-column: 1 / -1; min-height: 340px; }
  .workflow-steps { grid-template-columns: repeat(3, 1fr); }
  .workflow-steps li { border-bottom: 1px solid rgba(255,255,255,.17); }
  .checklist-card { gap: 50px; padding: 48px; }
}

@media (max-width: 720px) {
  .site-header { min-height: 64px; padding: 0 20px; }
  .menu-button { display: block; padding: 8px 0; background: none; border: 0; font-size: 13px; font-weight: 700; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 14px 20px 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 0; }
  .section-shell { width: min(100% - 32px, 1180px); }
  .section-pad { padding-top: 88px; padding-bottom: 88px; }
  .hero { min-height: auto; padding-top: 80px; padding-bottom: 50px; }
  h1 { font-size: clamp(52px, 16vw, 78px); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .hero-stats { flex-direction: column; }
  .hero-stats div { padding: 14px 0; }
  .hero-stats div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .hero-visual { min-height: 420px; }
  .code-window { top: 11%; right: 0; width: 95%; }
  .code-window pre { padding: 22px; font-size: 10px; }
  .floating-note { font-size: 8px; }
  .note-two { left: 0; }
  .section-intro { display: block; margin-bottom: 48px; }
  .section-intro h2 { margin-bottom: 24px; }
  .anatomy-grid { grid-template-columns: 1fr; }
  .layer-card { grid-template-columns: 28px 1fr; }
  .layer-card code { grid-column: 2; width: fit-content; }
  .email-blueprint { position: static; }
  .code-lab-heading { display: block; margin-bottom: 40px; }
  .code-lab-heading h2 { margin-bottom: 24px; }
  .code-tabs { overflow-x: auto; }
  .code-tabs button { flex: 0 0 auto; padding-inline: 14px; }
  .code-panel pre { min-height: 430px; padding: 22px 18px; font-size: 11px; }
  .code-notes { display: block; }
  .rules-grid { grid-template-columns: 1fr; }
  .rule-why { grid-column: auto; }
  .rule-card { min-height: 410px; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-steps li, .workflow-steps li + li { display: grid; grid-template-columns: 48px 1fr; min-height: 0; padding: 24px 0; border-right: 0; }
  .workflow-steps span { margin: 0; }
  .checklist-card { grid-template-columns: 1fr; gap: 48px; padding: 32px 24px; }
  .site-footer { grid-template-columns: 1fr; align-items: start; gap: 28px; padding: 44px 24px; }
  .footer-links { flex-wrap: wrap; gap: 14px 22px; }
  .footer-credit { text-align: left; }
}

@media (max-width: 420px) {
  .brand > span:last-child { max-width: 115px; line-height: 1.05; }
  .hero-visual { min-height: 360px; }
  .note-three { right: 0; }
  .blueprint-wrapper { padding: 12px; }
  .blueprint-container { width: 92%; }
}
