:root {
  --bg: #0a0a09;
  --bg-soft: #111110;
  --panel: #161614;
  --text: #e7e5e0;
  --muted: #8f8c86;
  --faint: #5e5b55;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #c9b78f;
  --max: 1120px;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 9, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 32px, var(--max));
  min-height: 56px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
}

.brand-text {
  display: grid;
  gap: 1px;
  max-width: 260px;
  color: var(--text);
}

.brand-abbr {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-full {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  transition: color 120ms ease;
}

.nav a:hover {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.02);
}

.btn-secondary {
  border-color: var(--line);
  color: var(--muted);
}

.btn-secondary:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-mail {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  text-transform: none;
  letter-spacing: 0;
}

.btn-mail-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-mail-addr {
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  word-break: break-all;
  transition: color 120ms ease;
}

.btn-mail-addr .mail-at {
  color: var(--faint);
}

.btn-mail:hover .btn-mail-addr {
  color: var(--accent);
}

.btn-mail:hover .btn-mail-addr .mail-at {
  color: var(--accent);
}

main {
  overflow: hidden;
}

.section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 40px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 48px;
}

.hero > * {
  min-width: 0;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 {
  max-width: 640px;
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.12;
  overflow-wrap: break-word;
}

h2 {
  max-width: 720px;
  font-size: clamp(20px, 2.0vw, 26px);
  line-height: 1.25;
  overflow-wrap: break-word;
}

h3 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
}

.hero-full-name {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-subtitle {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-definition {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.hero-definition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hero-definition-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-definition-coord {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-definition-term {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.hero-definition-term strong {
  color: var(--accent);
  font-weight: 500;
}

.section-head {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 28px;
}

.section-number {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.section-kicker {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-index {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-block {
  max-width: 680px;
  margin-left: 132px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.text-block p {
  margin: 0 0 14px;
}

.text-block p:last-child {
  margin-bottom: 0;
}

.lead {
  max-width: 680px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.topic {
  padding: 20px 22px;
  background: var(--bg);
}

.topic h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
}

.topic h3 span {
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.topic p {
  max-width: 480px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.formats-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.format-block {
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.format-block h3 {
  margin-top: 12px;
  font-size: 15px;
}

.format-intro {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 32px;
  align-items: end;
  padding-bottom: 60px;
}

.final-cta .lead {
  margin-top: 16px;
}

.cta-actions {
  display: grid;
  gap: 10px;
}

.cta-actions .btn {
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-title {
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.error-page {
  display: grid;
  min-height: 100vh;
}

.error-main {
  display: grid;
  align-content: center;
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 56px 0;
}

.error-panel {
  margin-top: 56px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.error-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-meta .error-coord {
  color: var(--faint);
}

.error-panel h1 {
  max-width: 540px;
  margin: 22px 0 0;
  font-size: clamp(24px, 3.2vw, 30px);
  line-height: 1.2;
}

.error-panel p {
  max-width: 540px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
    min-height: auto;
  }

  .nav-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero,
  .formats-layout,
  .final-cta {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 32px;
    padding-top: 36px;
    padding-bottom: 36px;
  }
}

@media (max-width: 720px) {
  .section {
    width: min(100% - 24px, var(--max));
    max-width: calc(100vw - 24px);
    padding: 32px 0;
  }

  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    gap: 12px;
  }

  .brand-text {
    max-width: 200px;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(24px, 6.4vw, 30px);
    line-height: 1.14;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .hero-subtitle,
  .lead {
    font-size: 15px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .text-block {
    margin-left: 0;
    font-size: 15px;
  }

  .topic-grid,
  .formats-layout {
    grid-template-columns: 1fr;
  }

  .topic,
  .format-block {
    padding: 16px;
  }

  .topic h3 {
    display: block;
  }

  .topic h3 span {
    display: block;
    margin-top: 6px;
  }

  .error-main {
    width: min(100% - 24px, 720px);
    padding: 32px 0;
  }

  .error-panel {
    margin-top: 36px;
    padding: 22px 20px;
  }

  .error-panel h1 {
    font-size: clamp(22px, 6.4vw, 26px);
  }
}
