:root {
  --milk: #fffcef;
  --paper: #f5eddd;
  --olive: #7d9176;
  --olive-deep: #61735d;
  --green: #0a3b2d;
  --burgundy: #7d0c17;
  --line: rgba(10, 59, 45, 0.18);
  --muted: #607067;
  --shadow: 0 24px 70px rgba(30, 42, 34, 0.13);
  --sans: "Onest", Arial, sans-serif;
  --serif: "Forum", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--green);
  background-color: var(--milk);
  background-image:
    linear-gradient(rgba(10, 59, 45, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 59, 45, 0.045) 1px, transparent 1px);
  background-size: 20vw 20vw;
  font-family: var(--sans);
  overflow-x: hidden;
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--milk);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: relative;
  z-index: 20;
  width: min(92vw, 1720px);
  min-height: 76px;
  margin: 18px auto 0;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 252, 239, .92);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(30, 42, 34, .08);
  backdrop-filter: blur(12px);
}
.brand {
  font: 32px/1 var(--serif);
  text-decoration: none;
  letter-spacing: .02em;
}
.site-nav { display: flex; gap: clamp(22px, 3vw, 54px); }
.site-nav a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--burgundy); }
.site-menu-toggle { display: none; }
html { scroll-padding-top: 92px; }
main section[id], footer[id] { scroll-margin-top: 92px; }

.section-shell {
  width: min(92vw, 1720px);
  margin-inline: auto;
}
.section-marker, .eyebrow, .project__number {
  margin: 0;
  color: var(--burgundy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 16px; }
h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}
h1 { font-size: clamp(68px, 7.2vw, 132px); line-height: .88; letter-spacing: -.035em; }
h1 span { display: block; white-space: nowrap; }
h2 { font-size: clamp(54px, 5vw, 92px); line-height: .98; letter-spacing: -.025em; }

.hero {
  min-height: calc(100vh - 94px);
  padding: clamp(70px, 9vh, 130px) 3vw 70px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(560px, 1.08fr);
  align-items: center;
  gap: 5vw;
}
.hero__copy { position: relative; z-index: 2; }
.hero__copy .section-marker { margin-bottom: 50px; }
.hero__lead {
  max-width: 760px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 1.35vw, 25px);
  line-height: 1.55;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.button {
  min-height: 58px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-3px); }
.button--primary { color: var(--milk); background: var(--green); }
.button--outline { background: transparent; }
.button--light { color: var(--green); background: var(--milk); border-color: var(--milk); }

