:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --surface-strong: #eee7dc;
  --ink: #15171a;
  --muted: #5c626a;
  --faint: #868074;
  --line: rgba(21, 23, 26, 0.12);
  --line-strong: rgba(21, 23, 26, 0.22);
  --accent: #0f766e;
  --accent-dark: #0b4f49;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --blue: #203a59;
  --shadow: 0 18px 60px rgba(21, 23, 26, 0.08);
  --radius: 22px;
  --max: 1160px;
  --gutter: clamp(22px, 5vw, 56px);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(15, 118, 110, 0.11), transparent 62%),
    radial-gradient(760px 480px at 88% 12%, rgba(32, 58, 89, 0.1), transparent 58%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background-image: linear-gradient(rgba(21, 23, 26, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(21, 23, 26, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: white; }
:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.38); outline-offset: 4px; border-radius: 10px; }

.shell {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 18px 0;
  backdrop-filter: blur(18px);
  background: rgba(246, 242, 234, 0.78);
  border-bottom: 1px solid rgba(21, 23, 26, 0.08);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: white;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.brand strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 13px;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: 999px;
}
.nav a:hover {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  text-decoration: none;
}
.nav .nav-cta {
  color: white;
  background: var(--ink);
  box-shadow: 0 8px 22px rgba(21, 23, 26, 0.12);
}
.nav .nav-cta:hover { color: white; background: var(--accent-dark); }

.section { padding-top: clamp(68px, 10vw, 118px); }
.section.compact { padding-top: clamp(54px, 8vw, 88px); }
.kicker {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
p, li, small { overflow-wrap: break-word; }
h1, h2, h3 {
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}
h1 {
  max-width: 760px;
  font-size: clamp(46px, 7.4vw, 90px);
  line-height: 0.98;
  font-weight: 780;
}
h2 {
  max-width: 12ch;
  font-size: clamp(36px, 5.5vw, 66px);
  line-height: 1;
  font-weight: 760;
}
h3 {
  font-size: clamp(22px, 2.2vw, 29px);
  line-height: 1.12;
  font-weight: 720;
}
.lead {
  margin: 24px 0 0;
  max-width: 58ch;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.32;
  color: #24282d;
  letter-spacing: -0.018em;
}
.support {
  margin: 16px 0 0;
  max-width: 63ch;
  color: var(--muted);
  font-size: 17px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(34px, 6vw, 78px);
  align-items: start;
  min-height: calc(100vh - 82px);
  padding-bottom: clamp(48px, 8vw, 86px);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 15px;
  font-weight: 760;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button.primary {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 14px 34px rgba(21, 23, 26, 0.16);
}
.button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary {
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
}
.button.secondary:hover { border-color: rgba(15, 118, 110, 0.42); box-shadow: 0 10px 26px rgba(15, 118, 110, 0.1); }
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
}
.proof li {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.system-card {
  margin-top: clamp(26px, 5vw, 58px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 253, 248, 0.74);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.card-head strong {
  margin-left: auto;
  color: var(--accent-dark);
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}
.flow-list {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}
.flow-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.flow-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.flow-list span {
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}
.flow-list b {
  display: block;
  color: var(--ink);
  line-height: 1.25;
}
.flow-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}
.section-head p:not(.kicker) {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 18px;
}
.section-head.split {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: end;
  gap: 28px;
}
.section-head.split h2 { max-width: 14ch; }

.service-grid, .project-grid, .method-grid {
  display: grid;
  gap: 18px;
}
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-card, .project-card, .architecture-card, .profile-card, .faq details, .final-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
}
.service-card {
  padding: 24px;
}
.service-card span {
  display: inline-block;
  margin-bottom: 36px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}
.service-card h3 { font-size: 24px; }
.service-card p, .project-card p, .profile-card p, .faq p {
  margin: 12px 0 0;
  color: var(--muted);
}

.project-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.project-card {
  min-height: 260px;
  padding: 26px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 18px 46px rgba(21, 23, 26, 0.09);
}
.project-card.featured {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 360px;
  background: linear-gradient(145deg, rgba(255, 253, 248, 0.94), rgba(229, 241, 238, 0.82));
}
.project-card:nth-child(4) { background: rgba(237, 240, 235, 0.7); }
.tag {
  margin: 0 0 14px !important;
  color: var(--accent-dark) !important;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mini-list {
  display: grid;
  gap: 8px;
  margin: 22px 0 4px;
  padding: 0;
  list-style: none;
}
.mini-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}
.mini-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.project-card a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--ink);
  font-weight: 780;
  text-decoration: underline;
  text-decoration-color: rgba(15, 118, 110, 0.45);
  text-underline-offset: 5px;
}
.project-card a:hover { color: var(--accent-dark); }

.method-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: stretch;
}
.architecture-card { padding: 14px; }
.arch-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 16px;
}
.arch-row + .arch-row { border-top: 1px solid var(--line); border-radius: 0; }
.arch-row span {
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.arch-row b {
  color: var(--ink);
  font-size: 17px;
}
.profile-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
}
.profile-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  filter: saturate(0.92) contrast(1.02);
}
.profile-card h3 { font-size: 28px; }

.faq { padding-top: clamp(54px, 8vw, 90px); }
.faq-list {
  display: grid;
  gap: 12px;
}
.faq details {
  padding: 20px 22px;
}
.faq summary {
  cursor: pointer;
  font-weight: 780;
  color: var(--ink);
}
.faq summary::marker { color: var(--accent-dark); }
.faq p { max-width: 76ch; }

.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  padding: clamp(28px, 5vw, 44px);
  margin-bottom: 36px;
  background: var(--ink);
  color: white;
  overflow: hidden;
}
.final-cta h2 {
  max-width: 15ch;
  color: white;
}
.final-cta .kicker { color: #87d1c9; }
.final-cta .button.primary {
  color: var(--ink);
  background: white;
  border-color: white;
  box-shadow: none;
}
.final-cta .button.primary:hover { color: white; background: var(--accent); border-color: var(--accent); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.site-footer p { margin: 0; }

@media (max-width: 980px) {
  .site-header { position: static; }
  .header-row { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; flex-wrap: wrap; }
  .hero, .section-head.split, .method-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; align-items: start; }
  h1 { max-width: 11.5ch; }
  .service-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { padding: 14px 0; }
  .brand { min-width: 0; }
  .brand small { max-width: 220px; }
  .nav { width: 100%; gap: 4px; font-size: 13px; }
  .nav a { min-height: 44px; padding: 8px 10px; }
  h1 { font-size: clamp(44px, 14vw, 66px); max-width: 100%; }
  h2 { max-width: 100%; }
  .lead { font-size: 20px; }
  .actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; white-space: normal; text-align: center; }
  .system-card { padding: 18px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; grid-row: auto; min-height: 0; }
  .project-card, .service-card { min-height: 0; padding: 22px; }
  .arch-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 10px; }
  .profile-card { grid-template-columns: 1fr; }
  .profile-card img { width: 86px; height: 86px; border-radius: 20px; }
  .final-cta { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
