:root {
  --red: #ef2b2d;
  --red-dark: #9d1719;
  --ink: #151313;
  --coal: #201f1e;
  --paper: #faf8f4;
  --muted: #6a6460;
  --line: #ded8d2;
  --white: #ffffff;
  --teal: #00a6a6;
  --shadow: 0 22px 70px rgba(24, 18, 16, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 54px);
  color: var(--white);
  background: linear-gradient(180deg, rgba(18, 15, 14, 0.86), rgba(18, 15, 14, 0.18));
}

.brand,
.main-nav,
.hero-actions,
.footer,
.brief-header {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(239, 43, 45, 0.35);
}

.main-nav {
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 24px);
  font-size: clamp(0.82rem, 1.15vw, 1rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.main-nav a:hover,
.header-action:hover,
.footer a:hover {
  color: var(--white);
}

.header-action {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: #120f0e;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-mail-hotspot {
  position: absolute;
  z-index: 4;
  top: 17.9%;
  left: 92.35%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: clamp(42px, 4.8vw, 78px);
  aspect-ratio: 1 / 1;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  outline: 0;
}

.hero-mail-hotspot:hover,
.hero-mail-hotspot:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(239, 43, 45, 0.18);
  box-shadow: 0 0 0 8px rgba(239, 43, 45, 0.16);
}

.hero-mail-hotspot span {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 150px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(18, 15, 14, 0.22);
  font-size: 0.82rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
}

.hero-mail-hotspot:hover span,
.hero-mail-hotspot:focus-visible span {
  opacity: 1;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(18, 15, 14, 0.92) 0%, rgba(18, 15, 14, 0.72) 34%, rgba(18, 15, 14, 0.22) 72%),
    linear-gradient(0deg, rgba(18, 15, 14, 0.9) 0%, rgba(18, 15, 14, 0) 30%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  padding-top: 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.82rem;
}

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

h1 {
  max-width: 710px;
  margin-bottom: 22px;
  font-size: clamp(3.1rem, 8vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.hero-copy {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.primary {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 12px 34px rgba(239, 43, 45, 0.32);
}

.primary:hover {
  background: #ff3b3d;
}

.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin: 30px 0 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  max-width: 700px;
  margin: 0;
}

.hero-stats div {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-stats dt {
  font-size: 1.12rem;
  font-weight: 800;
}

.hero-stats dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.section {
  padding: clamp(72px, 10vw, 130px) clamp(18px, 6vw, 86px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 38px;
}

.section-heading p,
.builder-copy p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.agent-card {
  min-height: 280px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(24, 18, 16, 0.06);
}

.agent-card p,
.process-list span {
  color: var(--muted);
  line-height: 1.65;
}

.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-weight: 900;
}

.agent-card:nth-child(2) .icon {
  background: var(--red);
}

.agent-card:nth-child(3) .icon {
  background: var(--teal);
}

.agent-card:nth-child(4) .icon {
  background: var(--red-dark);
}

.process-band {
  background: var(--coal);
  color: var(--white);
  padding: clamp(66px, 8vw, 110px) clamp(18px, 6vw, 86px);
}

.process-inner {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(34px, 7vw, 90px);
  align-items: start;
}

.process-list {
  list-style: none;
  counter-reset: steps;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.process-list li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 6px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.process-list li::before {
  content: counter(steps);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--red);
  font-weight: 900;
  grid-row: 1 / span 2;
}

.process-list strong,
.process-list span {
  display: block;
  grid-column: 2;
  min-width: 0;
}

.process-list strong {
  margin-bottom: 7px;
}

.builder-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr 0.92fr;
  gap: 22px;
  align-items: start;
}

.demo-section {
  background: #fffdfa;
}

.mail-agent-section {
  background: var(--white);
}

.demo-copy {
  max-width: 860px;
  margin-bottom: 34px;
}

.demo-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.agent-blueprint {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.agent-blueprint span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-weight: 900;
}

.demo-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(250px, 0.72fr) minmax(340px, 1fr);
  gap: 18px;
  align-items: start;
}

.mail-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(250px, 0.72fr) minmax(340px, 1fr);
  gap: 18px;
  align-items: start;
}

.demo-agent,
.mail-agent,
.explain-card,
.demo-output {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(24, 18, 16, 0.07);
}

.demo-agent {
  display: grid;
  gap: 16px;
  padding: 22px;
  align-self: start;
}

.demo-prompts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.demo-prompts button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdfa;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.demo-prompts button:hover {
  border-color: rgba(239, 43, 45, 0.36);
  background: #fff6f3;
}

.agent-explain {
  display: grid;
  gap: 18px;
}

.explain-card {
  padding: 22px;
}

.explain-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.explain-list li.active-step {
  color: var(--ink);
}

.tool-list {
  display: grid;
  gap: 10px;
}

.tool-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fffdfa;
  font-weight: 800;
}

