:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #182026;
  --muted: #4d565f;

  --accent: #1f4d3a;
  --accent-dark: #173d2f;
  --accent-soft: rgba(31, 77, 58, 0.08);

  --accent-2: #b78942;
  --accent-2-dark: #a57836;
  --accent-2-soft: rgba(183, 137, 66, 0.14);

  --line: #dcd5c8;
  --shadow: 0 12px 30px rgba(24, 32, 38, 0.06);
  --radius: 18px;

  --container: 1160px;
  --section-pad: 64px;
  --cap-height: 64px;
  --inner-pad: 28px;
  --field-pad: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--cap-height) + 16px);
  font-size: 100%;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  background: var(--line);
}

figure {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(31, 77, 58, 0.35);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-2-soft);
  color: var(--text);
}

.page {
  overflow: clip;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.block {
  padding: var(--section-pad) 0;
  scroll-margin-top: calc(var(--cap-height) + 16px);
}

.section-head {
  max-width: none;
  margin: 0 0 26px;
}

.section-head p,
.problem-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
  max-width: 1000px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding-inline: var(--inner-pad);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

h1,
h2,
h3 {
  margin: 0 0 18px;
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
}

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

p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.08rem;
}

.lead {
  font-size: 1.22rem;
  color: var(--text);
  line-height: 1.55;
}

.quiet {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.08rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.button-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

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

/* Site cap */
.site-cap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--cap-height);
  background: rgba(246, 244, 239, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-cap.is-scrolled {
  background: rgba(246, 244, 239, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(24, 32, 38, 0.04);
}

.cap-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--accent);
}

.cap-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.cap-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  padding: 14px 20px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 30px rgba(24, 32, 38, 0.06);
}

.cap-menu.is-open {
  display: grid;
  gap: 6px;
}

.cap-link {
  position: relative;
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.2;
}

.cap-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.cap-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Soft side rail */
.section-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
}

