:root {
  --ink: #151612;
  --ink-2: #24261f;
  --ink-3: #30342d;
  --paper: #f5f2eb;
  --paper-2: #fffdf8;
  --paper-3: #ebe5d8;
  --muted: #66695f;
  --line: #d8d1c2;
  --white: #fffdf8;
  --gold: #d7953c;
  --gold-2: #f0bd73;
  --green: #1f7f6d;
  --red: #a54f45;
  --blue: #496f91;
  --shadow: 0 18px 42px rgba(18, 18, 14, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 10px 14px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header.hero {
  min-height: 82svh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--white);
  isolation: isolate;
  background: #0e110e;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(9, 11, 8, 0.98) 0%, rgba(9, 11, 8, 0.92) 42%, rgba(9, 11, 8, 0.62) 70%, rgba(9, 11, 8, 0.34) 100%),
    linear-gradient(180deg, rgba(9, 11, 8, 0.18) 0%, rgba(9, 11, 8, 0.86) 100%);
}

.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 0;
  width: min(42vw, 560px);
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 38%;
  filter: saturate(0.9) contrast(1.04);
  opacity: 0.74;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 26%, black 100%);
  mask-image: linear-gradient(90deg, transparent 0%, black 26%, black 100%);
}

.site-nav {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  position: relative;
  z-index: 2;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 850;
}

.brand-by {
  color: rgba(255, 253, 248, 0.74);
  font-weight: 700;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 253, 248, 0.44);
  border-radius: 8px;
  display: inline-flex;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  gap: 18px;
  color: rgba(255, 253, 248, 0.84);
  font-weight: 750;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.nav-cta {
  color: var(--gold-2);
}

.hero-content {
  width: min(1180px, calc(100% - 40px));
  margin: auto auto 6vh;
  padding: 46px 0 54px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.94rem;
  font-weight: 850;
}

.hero h1,
.section h1,
.section h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 820px;
  font-size: 5.1rem;
  line-height: 0.96;
}

.hero-copy {
  max-width: 790px;
  margin: 24px 0 0;
  color: rgba(255, 253, 248, 0.88);
  font-size: 1.14rem;
}

.hero-copy p {
  margin: 0 0 12px;
}

.hero-actions,
.link-row,
.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  min-height: 48px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 850;
  line-height: 1.2;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button-primary {
  background: var(--gold);
  color: #17110c;
}

.button-secondary {
  border: 1px solid rgba(255, 253, 248, 0.34);
  color: var(--white);
  background: rgba(255, 253, 248, 0.08);
}

.proof-strip {
  background: var(--ink-2);
  color: var(--white);
  border-top: 1px solid rgba(255, 253, 248, 0.1);
}

.proof-grid {
  min-height: 108px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
}

.proof-grid p {
  margin: 0;
  padding: 18px 18px 18px 0;
  border-right: 1px solid rgba(255, 253, 248, 0.12);
  color: rgba(255, 253, 248, 0.74);
  font-size: 0.94rem;
}

.proof-grid p:last-child {
  border-right: 0;
}

.proof-grid strong {
  display: block;
  color: var(--gold-2);
}

.section {
  padding: 86px 0;
}

.section-inner,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.section-paper {
  background: var(--paper-2);
}

.section-light {
  background: var(--paper);
}

.section-operator {
  background: #eef4f0;
}

.section-ink {
  background: #11130f;
  color: var(--white);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 36px;
}

.section h1 {
  font-size: 3.6rem;
  line-height: 0.98;
}

.section h2 {
  max-width: 860px;
  font-size: 3.35rem;
  line-height: 1;
}

.section h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.15;
}

.section h4 {
  margin: 24px 0 8px;
  font-size: 0.84rem;
  text-transform: uppercase;
}

.section p,
.section li,
.section dd {
  color: var(--muted);
}

.section-ink p,
.section-ink li,
.section-ink dd {
  color: rgba(255, 253, 248, 0.74);
}

.section-heading p:not(.eyebrow),
.copy-stack p,
.operator-copy p {
  font-size: 1.06rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: 64px;
  align-items: start;
}

.copy-stack {
  display: grid;
  gap: 14px;
}

.copy-stack p {
  margin: 0;
}

