:root {
  --surface-dark: #141838;
  --surface-paper: #FCFCFD;
  --surface-paper-alt: #F5F6FA;
  --text-body: #151723;
  --text-on-dark: #FCFCFD;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;

  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 2px solid var(--text-body);
  --card-shadow: 4px 4px 0 var(--text-body);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;
  --line-height-body: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: var(--line-height-body);
  color: var(--text-body);
  background: var(--surface-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: calc(var(--gap) * 1.5);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-block: calc(var(--gap) * 2); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-block: calc(var(--gap) * 1.2); }
p { margin: 0 0 var(--gap); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: calc(var(--gap) * 0.5);
}
.paper .badge { color: var(--color-brand); }
.dark .badge { color: var(--color-accent); }

.hl { color: var(--color-brand); }
.dark .hl { color: var(--color-accent); }

/* Layout */
.section {
  padding-block: var(--section-y);
}
.section--dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}
.section--paper-alt {
  background: var(--surface-paper-alt);
}

.grid-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
@media (max-width: 900px) {
  .grid-hero { grid-template-columns: 1fr; }
}

.grid-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
@media (max-width: 900px) {
  .grid-feature { grid-template-columns: 1fr; }
}
.reverse { direction: rtl; }
.reverse > * { direction: ltr; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  border: none;
}
.btn:hover { transform: translateY(-1px); filter: brightness(0.95); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn--primary {
  background: var(--color-accent);
  color: var(--surface-dark);
}
.btn--secondary {
  background: transparent;
  border: 1px solid var(--text-body);
  color: var(--text-body);
}
.dark .btn--secondary {
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}

/* Cards & Panels */
.card {
  background: var(--surface-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
}
.panel {
  background: var(--surface-dark);
  border-radius: 16px;
  padding: clamp(1rem, 2vw, 2rem);
  position: relative;
  overflow: hidden;
}
.dark .card {
  background: var(--surface-paper);
  color: var(--text-body);
}

/* Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.spec-table th, .spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  text-align: left;
}
.spec-table th { font-weight: 700; color: var(--text-body); }
.spec-table td { color: var(--text-body); }
.dark .spec-table th, .dark .spec-table td { color: var(--text-on-dark); }
.dark .spec-table th { color: var(--color-accent); }

/* FAQ */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: var(--gap);
  background: var(--surface-paper);
}
.summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
}
.summary::-webkit-details-marker { display: none; }
.summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  transition: transform 0.2s;
}
details[open] .summary::after { transform: translateY(-50%) rotate(45deg); }
.details-content { padding: 0 16px 16px; line-height: var(--line-height-body); }

/* Header & Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.dark .site-header { background: rgba(20, 24, 56, 0.9); border-bottom-color: rgba(255,255,255,0.08); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-list { display: flex; gap: 24px; }
.nav-link { font-weight: 500; font-size: 0.95rem; }
.nav-link[aria-current="page"] { font-weight: 700; color: var(--color-brand); }
.dark .nav-link[aria-current="page"] { color: var(--color-accent); }
.footer {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: 48px 0;
  text-align: center;
  font-size: 0.9rem;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }

/* SVG & Animations */
.svg-panel {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}
.anim-float { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-slide-in { animation: slideIn 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.flow-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawFlow 6s linear infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes slideIn {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(6px); opacity: 1; }
}
@keyframes drawFlow {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-float, .anim-breathe, .anim-slide-in, .flow-line {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .grid-feature, .grid-hero { grid-template-columns: 1fr; }
  .reverse { direction: ltr; }
  h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
}