.hero__visual {
  position: relative;
  min-height: min(700px, 72vh);
}
.visual-sheet {
  position: absolute;
  margin: 0;
  padding: 14px;
  background: var(--milk);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.visual-sheet img { width: 100%; height: 100%; object-fit: cover; }
.visual-sheet figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 12px;
  color: var(--milk);
  background: var(--burgundy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.visual-sheet--kasper {
  z-index: 2;
  top: 3%;
  right: 0;
  width: 79%;
  aspect-ratio: 3 / 2;
  transform: rotate(1.7deg);
}
.visual-sheet--constructor {
  z-index: 3;
  left: 1%;
  bottom: 4%;
  width: 60%;
  aspect-ratio: 3 / 2;
  transform: rotate(-3.2deg);
}
.hero__note {
  position: absolute;
  z-index: 4;
  right: 2%;
  bottom: 12%;
  padding: 18px 22px;
  color: var(--milk);
  background: var(--olive-deep);
  font: 29px/1.05 var(--serif);
  transform: rotate(2deg);
}

.automation, .examples { padding: clamp(110px, 13vw, 210px) 0; }
.section-heading {
  display: grid;
  grid-template-columns: 25% 1fr;
  gap: 5%;
  align-items: start;
  margin-bottom: clamp(64px, 8vw, 120px);
}
.section-heading h2 { max-width: 1100px; }

.automation-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
  align-items: start;
}
.automation-card {
  min-height: 330px;
  padding: clamp(30px, 3vw, 52px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: rgba(255, 252, 239, .94);
  box-shadow: 0 18px 45px rgba(30, 42, 34, .07);
}
.automation-card > span {
  color: var(--burgundy);
  font-size: 13px;
  font-weight: 700;
}
.automation-card h3 {
  margin: auto 0 22px;
  font-size: clamp(38px, 3.2vw, 58px);
  line-height: .98;
}
.automation-card p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.automation-card--bot { grid-column: 1 / span 5; background: var(--olive); color: var(--milk); }
.automation-card--bot p, .automation-card--bot > span { color: var(--milk); }
.automation-card--docs { grid-column: 6 / span 7; margin-top: 90px; }
.automation-card--knowledge { grid-column: 2 / span 6; }
.automation-card--services { grid-column: 8 / span 5; margin-top: -30px; background: var(--paper); }

.examples { border-top: 1px solid var(--line); }
.project {
  min-height: 760px;
  margin-bottom: clamp(120px, 14vw, 220px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
  gap: 5vw;
  align-items: center;
}
.project:last-child { margin-bottom: 0; }
.project__media {
  position: relative;
  min-width: 0;
  background: rgba(125, 145, 118, .13);
  border: 1px solid var(--line);
}
.project__media--collage { min-height: 720px; padding: 5%; }
.project__cover {
  width: 83%;
  height: auto;
  box-shadow: var(--shadow);
}
.project__chat {
  position: absolute;
  width: 23%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border: 8px solid var(--milk);
  box-shadow: var(--shadow);
}
.project__chat--one { right: 6%; top: 7%; transform: rotate(3deg); }
.project__chat--two { right: 20%; bottom: 5%; transform: rotate(-3deg); }
.project__copy { max-width: 650px; }
.project__copy h3 {
  margin: 25px 0 48px;
  font-size: clamp(50px, 4.4vw, 82px);
  line-height: .98;
}
.project__facts { margin: 0; }
.project__facts div {
  padding: 20px 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  border-top: 1px solid var(--line);
}
.project__facts dt {
  color: var(--burgundy);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.project__facts dd, .project__steps {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.text-button {
  margin-top: 34px;
  padding: 0 0 8px;
  color: var(--burgundy);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  font: 700 13px/1 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.text-button:hover, .text-button:focus-visible { color: var(--green); }
.project--constructor { grid-template-columns: minmax(430px, .88fr) minmax(0, 1.12fr); }
.project__steps { padding-left: 1.4em; }
.project__steps li { padding: 13px 0; border-top: 1px solid var(--line); }
.project__media--single { padding: 6%; }
.project__media--single img { width: 100%; height: auto; box-shadow: var(--shadow); }
.project__caption {
  position: absolute;
  right: -3%;
  bottom: -7%;
  padding: 22px 26px;
  color: var(--milk);
  background: var(--olive-deep);
  font: 26px/1.1 var(--serif);
}

.contact {
  padding: clamp(80px, 10vw, 150px) clamp(28px, 6vw, 100px) 28px;
  color: var(--milk);
  background: var(--olive-deep);
}
.contact__copy { max-width: 1250px; }
.contact .section-marker { color: var(--milk); }
.contact h2 { margin: 46px 0 30px; }
.contact h2 span { display: block; white-space: nowrap; }
.contact__copy > p:not(.section-marker) {
  max-width: 950px;
  margin: 0 0 34px;
  font-size: clamp(18px, 1.35vw, 23px);
  line-height: 1.55;
}
.footer {
  margin-top: clamp(80px, 9vw, 130px);
  padding: 32px 0 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px 48px;
  align-items: start;
  border-top: 1px solid rgba(255, 252, 239, .35);
  font-size: 14px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__brand strong {
  font: 30px/1 var(--serif);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
  max-width: 760px;
}

.footer__links a {
  font-size: 14px;
  text-decoration: none;
}

.footer__legal {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 14px 24px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 252, 239, .18);
  font-size: 12px;
}

.footer a {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.project-dialog {
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--green);
  background: var(--milk);
  border: 1px solid var(--line);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .35);
}
.project-dialog::backdrop { background: rgba(3, 20, 15, .74); backdrop-filter: blur(7px); }
.dialog__inner { position: relative; padding: clamp(32px, 5vw, 72px); }
.dialog__close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 46px;
  height: 46px;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
}
.project-dialog h2 {
  max-width: 880px;
  margin: 22px 0 42px;
  font-size: clamp(48px, 5vw, 76px);
}
.dialog__layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items: start; }
.dialog__layout img { width: 100%; max-height: 58vh; object-fit: contain; background: var(--paper); }
.dialog__layout p, .dialog__layout li { color: var(--muted); font-size: 17px; line-height: 1.55; }
.dialog__layout ul { padding-left: 1.2em; }

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 4px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 30px; }
  .hero__visual { min-height: 560px; }
  .section-heading { grid-template-columns: 18% 1fr; }
  .project, .project--constructor { grid-template-columns: 1fr 1fr; gap: 36px; }
  .project__media--collage { min-height: 600px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 82px; }
  main section[id], footer[id] { scroll-margin-top: 82px; }
  body { background-size: 50vw 50vw; }
  .site-header {
    position: sticky;
    top: 8px;
    min-height: 64px;
    padding: 0 18px;
    margin-top: 8px;
    overflow: visible;
  }
  .brand { font-size: 25px; }
  .site-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--green);
    background: transparent;
    border: 1px solid rgba(7, 63, 49, .28);
    border-radius: 999px;
    font: 700 11px/1 var(--sans);
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    max-height: calc(100svh - 96px);
    padding: 8px;
    overflow-y: auto;
    background: rgba(255, 252, 239, .98);
    border: 1px solid rgba(7, 63, 49, .14);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(48, 38, 28, .16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .site-nav a { display: block; width: 100%; padding: 13px 14px; border-bottom: 1px solid rgba(7, 63, 49, .1); font-size: 12px; }
  .site-nav a:last-child { border-bottom: 0; }
  .section-shell { width: calc(100vw - 24px); }
  .hero {
    min-height: auto;
    padding: 64px 10px 90px;
    grid-template-columns: 1fr;
  }
  .hero__copy .section-marker { margin-bottom: 28px; }
  h1 { font-size: clamp(54px, 16vw, 72px); }
  .hero__lead { font-size: 17px; }
  .hero__actions { flex-direction: column; }
  .button { width: 100%; }
  .hero__visual { min-height: 430px; margin-top: 28px; }
  .visual-sheet { padding: 7px; }
  .visual-sheet--kasper { width: 91%; }
  .visual-sheet--constructor { width: 72%; bottom: 2%; }
  .hero__note { right: 0; bottom: 7%; padding: 11px 14px; font-size: 20px; }
  .automation, .examples { padding: 95px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 48px; }
  h2 { font-size: clamp(48px, 13vw, 62px); }
  .automation-grid { display: block; }
  .automation-card {
    min-height: 280px;
    margin: 0 0 12px;
    padding: 28px;
  }
  .automation-card h3 { font-size: 43px; }
  .project, .project--constructor {
    min-height: auto;
    margin-bottom: 110px;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .project--constructor .project__copy { order: 2; }
  .project--constructor .project__media { order: 1; }
  .project__media--collage { min-height: 510px; }
  .project__cover { width: 96%; }
  .project__chat { width: 29%; height: auto; max-height: none; object-fit: contain; border-width: 4px; }
  .project__chat--two { right: 8%; }
  .project__copy h3 { margin: 20px 0 36px; font-size: 50px; }
  .project__facts div { grid-template-columns: 82px 1fr; }
  .project__caption { right: 0; bottom: -12%; font-size: 20px; }
  .contact { padding: 68px 24px 24px; }
  .contact h2 span { white-space: normal; }
  .contact h2 { font-size: 51px; }
  .contact__copy > p:not(.section-marker) br { display: none; }
  .footer { grid-template-columns: 1fr; gap: 24px; }
  .footer__links, .footer__legal { justify-content: flex-start; }
  .footer__links { flex-direction: column; }
  .dialog__inner { padding: 66px 22px 28px; }
  .project-dialog h2 { font-size: 46px; }
  .dialog__layout { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.brand-logo-img { display: block; width: auto; max-width: 180px; height: clamp(18px, 1.5vw, 24px); object-fit: contain; }
.brand-logo-img--footer { width: min(180px, 100%); max-width: 180px; height: auto; }
