/* ===================================================================
   Arthur — Data Analysis & Visualisation
   Fixed dark theme · dependency-free
   =================================================================== */

:root {
  --canvas: #12161f;
  --canvas-2: #0c1017;
  --surface: #1a2029;
  --surface-2: #222a36;
  --border: rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #f4f6f8;
  --text-2: rgba(244, 246, 248, 0.66);
  --text-3: rgba(244, 246, 248, 0.45);
  --accent: #5e9fe8;
  --accent-strong: #7db4f0;
  --positive: #72bc8f;
  --attention: #de9255;
  --risk: #e97366;
  --cyan: #4fb9c9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 12px 32px rgba(0,0,0,.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0b1220;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; color: #0b1220; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 16, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; }
.brand-text { font-size: 15px; }
.brand-dot { color: var(--accent); }

.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }
.main-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 40px;
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  min-width: 40px;
}
.lang-btn.is-active { background: var(--accent); color: #0b1220; }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: #0b1220; }
.btn-primary:hover { background: var(--accent-strong); text-decoration: none; box-shadow: 0 8px 24px rgba(94,159,232,.35); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); text-decoration: none; }
.btn-sm { padding: 9px 16px; min-height: 40px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ---------- Badges & eyebrow ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-demo { background: rgba(222,146,85,.15); color: var(--attention); border: 1px solid rgba(222,146,85,.35); }
.badge-live { background: rgba(114,188,143,.14); color: var(--positive); border: 1px solid rgba(114,188,143,.35); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 3px rgba(114,188,143,.2); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 48px;
  background:
    radial-gradient(900px 500px at 82% -10%, rgba(94,159,232,.16), transparent 60%),
    radial-gradient(700px 420px at 8% 0%, rgba(79,185,201,.10), transparent 55%),
    var(--canvas);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-title {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 800;
}
.hero-title span {
  background: linear-gradient(90deg, var(--accent-strong), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 28px;
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-panel {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.panel-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--positive); }
.panel-title { flex: 1; font-size: 13px; color: var(--text-3); font-weight: 600; }
.mini-chart { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--canvas-2); padding: 6px; }
.mini-chart svg { width: 100%; height: 150px; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.mini-kpi { background: var(--canvas-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.mini-kpi-v { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.mini-kpi-l { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
}
.stat { padding: 0 8px; }
.stat-value {
  display: block;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label { display: block; color: var(--text-3); font-size: 14px; margin-top: 4px; }
.hero-note { margin: 18px 0 0; font-size: 12.5px; color: var(--text-3); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--canvas-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}
.head-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.head-row h2 { margin: 0; }
.section-sub { color: var(--text-2); font-size: 17px; line-height: 1.6; margin: 0; max-width: 62ch; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(94,159,232,.4); }
.card-icon { font-size: 26px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 19px; letter-spacing: -0.01em; }
.card p { color: var(--text-2); margin: 0 0 14px; }
.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.card-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 14.5px;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .7;
}

.stack-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.stack-label { color: var(--text-3); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.stack-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
}

/* ---------- Dashboard ---------- */
.dashboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}
.dash-head h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.01em; }
.dash-sub { margin: 0; color: var(--text-3); font-size: 13px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--canvas-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.kpi-label { display: block; color: var(--text-3); font-size: 13px; margin-bottom: 6px; }
.kpi-value { display: block; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-delta { display: block; font-size: 12.5px; margin-top: 4px; color: var(--text-3); }
.kpi-up { color: var(--positive); }
.kpi-down { color: var(--risk); }

.chart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.chart-card {
  background: var(--canvas-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 18px;
  min-width: 0;
}
.chart-card-wide { grid-column: 1 / -1; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chart-head h4 { margin: 0; font-size: 15px; font-weight: 600; }
.chart-unit { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chart { position: relative; width: 100%; min-height: 260px; }

/* tooltip */
.chart-tip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translate(-50%, calc(-100% - 14px));
  white-space: nowrap;
  opacity: 0;
  transition: opacity .1s ease;
}
.chart-tip.is-on { opacity: 1; }
.chart-tip.is-cursor { transform: translate(14px, 10px); }
.chart-tip.is-below { transform: translate(-50%, 14px); }
.chart-tip .tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip .tip-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chart-tip .tip-name { color: var(--text-2); margin-right: 8px; }
.chart-tip .tip-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-tip .tip-title { font-weight: 700; margin-bottom: 3px; }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 2px 0 8px; }
.chart-legend .lg { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.chart-legend .lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* vertical guide */
.guide { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.22); pointer-events: none; }

/* horizontal bar rows */
.hbar { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 52px; gap: 12px; align-items: center; padding: 8px 0; cursor: default; }
.hbar + .hbar { border-top: 1px solid var(--border-soft); }
.hbar-label { font-size: 13.5px; color: var(--text-2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--surface-2); border-radius: 5px; height: 16px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 5px; transition: transform .2s ease; transform-origin: left center; }
.hbar:hover .hbar-fill { transform: scaleX(1.02); }
.hbar-val { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.hbars-wrap { min-height: 240px; display: flex; flex-direction: column; justify-content: center; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-svg-wrap { position: relative; flex: none; width: 180px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center .dcv { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.donut-center .dcl { font-size: 11.5px; color: var(--text-3); }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; min-width: 150px; }
.donut-legend li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); cursor: default; }
.donut-legend .lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend .lg-name { flex: 1; }
.donut-legend .lg-val { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.donut-legend li.is-dim { opacity: .35; }

.dash-note { margin: 22px 0 0; font-size: 12.5px; color: var(--text-3); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.step-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #0b1220;
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p { color: var(--text-2); margin: 0; font-size: 14.5px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: center; }
.about-copy h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 800; }
.about-body { color: var(--text-2); font-size: 17px; line-height: 1.65; }
.about-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 11px; }
.about-points li { position: relative; padding-left: 26px; color: var(--text-2); }
.about-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--positive); font-weight: 700; }
.about-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}
.avatar {
  width: 84px; height: 84px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #0b1220;
  font-size: 34px;
  font-weight: 800;
}
.about-meta { display: flex; flex-direction: column; gap: 4px; }
.about-meta strong { font-size: 19px; }
.about-meta span { color: var(--text-3); font-size: 14px; }

/* ---------- Contact ---------- */
.contact-wrap { text-align: center; }
.contact-wrap .section-head { margin-left: auto; margin-right: auto; }
.contact-wrap .section-sub { margin-left: auto; margin-right: auto; }
.contact-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 36px; }
.contact-email { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--canvas-2); padding: 34px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; }
.footer-brand { font-weight: 700; }
.footer-note, .footer-meta { color: var(--text-3); font-size: 13px; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-panel { max-width: 560px; }
  .card-grid.three { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(12, 16, 23, 0.99);
    border-bottom: 1px solid var(--border-soft);
    padding: 8px 24px 18px;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 18px 32px rgba(0,0,0,.4);
  }
  .main-nav.is-open { display: flex; margin-left: 0; }
  .main-nav a { padding: 13px 0; font-size: 16px; border-bottom: 1px solid var(--border-soft); }
  .main-nav a:last-child { border-bottom: 0; }
  .header-inner { gap: 16px; }
  .brand-text { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 40px; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; }
  .steps { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 30px; }
  .stack-strip { flex-direction: column; align-items: flex-start; }
  .dashboard { padding: 18px; }
  .donut-wrap { flex-direction: column; align-items: center; }
  .hbar { grid-template-columns: 86px 1fr 46px; gap: 10px; }
  .chart { min-height: 220px; }
}
