/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --bg-2: #181b24;
  --fg: #f0ede8;
  --fg-muted: #8a8799;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --border: rgba(240, 237, 232, 0.08);
  --high: #ef4444;
  --high-bg: rgba(239, 68, 68, 0.12);
  --med: #f59e0b;
  --med-bg: rgba(245, 158, 11, 0.12);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(15, 17, 23, 0.85);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.nav-tag {
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 2.5rem 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.75rem;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.75;
  max-width: 440px;
}

/* ─── Widget ──────────────────────────────────────────────── */
.widget-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.widget-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  font-weight: 500;
}

.widget-badge {
  font-size: 0.65rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid rgba(245,158,11,0.25);
}

.widget-score {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.widget-score-sub {
  font-size: 1.5rem;
  color: var(--fg-muted);
  font-family: var(--sans);
}

.widget-bar {
  height: 6px;
  background: rgba(240,237,232,0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.widget-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #fbbf24 100%);
  border-radius: 999px;
}

.widget-flag {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--high-bg);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  padding: 0.6rem 0.875rem;
  margin-bottom: 1.25rem;
}

.flag-icon {
  width: 20px; height: 20px;
  background: var(--high);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.flag-text {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.flag-text strong { color: var(--fg); }

.widget-tasks { display: flex; flex-direction: column; gap: 0.5rem; }

.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(240,237,232,0.03);
}

.task-name {
  font-size: 0.8rem;
  color: var(--fg);
  font-weight: 400;
}

.task-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.tag-high { background: var(--high-bg); color: var(--high); border: 1px solid rgba(239,68,68,0.2); }
.tag-med  { background: var(--med-bg);  color: var(--med);  border: 1px solid rgba(245,158,11,0.2); }

/* ─── Risk Monitor Section ────────────────────────────────── */
.risk-section {
  padding: 5rem 2.5rem;
  border-top: 1px solid var(--border);
}

.risk-inner { max-width: 1200px; margin: 0 auto; }

.risk-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-bottom: 3rem;
  font-weight: 500;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.risk-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.risk-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.risk-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.risk-card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ─── How It Works ────────────────────────────────────────── */
.how-section {
  padding: 5rem 2.5rem;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-inner { max-width: 1200px; margin: 0 auto; }

.how-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  font-weight: 500;
}

.how-statement {
  max-width: 760px;
  margin-bottom: 4rem;
}

.how-statement p {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  line-height: 1.45;
  color: var(--fg);
}

.how-stats {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.stat-item { flex: 1; text-align: center; }

.stat-number {
  display: block;
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.5;
  max-width: 160px;
  margin: 0 auto;
  display: block;
}

.stat-divider {
  width: 1px;
  height: 80px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2.5rem;
}

/* ─── Philosophy ──────────────────────────────────────────── */
.philosophy-section {
  padding: 6rem 2.5rem;
  border-top: 1px solid var(--border);
}

.philosophy-inner { max-width: 1200px; margin: 0 auto; }

.philosophy-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 500;
}

.philosophy-headline {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.philosophy-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.75;
  max-width: 540px;
}

/* ─── Closing ─────────────────────────────────────────────── */
.closing-section {
  padding: 4rem 2.5rem;
  border-top: 1px solid var(--border);
}

.closing-inner { max-width: 1200px; margin: 0 auto; }

.closing-text {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--fg-muted);
  font-style: italic;
  max-width: 540px;
}

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
  padding: 2rem 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--fg);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { padding: 6rem 1.5rem 3rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-widget { display: none; }
  .hero-sub { max-width: 100%; }
  .risk-grid { grid-template-columns: 1fr; }
  .how-stats { flex-direction: column; gap: 2rem; }
  .stat-divider { display: none; }
  .stat-item { text-align: left; }
  .stat-desc { max-width: 100%; margin: 0; }
  .philosophy-headline { max-width: 100%; }
  .philosophy-sub { max-width: 100%; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 600px) {
  .nav { padding: 1rem 1.25rem; }
  .hero { padding: 5rem 1.25rem 2.5rem; }
  .risk-section, .how-section, .philosophy-section, .closing-section { padding: 3.5rem 1.25rem; }
  .widget-card { padding: 1.25rem; }
}
