:root {
  color-scheme: light;
  --paper: #f5f6ef;
  --ink: #172321;
  --muted: #465752;
  --brand: #07695e;
  --line: #d6ddd4;
  --dark: #132621;
  --mint: #bcf6d8;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.frame { width: min(1200px, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: fixed; z-index: 3; top: .65rem; left: .65rem; padding: .65rem 1rem; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: none; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(2.15rem, 4.1vw, 3.8rem); line-height: 1.02; letter-spacing: -.065em; text-wrap: balance; }
h3 { font-size: clamp(1.13rem, 1.65vw, 1.45rem); letter-spacing: -.025em; line-height: 1.2; }

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

.header-inner, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem 1.5rem;
  padding-block: .8rem;
}

.wordmark img { display: block; width: clamp(7rem, 14vw, 10rem); height: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem clamp(.8rem, 3vw, 2rem); }
nav > a, .site-footer > a:last-child { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .9rem; font-weight: 650; text-decoration: none; }
nav > a:hover, .site-footer > a:last-child:hover { color: var(--brand); }
[id] { scroll-margin-top: 7rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.25rem);
  padding-block: clamp(3.75rem, 9.5vw, 8.5rem);
}

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: 1.2rem;
  color: var(--brand);
  font: 700 .77rem/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .035em;
}

