:root {
  color-scheme: light;
  --paper: #f6f5ee;
  --ink: #182a23;
  --muted: #4d5d53;
  --green: #244c39;
  --green-deep: #192f25;
  --lime: #d8eb9c;
  --line: #d7ddd0;
  --white: #fffef9;
  --radius: 1.5rem;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.06; letter-spacing: -0.045em; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid #527f41; outline-offset: 4px; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--green-deep);
}
.wrap { width: min(72.5rem, calc(100% - 5rem)); margin-inline: auto; }
.section { padding-block: clamp(4.25rem, 9vw, 8rem); }
section[id] { scroll-margin-top: 1rem; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.header-inner { min-height: 5.25rem; }
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.55rem;
  font-size: 1.24rem;
  font-weight: 790;
  letter-spacing: -0.055em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  position: relative;
  width: 1.55rem;
  height: 1.55rem;
  flex: none;
  border-radius: 26%;
  background: var(--green);
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  width: 0.43rem;
  height: 0.43rem;
  border: 1px solid var(--lime);
  border-radius: 1px;
}
.brand-mark::before { top: 0.33rem; left: 0.33rem; }
.brand-mark::after { bottom: 0.33rem; right: 0.33rem; background: var(--lime); }
.brand-period { margin-inline-start: -0.52rem; color: #53713d; }
nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.65rem 1.5rem; }
nav a, .site-footer .footer-inner > a:last-child {
  font-size: 0.95rem;
  font-weight: 620;
  text-underline-offset: 0.25em;
}
nav a { text-decoration-color: transparent; }
nav a:hover { text-decoration-color: currentColor; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  font-size: 0.95rem;
  font-weight: 690;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { color: var(--white); background: var(--green-deep); }
.button-primary:hover { background: var(--green); }
.button-outline { border-color: #aab8ac; background: transparent; }
.button-outline:hover { background: #e8eddc; }
.header-action { min-height: 2.8rem; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1.04fr;
  align-items: center;
  gap: clamp(2rem, 5.4vw, 5rem);
  padding-block: clamp(3rem, 6vw, 6rem) clamp(3.75rem, 6.5vw, 6.5rem);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  margin-bottom: 1.05rem;
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.eyebrow > span { width: 0.6rem; height: 0.6rem; border-radius: 2px; background: #60804d; }
.hero h1 {
  max-width: 12ch;
  font-size: clamp(3.25rem, 6.2vw, 6.2rem);
  font-weight: 750;
  letter-spacing: -0.076em;
  line-height: 0.97;
}
.hero h1 em { color: var(--green); font-style: normal; }
.lead { max-width: 38ch; margin-top: 1.6rem; color: var(--muted); font-size: clamp(1.05rem, 1.55vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-actions { margin-top: 1.85rem; }
.hero-visual { display: grid; position: relative; align-items: end; min-width: 0; }
.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.12;
  object-fit: cover;
  object-position: 64% center;
  background: #9a8e71;
  border-radius: var(--radius);
}
.visual-link {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 0.9rem;
  border: 1px solid #ffffff25;
  border-radius: 0.85rem;
  color: var(--white);
  background: var(--green-deep);
  box-shadow: 0 0.5rem 1.4rem #14291f33;
  text-decoration: none;
}
.visual-link:hover strong { text-decoration: underline; text-underline-offset: 0.19em; }
.visual-link strong, .visual-link small { display: block; }
.visual-link strong { font-size: 0.9rem; }
.visual-link small { color: #d5e2d3; font-size: 0.8rem; }
.visual-icon {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.18rem;
  flex: none;
  width: 2.45rem;
  height: 2.45rem;
  padding-bottom: 0.7rem;
  border-radius: 0.55rem;
  background: var(--lime);
}
.visual-icon i { display: block; width: 0.24rem; border-radius: 2px; background: var(--green); }
.visual-icon i:nth-child(1) { height: 0.42rem; }
.visual-icon i:nth-child(2) { height: 0.66rem; }
.visual-icon i:nth-child(3) { height: 0.95rem; }

.section-heading { max-width: 49rem; margin-bottom: 2.25rem; }
h2 { font-size: clamp(2.35rem, 4.6vw, 4.2rem); font-weight: 740; }
h3 { font-size: clamp(1.55rem, 2.8vw, 2.4rem); font-weight: 720; }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.service-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: clamp(1.5rem, 4vw, 2.85rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.service-system { background: #e8efda; border-color: #d9e2cc; }
.card-label { margin-bottom: 1.35rem; color: var(--green); font-size: 0.875rem; font-weight: 720; }
.service-card h3 + p { max-width: 45ch; margin-top: 0.85rem; color: var(--muted); }
.service-card ul { display: grid; gap: 0.45rem; margin: 1.3rem 0 1.8rem; padding-inline-start: 1.15rem; }
.service-card li::marker { color: #5b784b; }
.service-card a { margin-top: auto; font-weight: 720; text-underline-offset: 0.26em; }

.portfolio { background: #edf0e5; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.portfolio-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.portfolio-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: clamp(0.5rem, 2vw, 1.2rem);
  cursor: zoom-in;
}
.portfolio-preview:focus-visible { outline-offset: -4px; }
.portfolio-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 0.3rem 0.65rem #182a2326);
}
.preview-violet { background: #ebe6f7; }
.preview-blue { background: #e5ebf6; }
.preview-teal { background: #e3efee; }
.preview-green { background: #e0eee4; }
.portfolio-copy { padding: 1.15rem clamp(1rem, 3vw, 1.65rem) 1.45rem; }
.portfolio-copy h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
.portfolio-copy p { margin-top: 0.45rem; color: var(--muted); }

.demo { color: var(--white); background: var(--green-deep); }
.demo-inner, .contact-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: clamp(2rem, 6vw, 5.5rem); }
.demo .eyebrow { color: var(--lime); }
.demo-copy > p:last-child, .contact-copy > p { max-width: 42ch; margin-top: 1.05rem; }
.demo-copy > p:last-child { color: #d3dfd4; }
.dashboard {
  min-width: 0;
  padding: clamp(1rem, 3.6vw, 2.1rem);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.dashboard-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; }
.dashboard-header h3 { font-size: clamp(1.4rem, 2.6vw, 1.95rem); }
.dashboard-label { margin-bottom: 0.32rem; color: var(--muted); font-size: 0.84rem; font-weight: 650; }
.period-controls { display: flex; gap: 0.25rem; padding: 0.24rem; border-radius: 0.65rem; background: #eef1e8; }
.period-controls button {
  min-height: 2.35rem;
  padding: 0.35rem 0.65rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 680;
  cursor: pointer;
}
.period-controls button[aria-pressed="true"] { color: var(--white); background: var(--green); }
.period-controls button[aria-pressed="false"]:hover { background: #dfe8d6; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-block: 1.2rem 1.4rem; }
.metrics > div { padding: 0.7rem; border-radius: 0.75rem; background: #eef1e8; }
.metrics dt { color: var(--muted); font-size: 0.83rem; font-weight: 650; }
.metrics dd { margin-top: 0.25rem; font-size: clamp(1rem, 2.05vw, 1.55rem); font-weight: 760; letter-spacing: -0.06em; }
.metrics dd span { font-size: 0.78rem; font-weight: 610; letter-spacing: normal; }
.chart { padding: 0.9rem 0.85rem 2.15rem; border: 1px solid var(--line); border-radius: 0.75rem; }
.chart figcaption { font-size: 0.9rem; font-weight: 680; }
.chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: clamp(0.35rem, 1.4vw, 0.8rem);
  height: 7.2rem;
  margin-top: 0.8rem;
  padding-inline: 0.45rem;
  background: repeating-linear-gradient(to top, #dbe1d6 0 1px, transparent 1px 25%);
}
.chart-column { display: flex; align-items: end; justify-content: center; position: relative; height: 100%; }
.chart-column span { position: absolute; bottom: -1.55rem; white-space: nowrap; color: var(--muted); font-size: 0.75rem; font-weight: 640; }
.chart-bar { width: min(100%, 3.25rem); height: var(--bar-height); border-radius: 0.33rem 0.33rem 0 0; background: #96af70; }
.chart-bar.is-peak { background: var(--green); }

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  counter-reset: process;
  list-style: none;
  margin: 0;
  padding: 0;
}
.process-list li { counter-increment: process; border-top: 1px solid var(--line); padding-top: 1.15rem; }
.process-list li::before { content: counter(process) "."; display: block; margin-bottom: 0.8rem; color: var(--green); font-weight: 740; }
.process-list h3 { font-size: clamp(1.25rem, 2.1vw, 1.65rem); letter-spacing: -0.035em; }
.process-list p { margin-top: 0.6rem; color: var(--muted); }

.contact { background: #e8efda; }
.contact-inner { align-items: start; }
.contact-copy { padding-top: 0.6rem; }
.contact-copy > p { color: var(--muted); }
.contact-card { min-width: 0; padding: clamp(1.05rem, 3.5vw, 2rem); border: 1px solid #d9e2cc; border-radius: var(--radius); background: var(--white); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; font-weight: 680; }
input, select, textarea { display: block; width: 100%; min-height: 2.85rem; margin-bottom: 1rem; padding: 0.6rem 0.72rem; border: 1px solid #aebaae; border-radius: 0.55rem; color: var(--ink); background: #fff; }
textarea { resize: vertical; }
textarea::placeholder { color: #5c695f; }
.contact-copy h1 { font-size: clamp(3rem, 6.8vw, 6.25rem); letter-spacing: -0.07em; }
.contact-channels { display: grid; gap: 0.9rem; margin-top: 1.9rem; }
.contact-channels > div { border-top: 1px solid #c9d6bb; padding-top: 0.8rem; }
.contact-channels dt { color: var(--muted); font-size: 0.9rem; font-weight: 680; }
.contact-channels a { font-size: 1.1rem; font-weight: 690; overflow-wrap: anywhere; text-underline-offset: 0.2em; }
.form-heading { margin-bottom: 1.1rem; font-size: clamp(1.65rem, 3vw, 2.3rem); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset:disabled .button { opacity: 0.7; cursor: wait; }
.form-status:not(:empty) { margin-top: 0.85rem; color: var(--green); }
.form-status.form-error { color: #8a3428; }
.form-fallback { margin-top: 0.75rem; }
.landing-contact { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; }

.site-footer { padding-block: 1.7rem; }

@media (max-width: 57rem) {
  .wrap { width: min(100% - 3rem, 72.5rem); }
  .hero { gap: 1.75rem; }
  .hero h1 { font-size: clamp(2.85rem, 7vw, 4.8rem); }
  .demo-inner, .contact-inner { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: auto; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; padding-block: 0.8rem; }
  nav { order: 1; width: 100%; justify-content: flex-start; }
  nav a { display: inline-flex; align-items: center; min-height: 2.25rem; }
  .header-action { min-height: 2.55rem; padding-inline: 0.75rem; font-size: 0.875rem; }
  .hero, .service-grid, .portfolio-grid, .process-list { grid-template-columns: 1fr; }
  .hero h1 { max-width: 13ch; }
  .hero-visual img { aspect-ratio: 1.24; }
  .process-list { gap: 1.15rem; }
}

@media (max-width: 30rem) {
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .metrics > div { padding: 0.58rem 0.48rem; }
  .metrics dd span { display: block; }
}

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