.tool-status.tool-used {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.tool-name {
  min-width: 0;
  word-break: break-word;
}

.tool-state {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
}

.tool-status.tool-used .tool-state {
  color: var(--ink);
  background: var(--white);
}

.demo-output {
  overflow: hidden;
  align-self: start;
}

.demo-output pre {
  max-height: 520px;
  overflow: auto;
}

.builder,
.brief-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.builder {
  display: grid;
  gap: 20px;
  padding: 24px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

legend,
label {
  font-weight: 800;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdfa;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(239, 43, 45, 0.15);
  border-color: var(--red);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide {
  width: 100%;
}

.brief-panel {
  padding: 0;
  overflow: hidden;
}

.brief-header {
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fffdfa;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(0, 166, 166, 0.12);
}

pre {
  min-height: 318px;
  margin: 0;
  padding: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font: 500 0.95rem/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.brief-panel .button {
  border-radius: 0;
  color: var(--white);
  background: var(--ink);
}

.brief-panel .dark-secondary {
  border-radius: 0;
  color: var(--ink);
  background: #fffdfa;
}

.storage-section {
  background: var(--white);
}

.storage-heading {
  max-width: 860px;
  margin-bottom: 34px;
}

.storage-heading p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.storage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.qualification-panel {
  grid-column: 1 / -1;
}

.storage-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 12px 34px rgba(24, 18, 16, 0.07);
  overflow: hidden;
}

.storage-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.storage-panel-header h3 {
  margin-bottom: 0;
}

.panel-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.count-pill {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-weight: 900;
}

.storage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.storage-list {
  display: grid;
  gap: 12px;
  min-height: 180px;
  max-height: 460px;
  overflow: auto;
  padding: 20px;
  color: var(--muted);
}

.storage-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.storage-item strong {
  color: var(--ink);
}

.storage-item small {
  color: var(--muted);
  font-weight: 800;
}

.storage-item pre {
  min-height: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
}

.qualification-output {
  min-height: 340px;
  max-height: 560px;
  overflow: auto;
  background: var(--white);
}

.footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 6vw, 86px);
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
}

.footer span:first-child {
  color: var(--white);
  font-weight: 900;
}

.solid-header {
  background: rgba(18, 15, 14, 0.96);
}

.about-page {
  background: #fffdfa;
}

.legal-page {
  background: #fffdfa;
}

.legal-hero {
  min-height: 82vh;
  padding: 140px clamp(18px, 6vw, 86px) 90px;
  background:
    linear-gradient(135deg, rgba(239, 43, 45, 0.07), rgba(0, 166, 166, 0.05)),
    var(--paper);
}

.legal-content {
  max-width: 860px;
}

.legal-content h1 {
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 5.4rem);
}

.legal-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal-block h2 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.legal-block p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.05rem;
}

.legal-block a {
  color: var(--red-dark);
  font-weight: 800;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
  min-height: 88vh;
  padding: 140px clamp(18px, 6vw, 86px) 80px;
  background:
    linear-gradient(135deg, rgba(239, 43, 45, 0.08), rgba(0, 166, 166, 0.06)),
    var(--paper);
}

.about-text {
  max-width: 820px;
}

.about-text p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.dark-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.dark-secondary:hover {
  border-color: rgba(239, 43, 45, 0.35);
  background: #fff6f3;
}

.portrait-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.portrait-card img,
.portrait-initials {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.portrait-card img {
  object-fit: cover;
}

.portrait-initials {
  display: grid;
  place-items: center;
  color: var(--white);
  background:
    radial-gradient(circle at 72% 26%, rgba(0, 166, 166, 0.65), transparent 28%),
    linear-gradient(135deg, var(--ink), var(--red-dark));
  font-size: clamp(4.5rem, 13vw, 8rem);
  font-weight: 900;
}

.portrait-card figcaption {
  padding: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.portrait-card figcaption::first-line {
  color: var(--ink);
  font-weight: 900;
}

.about-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(320px, 1.3fr);
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(70px, 9vw, 120px) clamp(18px, 6vw, 86px);
  background: var(--white);
}

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

.focus-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.focus-grid p {
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 1050px) {
  .agent-grid,
  .builder-section,
  .demo-workbench,
  .mail-workbench,
  .storage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-copy,
  .demo-output {
    grid-column: 1 / -1;
  }

  .about-hero,
  .about-band,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .portrait-card {
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: absolute;
    align-items: center;
  }

  .main-nav {
    display: flex;
    width: 100%;
    order: 3;
    justify-content: flex-start;
    gap: 10px 16px;
  }

  .hero {
    min-height: 940px;
    align-items: end;
  }

  .hero-image {
    object-position: 58% center;
  }

  .hero-mail-hotspot {
    top: 178px;
    left: auto;
    right: 0;
    transform: none;
    width: 46px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(18, 15, 14, 0.96) 0%, rgba(18, 15, 14, 0.82) 54%, rgba(18, 15, 14, 0.12) 100%);
  }

  .hero-content {
    width: calc(100% - 36px);
    margin: 0 auto;
    padding: 120px 0 46px;
  }

  h1 {
    font-size: 3.25rem;
  }

  .hero-stats,
  .agent-grid,
  .process-inner,
  .builder-section,
  .demo-workbench,
  .mail-workbench,
  .storage-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .demo-prompts {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    padding-left: 0;
  }

  .agent-card {
    min-height: 230px;
  }

  .process-list li {
    grid-template-columns: 48px 1fr;
  }

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

  .about-hero {
    min-height: auto;
    padding-top: 118px;
  }
}

@media (max-width: 520px) {
  .main-nav {
    display: none;
  }
}

@media (max-width: 420px) {
  .hero-actions .button {
    width: 100%;
  }

  h1 {
    font-size: 2.72rem;
  }
}