.rail-items {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.rail-item {
  display: block;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: rgba(31, 77, 58, 0.14);
  transition:
    height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.5s ease,
    box-shadow 0.5s ease,
    opacity 0.5s ease;
}

.rail-item.is-active {
  height: 34px;
  background: rgba(31, 77, 58, 0.38);
  box-shadow: 0 0 0 4px rgba(31, 77, 58, 0.05);
  animation: rail-soft 2.8s ease-in-out infinite;
}

@keyframes rail-soft {
  0%,
  100% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
}

.rail-meta {
  margin-top: 14px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(24, 32, 38, 0.32);
}

.rail-sep {
  margin: 0 4px;
  color: rgba(24, 32, 38, 0.2);
}

.rail-total {
  color: rgba(24, 32, 38, 0.24);
}

/* Hero */
.hero {
  padding-top: calc(var(--section-pad) + var(--cap-height));
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  gap: 20px;
}

.hero-copy {
  padding: var(--inner-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.hero-points li {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.media {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.problem {
  background: var(--surface);
}

.solution {
  background: var(--bg);
}

.cases {
  background: var(--surface);
}

.performance {
  background: var(--bg);
}

.pipeline {
  background: var(--surface);
}

.integrations {
  background: var(--bg);
}

.reports {
  background: var(--surface);
}

.cta {
  background: linear-gradient(135deg, #10241d 0%, #1f4d3a 100%);
  color: #f7f5f0;
}

.cta .eyebrow {
  color: #e9d3ae;
}

.cta .eyebrow::after {
  background: rgba(255, 255, 255, 0.22);
}

.split-grid {
  display: grid;
  gap: 20px;
  align-items: stretch;
}

.split-grid .copy {
  order: 1;
}

.split-grid .media {
  order: 2;
}

.copy {
  padding: var(--inner-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.copy .section-head {
  margin-bottom: 18px;
}

.copy p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.card {
  padding: var(--inner-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.58;
}

.case-card {
  position: relative;
  padding-top: var(--inner-pad);
}

.problem-lead {
  font-size: 1.22rem;
  color: var(--muted);
  line-height: 1.55;
}

.problem .section-head,
.cases .section-head {
  padding-inline: var(--inner-pad);
}

.problem-panel {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.problem-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.problem-item {
  padding: var(--inner-pad);
  background: var(--surface);
}

.problem-item h3 {
  font-size: 1.22rem;
  margin-bottom: 12px;
  color: var(--text);
}

.problem-item p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.58;
}

.checklist {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.55;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px var(--accent-2-soft);
}

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

.steps li {
  position: relative;
  padding-left: 44px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.55;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.cta-grid {
  display: grid;
  gap: 20px;
  align-items: stretch;
}

.cta-copy {
  padding: var(--inner-pad);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-copy h2 {
  color: #fff;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  margin-bottom: 18px;
}

.cta-copy .lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.22rem;
  line-height: 1.55;
}

.cta-copy .quiet {
  color: #e9d3ae;
  margin-top: 18px;
  font-size: 1.08rem;
}

.cta-points {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.55;
}

.cta-points li {
  position: relative;
  padding-left: 28px;
}

.cta-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
}

.form {
  margin: 0;
  max-width: none;
  padding: var(--inner-pad);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  font-weight: 500;
  padding-left: calc(var(--field-pad) + 1px);
  padding-right: calc(var(--field-pad) + 1px);
}

input,
textarea {
  width: 100%;
  padding: 14px var(--field-pad);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}

.form-status {
  margin: 0;
  min-height: 1.2em;
  color: #f0d7ab;
  font-size: 1rem;
}

.form-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
  padding-left: calc(var(--field-pad) + 1px);
}

.form .button {
  margin-left: auto;
  min-height: 56px;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--accent-2), #d1a55c);
  border: 1px solid rgba(24, 32, 38, 0.08);
  box-shadow:
    0 12px 24px rgba(183, 137, 66, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  position: relative;
}

.form .button::after {
  content: "→";
  margin-left: 10px;
  transition: transform 0.2s ease;
}

.form .button:hover {
  background: linear-gradient(135deg, var(--accent-2-dark), #b78942);
  border-color: rgba(24, 32, 38, 0.12);
}

.form .button:hover::after {
  transform: translateX(4px);
}

.cta a:focus-visible,
.cta button:focus-visible,
.cta input:focus-visible,
.cta textarea:focus-visible,
.cta select:focus-visible {
  outline-color: rgba(255, 255, 255, 0.65);
}

.footer-note {
  margin: 28px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button {
    transition: none;
  }

  .rail-item.is-active {
    animation: none;
  }
}

/* Smartphones */
@media (max-width: 479px) {
  :root {
    --section-pad: 48px;
    --cap-height: 56px;
    --inner-pad: 20px;
  }

  .container {
    width: min(100% - 28px, var(--container));
  }

  .hero-copy,
  .copy,
  .cta-copy,
  .form {
    padding: var(--inner-pad);
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .form .button {
    width: auto;
    min-width: 220px;
  }
}

/* Small phones / large phones */
@media (min-width: 480px) {
  :root {
    --section-pad: 56px;
    --inner-pad: 24px;
  }
}

/* Tablets portrait */
@media (min-width: 700px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .field-full {
    grid-column: 1 / -1;
  }
}

/* Tablets landscape / notebooks */
@media (min-width: 768px) {
  :root {
    --section-pad: 72px;
    --inner-pad: 32px;
  }

  .media {
    min-height: 420px;
  }
}

/* Desktop */
@media (min-width: 900px) {
  :root {
    --section-pad: 76px;
    --inner-pad: 36px;
  }

  .split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px;
    min-height: 520px;
  }

  .split-grid .media {
    min-height: 520px;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 44px;
    align-items: stretch;
    min-height: 520px;
  }

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

  .cta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    min-height: 520px;
  }

  .cta-grid .form {
    height: 100%;
  }
}

/* Desktop nav */
@media (min-width: 1160px) {
  .cap-toggle {
    display: none;
  }

  .cap-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .cap-link {
    padding: 8px 2px;
    border-radius: 0;
    background: transparent;
    white-space: nowrap;
  }

  .cap-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 1px;
    background: var(--accent);
    opacity: 0.65;
    transition: right 0.3s ease;
  }

  .cap-link:hover::after {
    right: 20%;
  }

  .cap-link.is-active {
    background: transparent;
  }

  .cap-link.is-active::after {
    right: 0;
  }
}

/* Side rail visibility */
@media (min-width: 1200px) {
  .section-rail {
    display: block;
  }
}

/* Desktop high resolution */
@media (min-width: 1360px) {
  html {
    font-size: 106.25%;
  }

  :root {
    --container: 1240px;
    --section-pad: 88px;
    --cap-height: 72px;
    --inner-pad: 40px;
  }

  h1 {
    font-size: clamp(2.35rem, 4vw, 3.6rem);
  }

  h2 {
    font-size: clamp(1.85rem, 2.8vw, 2.7rem);
  }

  .section-head p,
  .problem-lead {
    font-size: 1.18rem;
  }

  .lead {
    font-size: 1.28rem;
  }

  .split-grid {
    min-height: 580px;
  }

  .split-grid .media {
    min-height: 580px;
  }

  .hero-grid {
    min-height: 580px;
  }

  .hero-media {
    min-height: 580px;
  }

  .cta-grid {
    min-height: 580px;
  }
}

/* Very high resolution desktop */
@media (min-width: 1920px) {
  html {
    font-size: 112.5%;
  }

  :root {
    --container: 1320px;
    --section-pad: 104px;
    --cap-height: 76px;
    --inner-pad: 44px;
  }

  h1 {
    font-size: clamp(2.5rem, 3.4vw, 3.8rem);
  }

  h2 {
    font-size: clamp(1.95rem, 2.5vw, 2.85rem);
  }

  .section-head p,
  .problem-lead {
    font-size: 1.24rem;
  }

  .lead {
    font-size: 1.34rem;
  }

  .split-grid {
    min-height: 640px;
  }

  .split-grid .media {
    min-height: 640px;
  }

  .hero-grid {
    min-height: 640px;
  }

  .hero-media {
    min-height: 640px;
  }

  .cta-grid {
    min-height: 640px;
  }

  .section-rail {
    right: 28px;
  }
}
