:root {
  --amber: #f2b552;
  --amber-soft: #ffd99a;
  --amber-ink: #b8761a;
  --ink: #0b0b0c;
  --ink-2: #141416;
  --paper: #f4f3f0;
  --text: #f5f4f1;
  --dim: rgba(245, 244, 241, 0.62);
  --dark-text: #111113;
  --dark-dim: rgba(17, 17, 19, 0.62);
  --line: rgba(255, 255, 255, 0.08);

  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --content-max: 70rem;
  --gutter: max(1.5rem, calc((100% - var(--content-max)) / 2));
  --section-y: clamp(4.5rem, 8vw, 8rem);
  --header-height: 3.25rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

a:hover {
  color: var(--amber);
}

h1, h2, h3, h4, p {
  margin: 0;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  padding: 0 max(1rem, calc((100% - 70rem) / 2 + 1.5rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: rgba(11, 11, 12, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.site-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 13px;
  color: rgba(245, 244, 241, 0.72);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--amber);
}

/* ---------- Layout ---------- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero,
.video-section,
.features,
.section-220,
.about-company,
.contact-block {
  padding: var(--section-y) var(--gutter);
}

.section-title {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ---------- Hero ---------- */
.hero {
  padding-bottom: clamp(3rem, 6vw, 5rem);
  text-align: center;
  background:
    radial-gradient(60rem 24rem at 50% 100%, rgba(242, 181, 82, 0.14), transparent 70%),
    var(--ink);
}

.hero-title {
  max-width: 62rem;
  margin: 0 auto 1.25rem;
  font-size: clamp(2.5rem, 6.4vw, 5.5rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-subtitle {
  max-width: 40rem;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.45;
  color: var(--dim);
}

/* ---------- Graph ---------- */
.graph-section {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.graph-container {
  position: relative;
  width: 100%;
  max-width: 50rem;
  height: 350px;
  margin: 0 auto;
}

@media (min-width: 760px) {
  .graph-container {
    height: 460px;
  }
}

.graph-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(242, 181, 82, 0.35);
  pointer-events: none;
}

.graph-center {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  text-align: center;
  z-index: 5;
}

.hero-chip {
  display: inline-block;
  line-height: 0;
}

.hero-chip__image {
  display: block;
  width: clamp(190px, 38vw, 400px);
  height: auto;
  margin: -12% -8%;
  max-width: none;
  transition: transform 0.4s;
}

.graph-center__trigger:hover .hero-chip__image,
.graph-center__trigger:focus-visible .hero-chip__image {
  transform: scale(1.04) translateY(-4px);
}

.graph-center__title {
  display: block;
  margin-top: 0.9rem;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--amber);
}

.graph-center .popover {
  position: fixed;
}

.graph-popover {
  width: min(94vw, 38rem);
  z-index: 120;
}

.graph-node {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 40%;
  padding: clamp(0.8rem, 0.5rem + 0.6vw, 1.15rem) clamp(0.9rem, 0.7rem + 0.8vw, 1.3rem);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.graph-node:hover,
.graph-node:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(242, 181, 82, 0.55);
  box-shadow: 0 0 40px rgba(242, 181, 82, 0.15);
}

.graph-node__icon {
  color: var(--amber);
}

.graph-node__title {
  font-weight: 700;
  line-height: 1.25;
}

.graph-node__desc {
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--dim);
}

.graph-node--tl { left: 0; top: 0; }
.graph-node--tr { right: 0; top: 0; }
.graph-node--br { right: 0; bottom: 0; }
.graph-node--bl { left: 0; bottom: 0; }

/* ---------- Popovers ---------- */
.popover {
  position: absolute;
  z-index: 60;
  width: min(90vw, 24rem);
  max-height: 82vh;
  overflow-y: auto;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(20, 20, 22, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: left;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.popover[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}

.popover-title {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.popover-section {
  margin-bottom: 1rem;
}

.popover-section:last-child {
  margin-bottom: 0;
}

.popover .card-title {
  color: var(--amber);
}

.popover-section p,
.graph-node-popover__body,
.graph-node-popover__body p,
.graph-node-popover__body li {
  color: var(--dim);
  font-size: 0.94rem;
  line-height: 1.6;
}

.graph-node-popover {
  position: fixed;
  min-width: min(90vw, 20rem);
  max-width: 24rem;
}

.graph-node-popover__body ul {
  margin: 0;
  padding-left: 1.15rem;
}

/* ---------- Video ---------- */
.video-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--ink);
}

.video-section .section-title {
  max-width: 48rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.video-wrap {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  box-shadow: 0 -30px 120px rgba(242, 181, 82, 0.14);
}

.video-embed {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Features (light) ---------- */
.features {
  background: var(--paper);
  color: var(--dark-text);
}

.features .section-title {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem 1.75rem 2rem;
  border-radius: 24px;
  background: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(17, 17, 19, 0.08);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.card p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dark-dim);
}

/* ---------- Section 220 (white) ---------- */
.section-220 {
  background: #fff;
  color: var(--dark-text);
}

.section-220 .section-title {
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.section-220 p {
  max-width: 48rem;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--dark-dim);
}

.section-220 ul {
  max-width: 48rem;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.section-220 li {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(17, 17, 19, 0.15);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- About / Contacts ---------- */
.about-company {
  flex: 1;
  background: var(--paper);
  color: var(--dark-text);
}

.about-company .section-title {
  margin-bottom: 2rem;
}

.about-company p {
  max-width: 48rem;
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--dark-dim);
}

.about-company p:last-child {
  margin-bottom: 0;
  color: var(--dark-text);
  font-weight: 600;
}

.contacts-layout {
  flex: 1;
  display: flex;
}

.contact-block {
  flex: 1;
  background: var(--ink);
}

.contact-block .section-title {
  margin-bottom: 2rem;
}

.contact-block p {
  max-width: 48rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.15rem;
  color: var(--dim);
}

.contact-block a {
  color: var(--amber);
}

.contact-block a:hover {
  color: var(--amber-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 1.4rem var(--gutter);
  background: var(--paper);
  border-top: 1px solid rgba(17, 17, 19, 0.1);
  color: rgba(17, 17, 19, 0.5);
  font-size: 12px;
}

.site-footer a:hover {
  color: var(--amber-ink);
}

@media (max-width: 720px) {
  .site-nav {
    gap: 1rem;
  }

  .graph-node {
    max-width: 46%;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .site-logo {
    font-size: 14px;
  }

  .site-nav a {
    font-size: 12px;
  }
}

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

  * {
    transition: none !important;
  }
}
