:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #53606c;
  --line: rgba(23, 32, 42, 0.16);
  --panel: rgba(255, 255, 255, 0.92);
  --blue: #0b66c3;
  --green: #147447;
  --gold: #9a6200;
  --rose: #b33d51;
  --bg: #f6f8fb;
  --wash: #eaf2ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  overflow-wrap: anywhere;
}

p,
li,
dd,
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

main,
section,
article,
div,
dl,
ol,
ul {
  min-width: 0;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 74% 28%, rgba(11, 102, 195, 0.2), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f4f8ff 46%, #e9f1fb 100%);
}

#swarm-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72) 52%, rgba(255, 255, 255, 0.44)),
    linear-gradient(0deg, rgba(246, 248, 251, 0.88), rgba(246, 248, 251, 0.22) 55%, rgba(255, 255, 255, 0.82));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 84px 0 120px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.7rem, 8.4vw, 7.1rem);
  line-height: 0.92;
  font-weight: 780;
}

.hero__lead {
  max-width: 780px;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.hero__actions,
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.project-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.project-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.project-nav a:hover {
  text-decoration: underline;
}

.hero__actions a,
.contact__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
}

.hero__actions a:first-child {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.inline-link,
.backlink {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.inline-link:hover,
.backlink:hover,
.hero__actions a:hover,
.contact__links a:hover {
  text-decoration: underline;
}

.hero__status {
  position: absolute;
  z-index: 2;
  left: max(20px, calc((100vw - 920px) / 2));
  bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__status span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 0.86rem;
}

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

.subhero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 22%, rgba(11, 102, 195, 0.16), transparent 28%),
    linear-gradient(135deg, #ffffff, var(--wash) 54%, #f6f8fb);
}

.section__inner {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 78px 0;
}

.section h2 {
  margin-bottom: 26px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

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

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 48px;
}

.signal-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.signal-list div,
.work-item,
.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.06);
}

.signal-list div {
  padding: 18px;
}

.signal-list dt {
  margin-bottom: 4px;
  color: var(--green);
  font-weight: 800;
}

.signal-list dd {
  margin: 0;
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: -8px 0 22px;
}

.proof-strip a {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.05);
}

.proof-strip strong {
  color: var(--blue);
}

.proof-strip span {
  color: var(--muted);
  font-size: 0.95rem;
}

.work-item {
  padding: 24px;
}

.work-item p {
  color: var(--muted);
}

.work-item h3,
.timeline h3 {
  color: var(--ink);
}

.work-item ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.work-item li + li {
  margin-top: 8px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline article {
  padding: 22px;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
}

.timeline time {
  color: var(--rose);
  font-weight: 800;
}

.timeline h3,
.timeline p {
  grid-column: 2;
}

.timeline h3 {
  margin-bottom: 8px;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.contact__links {
  justify-content: flex-end;
}

.flow-block {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 42px;
  align-items: start;
}

.project-detail {
  display: grid;
  gap: 28px;
}

.project-detail__header {
  max-width: 860px;
}

.project-detail__header h2 {
  margin-bottom: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  gap: 14px;
}

.detail-grid article {
  min-height: 168px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.055);
}

.detail-grid h3 {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 1.02rem;
}

.detail-grid p {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.flow {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
  gap: 10px;
  list-style: none;
  counter-reset: flow-step;
}

.flow--four {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.flow li {
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  counter-increment: flow-step;
  min-width: 0;
}

.flow li::before {
  content: counter(flow-step, decimal-leading-zero);
  display: block;
  margin-bottom: 24px;
  color: var(--gold);
  font-weight: 900;
  font-size: 0.82rem;
}

.flow strong,
.flow span {
  display: block;
}

.flow strong {
  margin-bottom: 8px;
}

.flow span {
  color: var(--muted);
  font-size: 0.94rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

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

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

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

@media (max-width: 820px) {
  .hero {
    min-height: 88vh;
  }

  .hero__content {
    padding-top: 70px;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 4.1rem);
    line-height: 0.98;
  }

  .hero__actions a,
  .contact__links a,
  .project-nav a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .intro-grid,
  .work-grid,
  .timeline article,
  .flow-block,
  .contact {
    grid-template-columns: 1fr;
    display: grid;
  }

  .flow,
  .flow--four {
    grid-template-columns: 1fr;
  }

  .timeline h3,
  .timeline p {
    grid-column: 1;
  }
}
