:root {
  --bg: #f7f8f4;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-muted: #eef1eb;
  --text: #171916;
  --muted: #626a5f;
  --line: rgba(23, 25, 22, 0.12);
  --line-strong: rgba(23, 25, 22, 0.22);
  --accent: #2f6f5e;
  --accent-strong: #174f44;
  --accent-soft: #dceae4;
  --warn: #a36c24;
  --shadow: 0 24px 64px rgba(24, 28, 20, 0.10);
  --shadow-soft: 0 12px 30px rgba(24, 28, 20, 0.08);
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1120px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
  --bg: #10120f;
  --surface: rgba(27, 31, 26, 0.78);
  --surface-solid: #191d18;
  --surface-muted: #222820;
  --text: #f3f5ef;
  --muted: #a6aea1;
  --line: rgba(243, 245, 239, 0.13);
  --line-strong: rgba(243, 245, 239, 0.24);
  --accent: #8bc9b4;
  --accent-strong: #c8eadc;
  --accent-soft: #1d3831;
  --warn: #d4a05a;
  --shadow: 0 28px 72px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 50%, transparent), transparent 340px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.18), transparent 580px);
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.shell { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }

.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--max), calc(100% - 24px));
  margin: 12px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 740;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
  flex: 0 0 auto;
}

.links { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; }
.links a { padding: 8px 10px; border-radius: var(--radius-sm); }
.links a:hover, .links a.active { color: var(--text); background: var(--surface-muted); }
.actions { display: flex; align-items: center; gap: 8px; }

.icon-button,
.button {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
  border-radius: 12px;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
}

.button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 680;
}

.button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button:hover, .icon-button:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.kbd {
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 7px;
  padding: 2px 6px;
  color: var(--muted);
  background: var(--surface-solid);
  font-size: 12px;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: 76px 0 46px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 42px;
  align-items: center;
}

.page-hero {
  padding: 82px 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 720;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s infinite;
}

h1 {
  margin: 18px 0;
  font-size: clamp(46px, 7vw, 86px);
  line-height: .97;
  letter-spacing: 0;
  max-width: 820px;
}

.page-hero h1 {
  font-size: clamp(42px, 6vw, 72px);
}

.lead {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
  max-width: 720px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.phone-card {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 72% 14%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: hidden;
}

.phone-shell {
  width: 250px;
  margin: 14px auto 0;
  padding: 10px;
  border-radius: 34px;
  background: #111;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  transform: rotate(-3deg);
}

.phone-screen {
  min-height: 480px;
  border-radius: 25px;
  background: var(--bg);
  color: var(--text);
  padding: 18px;
  overflow: hidden;
}

.mini-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mini-title { font-weight: 780; font-size: 22px; }
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-list { display: grid; gap: 10px; }
.mini-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 780;
}

.mini-name { font-weight: 720; }
.mini-meta { color: var(--muted); font-size: 12px; line-height: 1.35; }

.section { padding: 84px 0; }
.section.compact { padding: 56px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin-bottom: 22px;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 780px;
}

.section-copy {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 650px;
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); }

.document {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(14px);
  padding: 10px;
}

.toc a {
  display: block;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
}

.toc a:hover, .toc a.active { color: var(--text); background: var(--surface-muted); }
.doc-body { display: grid; gap: 18px; }
.doc-card h3 { font-size: 26px; margin-bottom: 14px; }
.doc-card h4 { margin: 24px 0 8px; font-size: 17px; }
.doc-card p { margin: 0 0 14px; color: var(--muted); }
.doc-card ul, .doc-card ol { margin: 8px 0 18px; padding-left: 20px; color: var(--muted); }
.doc-card li { margin: 6px 0; }
.effective { margin-bottom: 18px; color: var(--muted); }

.contact-layout {
  width: min(760px, 100%);
}

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

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  font: inherit;
  font-weight: 500;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 180px;
}

.field input:focus,
.field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-status.error {
  color: #a33b3b;
}

.form-status.success {
  color: var(--accent-strong);
}

.callout {
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--muted);
  margin: 18px 0;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.copyright-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  color: var(--muted);
  padding: 10px 16px;
  box-shadow: 0 -8px 24px rgba(24, 28, 20, 0.08);
  backdrop-filter: blur(14px) saturate(1.3);
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
}

.command {
  position: fixed;
  inset: 0;
  display: none;
  align-items: start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(0,0,0,.24);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.command.open { display: flex; }
.command-box {
  width: min(620px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.command-box input {
  width: 100%;
  height: 58px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0 18px;
  outline: none;
}

.command-list { padding: 8px; }
.command-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  color: var(--muted);
}

.command-item:hover { background: var(--surface-muted); color: var(--text); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.55); opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 920px) {
  .hero-grid, .document { grid-template-columns: 1fr; }
  .phone-card { min-height: 500px; }
  .toc { position: relative; top: auto; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 28px, var(--max)); }
  .nav { top: 8px; width: calc(100% - 16px); }
  .links { display: none; }
  .brand span:last-child { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  .hero { padding-top: 56px; }
  .hero-actions .button { width: 100%; justify-content: center; }
  .phone-shell { width: 230px; }
  .section { padding: 58px 0; }
  .section-head { display: block; }
  .doc-card { padding: 18px; }
}
