:root {
  --bg: #eef1f4;
  --paper: #f7f9fb;
  --ink: #12151a;
  --muted: #5c6672;
  --line: #d5dbe3;
  --signal: #d62828;
  --signal-deep: #9f1c1c;
  --code: #1b2430;
  --display: "Newsreader", Georgia, serif;
  --sans: "Space Grotesk", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

a { color: var(--signal-deep); }

.page-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.5rem 1.1rem;
  border-right: 1px solid var(--line);
  background: #e7ebf0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rail-brand {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.rail nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.rail nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.65rem;
}

.rail nav a:hover {
  color: var(--ink);
  border-left-color: var(--signal);
}

.rail-meta {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-bar {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.mobile-bar a {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.mobile-bar button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

.main-col { min-width: 0; }

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(2.5rem, 7vh, 5rem) clamp(1.3rem, 4vw, 3rem);
  background:
    linear-gradient(90deg, rgba(214, 40, 40, 0.06) 0 8px, transparent 8px),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand-hero {
  grid-column: 1;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 0.95;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  color: var(--signal);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.lede {
  color: var(--muted);
  max-width: 40ch;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  padding: 0.85rem 1.15rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn.primary {
  background: var(--signal);
  color: #fff;
}

.btn.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.hero-doc {
  background: var(--code);
  color: #d7e0ea;
  border: 1px solid #2a3442;
  min-height: 340px;
  box-shadow: 18px 18px 0 rgba(214, 40, 40, 0.15);
}

.doc-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #2a3442;
  background: #151c26;
}

.doc-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #445;
}

.doc-chrome span:nth-child(1) { background: #ff6058; }
.doc-chrome span:nth-child(2) { background: #ffbd2e; }
.doc-chrome span:nth-child(3) { background: #28c840; }

.doc-chrome em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: #8b98a8;
}

.hero-doc pre {
  margin: 0;
  padding: 1rem 1.1rem 1.4rem;
  white-space: pre-wrap;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #9fefc0;
  min-height: 280px;
}

section {
  padding: clamp(3.5rem, 8vh, 5.5rem) clamp(1.3rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--signal);
}

h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
}

.mission-grid {
  display: grid;
  gap: 0.9rem;
  max-width: 78ch;
}

.mission-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 2rem;
}

.stat-row div {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.1rem;
}

.stat-row strong {
  display: block;
  font-family: var(--display);
  font-size: 2.4rem;
  color: var(--signal);
  line-height: 1;
  margin-bottom: 0.45rem;
}

.stat-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.fine {
  margin: 0.8rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.prod {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.prod:last-child { border-bottom: 1px solid var(--line); }

.prod header {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.6rem;
}

.prod header span {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--signal);
}

.prod h3 {
  font-family: var(--display);
  font-size: 1.55rem;
  margin: 0;
  font-weight: 600;
}

.prod > p {
  color: var(--muted);
  max-width: 72ch;
}

.prod ul {
  columns: 2;
  gap: 1.5rem;
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
}

.prod li { margin-bottom: 0.35rem; }

.frame-intro {
  color: var(--muted);
  max-width: 60ch;
}

.frame-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.frame-cards article {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--signal);
  padding: 1.3rem;
}

.frame-cards h3 {
  font-family: var(--display);
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.frame-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.method ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0.8rem;
}

.method li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.2rem;
}

.method li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--signal);
}

.method h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.method p {
  margin: 0;
  color: var(--muted);
  grid-column: 2;
}

.aud-grid,
.lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.aud-grid article,
.lib-grid article {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.15rem;
}

.aud-grid h3,
.lib-grid h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.aud-grid p,
.lib-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.cases article {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.cases article:last-child { border-bottom: 1px solid var(--line); }

.cases h3 {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 0 0 0.5rem;
}

.cases p {
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
}

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 0.55rem;
  padding: 0.15rem 1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.9rem 0;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq p {
  margin: 0 0 0.95rem;
  color: var(--muted);
  max-width: 70ch;
}

.contact-box {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.contact-box address {
  font-style: normal;
  margin: 1.3rem 0 0.8rem;
  line-height: 1.8;
}

.mail { font-weight: 600; }

.contact-box form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.contact-box label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.contact-box .full { grid-column: 1 / -1; }

.contact-box input,
.contact-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0.8rem;
  font: inherit;
  background: var(--paper);
}

.contact-box button {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  background: var(--signal);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
}

.note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--signal-deep);
}

footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 2rem clamp(1.3rem, 4vw, 3rem) 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer strong {
  color: var(--ink);
  font-family: var(--display);
}

footer p:last-child { grid-column: 1 / -1; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .page-shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .rail.open-mobile {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(80vw, 280px);
    z-index: 40;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
  }
  .mobile-bar { display: flex; }
  .hero,
  .stat-row,
  .frame-cards,
  .aud-grid,
  .lib-grid,
  .contact-box {
    grid-template-columns: 1fr;
  }
  .prod ul { columns: 1; }
  .hero-doc { box-shadow: 10px 10px 0 rgba(214, 40, 40, 0.12); }
}

@media (max-width: 640px) {
  .contact-box form { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
  .method li { grid-template-columns: 1fr; }
  .method li::before { grid-row: 1; }
  .method p { grid-column: 1; }
}