.facts-table {
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts-table div {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.facts-table dt {
  font-weight: 850;
}

.facts-table dd {
  margin: 0;
}

.app-grid,
.work-grid,
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.app-card,
.work-grid article,
.artifact-card,
.case-artifact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.app-card {
  min-height: 430px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.app-hum {
  border-top: 5px solid var(--green);
}

.app-firstline {
  border-top: 5px solid var(--blue);
}

.app-whimsy {
  border-top: 5px solid var(--red);
}

.featured-card {
  background: #fbfaf5;
}

.app-card-top {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.app-card-top a {
  color: var(--green);
  white-space: nowrap;
}

.app-card h3 {
  margin: 54px 0 18px;
  font-size: 3rem;
  line-height: 0.98;
}

.app-card p {
  margin: 0 0 10px;
}

.link-row {
  margin-top: auto;
  padding-top: 20px;
}

.link-row a,
.text-link {
  color: var(--green);
  font-weight: 850;
}

.section-ink .link-row a,
.section-ink .text-link,
.inverse {
  color: var(--gold-2);
}

.system-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.system-steps li {
  min-height: 208px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.055);
}

.system-steps span {
  color: var(--gold-2);
  font-weight: 900;
}

.system-steps strong {
  display: block;
  margin-top: 22px;
  color: var(--white);
  font-size: 1.28rem;
}

.system-steps p {
  margin: 10px 0 0;
}

.system-outcome {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 253, 248, 0.16);
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.system-outcome p {
  max-width: 820px;
  margin: 0;
}

.operator-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: 64px;
  align-items: start;
}

.operator-copy p {
  max-width: 740px;
}

.operator-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.operator-photo {
  width: 190px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.operator-facts {
  display: grid;
  gap: 14px;
}

.operator-facts p,
.proof-list p {
  margin: 0;
  border-left: 4px solid var(--green);
  padding: 8px 0 8px 18px;
  color: var(--ink-2);
}

.operator-facts p:nth-child(2),
.proof-list p:nth-child(2) {
  border-left-color: var(--blue);
}

.operator-facts p:nth-child(3),
.proof-list p:nth-child(3) {
  border-left-color: var(--gold);
}

.operator-facts p:nth-child(4),
.proof-list p:nth-child(4) {
  border-left-color: var(--red);
}

.work-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.work-grid article {
  padding: 22px;
}

.work-grid p {
  margin: 14px 0 0;
}

.cta-panel {
  margin-top: 28px;
  padding: 24px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.cta-panel p {
  color: rgba(255, 253, 248, 0.76);
  margin: 0;
}

.page-header {
  background: #11130f;
  color: var(--white);
  padding: 0 0 76px;
}

.page-header .page-hero-inner {
  padding-top: 62px;
}

.page-header h1 {
  max-width: 900px;
  font-size: 4.2rem;
  line-height: 0.98;
  margin: 0;
}

.page-header p {
  max-width: 790px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 1.12rem;
}

.case-section {
  border-top: 1px solid var(--line);
}

.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(360px, 1fr);
  gap: 48px;
  align-items: start;
}

.case-artifact {
  padding: 22px;
  overflow: hidden;
}

.case-artifact h3 {
  margin-bottom: 14px;
}

.artifact-code,
.artifact-list,
.artifact-diagram,
.artifact-table {
  background: #f2eee5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink-2);
}

.artifact-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.artifact-list {
  margin: 0;
  padding-left: 34px;
}

.artifact-diagram {
  display: grid;
  gap: 10px;
}

.artifact-diagram span {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--white);
  border-left: 4px solid var(--green);
  font-weight: 800;
}

.artifact-table {
  display: grid;
  gap: 10px;
}

.artifact-table div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
}

.artifact-table strong {
  color: var(--ink);
}

.site-footer {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
  color: var(--muted);
}

.site-footer p {
  margin: 6px 0;
}

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

.site-footer a {
  color: var(--green);
  font-weight: 850;
}

@media (max-width: 1100px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero h1 {
    font-size: 4.1rem;
  }

  .section h1,
  .page-header h1 {
    font-size: 3rem;
  }

  .section h2 {
    font-size: 2.72rem;
  }

  .proof-grid,
  .app-grid,
  .two-column,
  .operator-layout,
  .case-grid,
  .artifact-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid p {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 253, 248, 0.12);
    padding-right: 0;
  }

  .proof-grid p:last-child {
    border-bottom: 0;
  }

  .system-steps {
    grid-template-columns: 1fr;
  }

  .system-outcome,
  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .site-header.hero {
    min-height: 84svh;
  }

  .hero-photo {
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: center 36%;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(9, 11, 8, 0.92) 0%, rgba(9, 11, 8, 0.74) 100%),
      linear-gradient(180deg, rgba(9, 11, 8, 0.24) 0%, rgba(9, 11, 8, 0.9) 100%);
  }

  .site-nav {
    width: min(100% - 28px, 1180px);
    padding-top: 18px;
    align-items: flex-start;
  }

  .brand {
    max-width: 142px;
    align-items: flex-start;
  }

  .brand-by {
    display: none;
  }

  .nav-links {
    gap: 10px;
    font-size: 0.9rem;
  }

  .hero-content,
  .section-inner,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .hero-content {
    padding: 34px 0 40px;
    margin-bottom: 4vh;
  }

  .hero h1 {
    font-size: 3.05rem;
  }

  .hero-copy {
    font-size: 1.02rem;
  }

  .section {
    padding: 62px 0;
  }

  .section h1,
  .page-header h1 {
    font-size: 2.35rem;
  }

  .section h2 {
    font-size: 2.08rem;
  }

  .facts-table div,
  .artifact-table div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .app-card {
    min-height: auto;
  }

  .app-card h3 {
    margin-top: 34px;
    font-size: 2.25rem;
  }

  .app-card-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .system-steps li {
    min-height: auto;
  }

  .operator-panel,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .operator-photo {
    width: min(100%, 260px);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}
