:root {
  --bg: #08111d;
  --bg-soft: #101b2b;
  --surface: rgba(15, 23, 42, 0.72);
  --panel: rgba(15, 23, 42, 0.85);
  --panel-light: #f8fafc;
  --card: #ffffff;
  --card-soft: #eef6ff;
  --primary: #f97316;
  --primary-strong: #ea580c;
  --accent: #fb923c;
  --accent-strong: #c2410c;
  --text: #e2e8f0;
  --text-dark: #0f172a;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --shadow: 0 18px 45px rgba(8, 17, 29, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(251, 146, 60, 0.12), transparent 24%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(8, 17, 29, 0.78);
  border-bottom: 1px solid var(--line);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  opacity: 0.82;
  font-size: 0.95rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-links .button-link {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #03131d;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  opacity: 1;
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.2rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.08);
  color: #ffedd5;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.97;
  letter-spacing: -0.06em;
}

.hero h1 .accent {
  color: #fdba74;
}

.hero p {
  margin: 0 0 2rem;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #021620;
  box-shadow: var(--shadow);
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.hero-visual {
  position: relative;
  display: grid;
}

.visual-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.9), rgba(9, 16, 25, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.preview-window {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: 18px;
  padding: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.preview-window .window-bar {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.preview-window .window-bar span {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  display: block;
}

.preview-window .window-bar span:nth-child(1) { background: #fb7185; }
.preview-window .window-bar span:nth-child(2) { background: #fbbf24; }
.preview-window .window-bar span:nth-child(3) { background: #f97316; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.preview-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  padding: 1rem;
  min-height: 120px;
}

.preview-tile strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: #dbeafe;
}

.preview-tile span {
  color: var(--muted);
  font-size: 0.82rem;
}

.metrics {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.metric {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem;
}

.metric strong {
  display: block;
  font-size: clamp(1.3rem, 2vw, 2rem);
  margin-bottom: 0.2rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.85rem;
}

section {
  padding: 1.5rem 0 2.5rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.05em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.3rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  margin-bottom: 0.85rem;
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.card h3 a {
  color: #fdba74;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.16em;
  transition: text-decoration-color 0.2s ease;
}

.card h3 a:hover {
  text-decoration-color: currentColor;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #021620;
  font-weight: 900;
  flex-shrink: 0;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.article-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(7, 18, 29, 0.88));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.article-spotlight .visual {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(251, 146, 60, 0.12));
  border-radius: 20px;
  min-height: 260px;
  display: grid;
  place-items: center;
  font-size: 6rem;
  color: #ffedd5;
}

.article-spotlight .content h3 {
  margin-top: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.05em;
}

.article-spotlight .content p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

ul.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

ul.clean-list li {
  position: relative;
  padding-left: 1.3rem;
  color: #dfeaf8;
}

ul.clean-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 900;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  background: rgba(8, 17, 29, 0.52);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.page-shell {
  padding: 4rem 0 5rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4rem);
  letter-spacing: -0.06em;
}

.page-header p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.page-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.5rem;
}

.panel {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 12px 32px rgba(8, 17, 29, 0.22);
}

.panel h2, .panel h3 {
  margin-top: 0;
}

.diagram-panel {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.24);
  color: #3f2a1d;
}

.diagram-panel .step-figure figcaption {
  color: #5b4636;
}

.diagram-panel .info-item {
  color: #3f2a1d;
  border-color: rgba(154, 52, 18, 0.18);
}

.diagram-panel a {
  color: #9a3412;
}

.info-list {
  display: grid;
  gap: 1rem;
}

.info-item {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.info-item strong {
  display: block;
  margin-bottom: 0.3rem;
}

.page-article {
  color: #dfeaf8;
}

.page-article h2 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.page-article p, .page-article li {
  color: #dfeaf8;
}

.full-article {
  max-width: 940px;
  margin: 0 auto;
}

.article-toc {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-toc h2 {
  margin: 0 0 0.8rem;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.4rem;
  columns: 2;
  column-gap: 2rem;
}

.article-toc li {
  break-inside: avoid;
  padding: 0.25rem 0;
}

.article-toc a {
  color: #fdba74;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-section {
  padding: 1.5rem 0 0.5rem;
  scroll-margin-top: 6rem;
}

.article-section + .article-section {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.article-section h2 {
  margin: 0 0 1rem;
}

.step-figure {
  margin: 1.75rem 0;
}

.step-figure img {
  width: auto;
  max-width: 100%;
  max-height: 680px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: contain;
}

.step-figure figcaption {
  max-width: 76ch;
  margin: 0.7rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.system-rows {
  display: grid;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.75rem 0;
}

.system-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 0.5rem;
  min-width: 680px;
}

.system-row img {
  width: 100%;
  max-height: 170px;
  padding: 0.45rem;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 8px;
  background: #fff7ed;
  object-fit: contain;
}

.system-caption {
  max-width: 76ch;
  margin: 0.4rem auto;
  color: var(--muted);
  font-size: 0.92rem;
}

#kap1 .system-caption {
  color: #5b4636;
}

.pulse-examples {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.pulse-example {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 12px;
  background: #fff7ed;
}

.pulse-example p {
  margin: 0;
  color: #3f2a1d;
}

.pulse-example img {
  width: min(100%, 260px);
  max-height: 120px;
  padding: 0.45rem;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

#kap3 .step-figure {
  padding: 1rem;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 12px;
  background: #fff7ed;
}

#kap3 .step-figure p,
#kap3 .step-figure figcaption {
  color: #3f2a1d;
}

.pulse-values {
  line-height: 1.8;
}

@media (max-width: 900px) {
  .hero-inner,
  .page-grid,
  .article-spotlight,
  .card-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .navbar {
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
  }

  .nav-links {
    justify-content: center;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 3.5rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-toc ol {
    columns: 1;
  }

  .pulse-example {
    grid-template-columns: 1fr;
  }
}
