:root {
  --ink: #050504;
  --ink-2: #11100d;
  --panel: #181511;
  --panel-2: #211b13;
  --line: #4f4537;
  --steel: #f0eee9;
  --muted: #b2a99a;
  --gold: #ffad17;
  --gold-2: #d77b08;
  --amber: #ffd166;
  --green: #36d58c;
  --red: #ff5a4f;
  --white: #fffaf0;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(5, 5, 4, 0.7), rgba(5, 5, 4, 0.98)),
    #050504;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 173, 23, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(240, 238, 233, 0.04) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 70px);
  border-bottom: 1px solid rgba(240, 238, 233, 0.12);
  background: rgba(5, 5, 4, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(255, 173, 23, 0.28);
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.95rem;
}

nav a,
.header-action {
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

nav a:hover {
  color: var(--white);
}

.header-action {
  min-width: max-content;
  padding: 10px 16px;
  border: 1px solid rgba(255, 173, 23, 0.44);
  border-radius: 6px;
  color: var(--gold);
  font-weight: 500;
}

.header-action:hover {
  background: rgba(255, 173, 23, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(330px, 1.06fr);
  align-items: center;
  gap: clamp(36px, 6vw, 82px);
  min-height: calc(88vh - 78px);
  padding: clamp(58px, 8vw, 104px) clamp(18px, 5vw, 70px) clamp(34px, 5vw, 58px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: var(--white);
  font-size: clamp(3.9rem, 9.4vw, 8.6rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 34px rgba(255, 173, 23, 0.24);
}

h2 {
  margin-bottom: 18px;
  max-width: 890px;
  color: var(--white);
  font-size: clamp(2.2rem, 4.7vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--steel);
  font-size: 1.08rem;
  letter-spacing: 0;
}

.motto {
  margin-bottom: 18px;
  color: var(--amber);
  font-size: clamp(1.08rem, 2vw, 1.55rem);
  font-weight: 800;
}

.hero-lede {
  max-width: 670px;
  color: #d5c9b5;
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 34px 0 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 20px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
}

.button-primary {
  border: 1px solid rgba(255, 209, 102, 0.72);
  color: #160f04;
  background: var(--gold);
}

.button-primary:hover {
  background: #ffc34a;
}

.button-secondary {
  border: 1px solid rgba(240, 238, 233, 0.28);
  color: var(--steel);
  background: rgba(240, 238, 233, 0.06);
}

.button-secondary:hover {
  border-color: rgba(240, 238, 233, 0.56);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.trust-row span::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: var(--green);
  box-shadow: 0 0 16px rgba(54, 213, 140, 0.72);
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
}

.shepherd-logo {
  position: relative;
  z-index: 2;
  display: block;
  width: min(61%, 560px);
  transform: translateZ(0);
  backface-visibility: hidden;
  filter:
    drop-shadow(0 0 18px rgba(255, 173, 23, 0.5))
    drop-shadow(0 0 48px rgba(255, 173, 23, 0.28))
    drop-shadow(0 24px 60px rgba(0, 0, 0, 0.28));
}

.hero-visual::before {
  position: absolute;
  inset: 9% 8% 11%;
  content: "";
  border: 1px solid rgba(240, 238, 233, 0.14);
  border-radius: 8px;
  background: rgba(24, 21, 17, 0.5);
  box-shadow: var(--shadow);
  transform: skewY(-3deg);
}

.agent-console {
  position: absolute;
  right: 0;
  bottom: 28px;
  z-index: 3;
  width: min(60%, 390px);
  padding: 18px;
  border: 1px solid rgba(240, 238, 233, 0.2);
  border-radius: 8px;
  background: rgba(9, 8, 7, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.console-top {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}

.console-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--steel);
  opacity: 0.7;
}

.event-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border-radius: 6px;
  color: #f9ead1;
  background: rgba(255, 173, 23, 0.1);
}

.event-label,
.event-line em,
.pipeline span,
.branch-line {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.event-label {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.event-line em {
  color: var(--green);
  font-size: 0.82rem;
  font-style: normal;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 15px 0;
}

.pipeline span {
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid rgba(255, 173, 23, 0.2);
  border-radius: 6px;
  color: #f8d79e;
  background: rgba(255, 173, 23, 0.055);
  font-size: 0.72rem;
  text-align: center;
}

.inline-note {
  margin: 16px 0;
  padding: 14px;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  color: #eadbc3;
  background: rgba(255, 173, 23, 0.09);
}

.inline-note strong {
  color: var(--gold);
  font-size: 0.82rem;
}

.inline-note p {
  margin: 7px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.branch-line {
  overflow: hidden;
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--green);
  background: rgba(54, 213, 140, 0.08);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-block: 1px solid rgba(240, 238, 233, 0.14);
  background: rgba(240, 238, 233, 0.12);
}

.status-band div {
  padding: clamp(24px, 4vw, 42px) clamp(18px, 5vw, 70px);
  background: rgba(9, 8, 7, 0.9);
}

.status-band strong {
  display: block;
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1;
}

.status-band span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.product-flow,
.operator-band,
.safety-stage,
.cta {
  padding: clamp(76px, 10vw, 132px) clamp(18px, 5vw, 70px);
}

.section-heading {
  max-width: 980px;
  margin-bottom: clamp(34px, 6vw, 64px);
}

.workflow-grid,
.operator-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.workflow-item,
.operator-grid article {
  min-height: 250px;
  padding: 26px;
  border: 1px solid rgba(240, 238, 233, 0.14);
  border-radius: 8px;
  background: rgba(24, 21, 17, 0.76);
}

.workflow-item p,
.operator-grid p,
.stage-copy p,
.cta p {
  color: #c6bba8;
  line-height: 1.68;
}

.step {
  display: inline-block;
  margin-bottom: 48px;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 900;
}

.workflow-item:nth-child(2) .step,
.operator-grid article:nth-child(2) h3 {
  color: var(--amber);
}

.workflow-item:nth-child(3) .step,
.operator-grid article:nth-child(3) h3 {
  color: var(--green);
}

.workflow-item:nth-child(4) .step,
.operator-grid article:nth-child(4) h3 {
  color: #f28f2a;
}

.safety-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(330px, 1.22fr);
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
  background: #0d0c0a;
}

.stage-copy {
  max-width: 630px;
}

.guard-panel {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(240, 238, 233, 0.16);
  border-radius: 8px;
  background: #15120e;
  box-shadow: var(--shadow);
}

.guard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(240, 238, 233, 0.12);
}

.branch {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
}

.status-pill {
  min-width: max-content;
  padding: 8px 11px;
  border: 1px solid rgba(54, 213, 140, 0.36);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guard-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.guard-item {
  padding: 18px;
  border: 1px solid rgba(240, 238, 233, 0.12);
  border-radius: 8px;
  background: rgba(240, 238, 233, 0.045);
}

.guard-item span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guard-item p {
  margin: 0;
  color: #dfd2bc;
  line-height: 1.58;
}

.allowed span {
  color: var(--green);
}

.blocked span {
  color: var(--red);
}

.limited span {
  color: var(--amber);
}

.operator-band {
  background:
    linear-gradient(180deg, rgba(255, 173, 23, 0.04), transparent 46%),
    var(--ink);
}

.operator-grid article {
  min-height: 235px;
}

.operator-grid article:first-child h3 {
  color: var(--gold);
}

.operator-grid code {
  display: block;
  overflow: hidden;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid rgba(255, 173, 23, 0.16);
  border-radius: 6px;
  color: #ffe2a9;
  background: rgba(5, 5, 4, 0.58);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cta {
  display: grid;
  min-height: 68vh;
  align-content: center;
  justify-items: start;
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.97), rgba(5, 5, 4, 0.74)),
    url("assets/code-shepherd-minimal.png") right 4vw center / min(48vw, 500px) no-repeat,
    #050504;
}

.cta p {
  max-width: 650px;
  font-size: 1.08rem;
}

.cta .button {
  margin-top: 16px;
}

@media (max-width: 1120px) {
  .workflow-grid,
  .operator-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1040px) {
  .hero,
  .safety-stage {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 54px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .cta {
    background:
      linear-gradient(90deg, rgba(5, 5, 4, 0.98), rgba(5, 5, 4, 0.86)),
      url("assets/code-shepherd-minimal.png") right -14vw center / min(70vw, 520px) no-repeat,
      #050504;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 5.7rem);
  }

  h2 {
    font-size: clamp(2.15rem, 12vw, 4.4rem);
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
    padding-bottom: 28px;
  }

  .hero-visual {
    min-height: 350px;
  }

  .shepherd-logo {
    width: min(88%, 370px);
  }

  .agent-console {
    right: 6px;
    bottom: 0;
    width: min(84%, 340px);
  }

  .status-band,
  .workflow-grid,
  .operator-grid {
    grid-template-columns: 1fr;
  }

  .status-band div {
    padding-inline: 22px;
  }

  .workflow-item,
  .operator-grid article {
    min-height: 0;
  }

  .step {
    margin-bottom: 28px;
  }

  .guard-header {
    display: block;
  }

  .status-pill {
    display: inline-flex;
    margin-top: 14px;
  }

  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta {
    min-height: 650px;
    align-content: start;
    background:
      linear-gradient(180deg, rgba(5, 5, 4, 0.98), rgba(5, 5, 4, 0.83)),
      url("assets/code-shepherd-minimal.png") center bottom 24px / min(82vw, 390px) no-repeat,
      #050504;
  }
}

@media (max-width: 470px) {
  .brand span {
    max-width: 138px;
  }

  .header-action {
    padding-inline: 12px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .trust-row {
    display: grid;
    gap: 10px;
  }

  .agent-console {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: -44px;
  }
}