.eyebrow span { flex: 0 0 .53rem; height: .53rem; border-radius: 50%; background: var(--brand); }
h1 { margin-bottom: 1.35rem; font-size: clamp(3rem, 5.55vw, 5rem); font-weight: 750; line-height: .96; letter-spacing: -.075em; }
h1 em { font-style: normal; color: var(--brand); }
.intro { max-width: 46ch; color: var(--muted); font-size: clamp(1.05rem, 1.55vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.5rem; margin-top: 1.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 2.85rem;
  padding: .65rem 1.04rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover { background: #08564d; }
.button-outline { border-color: #9eafa5; }
.button-outline:hover { background: #e7ede3; }
.text-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; color: var(--brand); font-weight: 700; }
.text-link:hover { text-decoration-thickness: 2px; }

.workflow {
  isolation: isolate;
  position: relative;
  padding: clamp(1rem, 3.1vw, 2.25rem);
  border-radius: 1.2rem;
  background:
    radial-gradient(ellipse at 98% 0, #316149 0, transparent 68%),
    radial-gradient(circle, #789f8b50 1px, transparent 1px) 0 0 / 17px 17px,
    var(--dark);
  color: #f7fff9;
  box-shadow: 0 1.4rem 3rem -1.5rem #173d2b88;
}
.workflow h2 { margin-bottom: 1.25rem; font-size: clamp(1.45rem, 2.5vw, 2.1rem); letter-spacing: -.045em; }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.45rem; margin: 0; padding: 0; list-style: none; }
.workflow-grid li { position: relative; }
.workflow-grid li:nth-child(3) { grid-row: 2; grid-column: 2; }
.workflow-grid li:nth-child(4) { grid-row: 2; grid-column: 1; }
.workflow-grid li:not(:last-child)::after {
  position: absolute;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  color: var(--mint);
  font-size: .9rem;
  pointer-events: none;
}
.workflow-grid li:first-child::after { content: "→"; top: calc(50% - .725rem); left: 100%; }
.workflow-grid li:nth-child(2)::after { content: "↓"; top: 100%; left: calc(50% - .725rem); }
.workflow-grid li:nth-child(3)::after { content: "←"; top: calc(50% - .725rem); right: 100%; }
.workflow-grid a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  gap: .26rem;
  padding: clamp(.55rem, 1.5vw, 1rem);
  border: 1px solid #6c967f;
  border-radius: .65rem;
  background: #192f27;
  line-height: 1.25;
  text-decoration: none;
}

.workflow-grid a:hover, .workflow-grid a:focus-visible { background: #294d3f; }
.workflow-grid strong { font-size: clamp(.84rem, 1.35vw, 1.12rem); overflow-wrap: anywhere; }
.workflow-grid small { color: #d1e4d7; }
.step-index { margin-bottom: .35rem; color: var(--mint); font: 700 .75rem/1.4 var(--mono); }
.workflow-feedback { display: flex; align-items: baseline; gap: .5rem; margin-top: 1.2rem; color: var(--mint); font-size: .85rem; }
.workflow-feedback span { font-size: 1.1rem; }

.method { padding-block: clamp(3.4rem, 7vw, 6.4rem); border-block: 1px solid var(--line); background: #ebf0e7; }
.section-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.65rem, 6vw, 6rem); }
.section-intro > p:not(.section-label) { max-width: 43ch; margin-top: 1.05rem; color: var(--muted); font-size: 1.04rem; }
.phase-list { list-style: none; padding: 0; margin: 0; }
.phase-list li {
  display: grid;
  grid-template-columns: 2.45rem minmax(0, 1fr);
  gap: clamp(.5rem, 2vw, 1.4rem);
  padding: 1.2rem .55rem;
  border-top: 1px solid #c0cec1;
}
.phase-list li:last-child { border-bottom: 1px solid #c0cec1; }
.phase-list li:target { background: #d9eae0; box-shadow: inset .2rem 0 var(--brand); }
.phase-index { color: var(--brand); font: 700 .9rem/1.8 var(--mono); }
.phase-list p { max-width: 63ch; margin-top: .45rem; color: var(--muted); }

.example-section { padding-block: clamp(3.4rem, 7vw, 6.4rem); }
.example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: start;
  gap: 2rem clamp(2rem, 6vw, 6rem);
  padding: clamp(1.25rem, 4.5vw, 4rem);
  border: 1px solid #bfd4c6;
  border-radius: 1.2rem;
  background: #e3efe4;
}
.example h2 { font-size: clamp(1.9rem, 3.3vw, 3.1rem); }
.section-label { margin-bottom: .75rem; color: var(--brand); font: 700 .78rem/1.5 var(--mono); }
.example-steps { margin: 0; }
.example-steps > div { padding: .8rem 0; border-top: 1px solid #b5cbbc; }
.example-steps > div:first-child { padding-top: 0; border: 0; }
.example-steps > div:last-child { padding-bottom: 0; }
.example-steps dt { color: var(--brand); font-weight: 750; }
.example-steps dd { margin: .2rem 0 0; color: var(--muted); }
.references { width: fit-content; margin-top: .8rem; color: var(--muted); }
.references summary { padding: .65rem 0; font-size: .9rem; font-weight: 650; cursor: pointer; }
.references a:hover { color: var(--brand); }
.references ul { margin: .45rem 0 0; padding-left: 1.3rem; }

.contact-section { padding-block: clamp(3.4rem, 7vw, 6.4rem); background: var(--dark); color: #f7fff9; }
.contact-section .section-intro p { color: #d0e2d7; }
.contact-details { display: grid; gap: .65rem; margin-top: 1.5rem; font-style: normal; }
.contact-details a { width: fit-content; color: var(--mint); overflow-wrap: anywhere; }
.contact-details a:hover { text-decoration-thickness: 2px; }
.contact-form { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid #537166; border-radius: .9rem; background: #1e352c; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .9rem; font-weight: 680; }
.field input, .field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: .65rem .75rem;
  border: 1px solid #78968a;
  border-radius: .45rem;
  background: #122820;
  color: #f7fff9;
  font: inherit;
  color-scheme: dark;
}
.field textarea { resize: vertical; }
.contact-form .button { justify-self: start; background: var(--mint); color: var(--dark); }
.contact-form .button:hover { background: #e0ffec; }
.contact-form .button:disabled { opacity: .7; cursor: wait; }
.contact-form [role="status"] { color: var(--mint); font-weight: 650; }
.contact-form [data-state="error"] { color: #ffcfb8; }
.contact-form [role="status"]:empty { margin-top: -1rem; }
.contact-section :focus-visible, .workflow :focus-visible { outline-color: var(--mint); }

.about { display: grid; grid-template-columns: minmax(0, .45fr) minmax(0, 1fr) auto; align-items: center; gap: .85rem 2rem; padding-block: clamp(2.2rem, 5vw, 4rem); }
.about h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.about p, .site-footer small { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wordmark img { width: 7rem; }
.site-footer > a:last-child { gap: .45rem; }

@media (max-width: 860px) {
  .hero, .section-grid, .example, .about { grid-template-columns: 1fr; }
  .hero { gap: 2rem; }
  .workflow { width: min(100%, 37rem); }
  .about { align-items: start; }
  .about .text-link { justify-self: start; }
}

@media (max-width: 480px) {
  .frame { width: calc(100% - 2rem); }
  .header-inner { gap: .25rem .55rem; }
  .header-inner .wordmark img { width: 6.4rem; }
  nav { gap: .25rem .55rem; }
  nav > a, nav .button { font-size: .82rem; }
  nav .button { min-height: 2.75rem; padding: .5rem .6rem; }
  .hero { padding-top: 3rem; }
  .contact-fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-copy { animation: enter .5s ease-out both; }
  .workflow { animation: enter .65s .08s ease-out both; }
  .button, .workflow-grid a { transition: background-color .18s ease, transform .18s ease; }
  .button:hover, .workflow-grid a:hover { transform: translateY(-2px); }
  .phase-list li { transition: background-color .2s ease; }

  @keyframes enter {
    from { opacity: .65; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
