/* ============================================================
   P-003 Simon Wright Website — Styles
   Design-Tokens: OUTPUT/DESIGN-TOKENS.md
   ============================================================ */

/* ── Custom Properties ── */
:root {
  --color-accent-primary:           #147d89;
  --color-accent-primary-light:     #1a9eac;
  --color-accent-primary-dark:      #0f5f68;
  --color-accent-primary-subtle:    rgba(20,125,137,0.08);
  --color-accent-primary-muted:     rgba(20,125,137,0.15);

  --color-accent-secondary:         #f35a7b;
  --color-accent-secondary-light:   #f87d98;
  --color-accent-secondary-dark:    #d94466;
  --color-accent-secondary-subtle:  rgba(243,90,123,0.08);
  --color-accent-secondary-muted:   rgba(243,90,123,0.15);

  --gradient-brand:      linear-gradient(135deg, #147d89 0%, #1a9eac 40%, #f35a7b 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(20,125,137,0.12) 0%, rgba(243,90,123,0.08) 100%);
  --gradient-glow:       radial-gradient(ellipse at 50% 0%, rgba(20,125,137,0.25) 0%, rgba(243,90,123,0.10) 50%, transparent 80%);

  --color-bg-primary:     #fbfbfd;
  --color-bg-section-alt: #f5f5f7;
  --color-bg-dark:        #000000;
  --color-surface:        #ffffff;

  --color-text-primary:   #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-text-tertiary:  #86868b;

  --color-link:           #147d89;
  --color-link-hover:     #1a9eac;
  --color-divider:        #d2d2d7;

  --font-display: "Inter", "Helvetica Neue", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --text-hero:    clamp(48px, 8vw, 96px);
  --text-section: clamp(32px, 5vw, 64px);
  --text-subline: clamp(19px, 2.5vw, 28px);
  --text-body:    17px;
  --text-caption: 12px;
  --text-nav:     12px;

  --tracking-tight:   -0.03em;
  --tracking-tighter: -0.05em;
  --lh-headline: 1.07;
  --lh-body:     1.53;

  --content-max:     980px;
  --content-wide:    1200px;
  --content-narrow:  692px;
  --content-padding: clamp(20px, 5vw, 60px);

  --spacing-section: clamp(80px, 12vw, 160px);
  --spacing-block:   clamp(40px, 6vw, 80px);
  --spacing-element: 16px;

  --radius-card:  28px;
  --radius-small: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-primary:      #000000;
    --color-bg-section-alt:  #1d1d1f;
    --color-surface:         #161617;
    --color-text-primary:    #f5f5f7;
    --color-text-secondary:  #a1a1a6;
    --color-text-tertiary:   #6e6e73;
    --color-link:            #3ec8d5;
    --color-link-hover:      #5dd8e3;
    --color-divider:         #424245;
    --color-accent-primary:  #3ec8d5;
    --color-accent-secondary:#f87d98;
  }
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); }

img, svg { display: block; max-width: 100%; }

/* ── Skip Link ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.sr-only.focusable:focus {
  position: fixed; top: 8px; left: 8px;
  width: auto; height: auto;
  clip: auto; white-space: normal;
  background: var(--color-accent-primary);
  color: #fff; padding: 8px 16px;
  border-radius: var(--radius-small);
  z-index: 10000;
}

/* ── Navigation ── */
.global-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 48px;
  z-index: 9999;
  background: rgba(251,251,253,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--color-divider);
  display: flex;
  align-items: center;
}

@media (prefers-color-scheme: dark) {
  .global-nav { background: rgba(0,0,0,0.72); }
}

.nav-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--color-text-primary); opacity: 0.7; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: var(--text-nav);
  color: var(--color-text-primary);
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 0.7; color: var(--color-text-primary); }
.nav-links a.active { color: var(--color-accent-primary); opacity: 1; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-text-primary);
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Mobile Nav Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.nav-overlay.open { display: flex; }
.nav-overlay a {
  font-size: 24px;
  color: #f5f5f7;
  text-decoration: none;
  text-align: center;
}
.nav-overlay a:hover { color: var(--color-accent-primary); }
.nav-overlay-close {
  position: absolute;
  top: 16px;
  right: var(--content-padding);
  background: none;
  border: none;
  color: #f5f5f7;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 734px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Layout Utilities ── */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}
.container--wide {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}
.container--narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

/* ── Sections ── */
.section {
  padding: var(--spacing-section) 0;
}
.section--dark {
  background: var(--color-bg-dark);
  color: #f5f5f7;
}
.section--dark .section-label,
.section--dark .section-subline { color: #a1a1a6; }
.section--alt {
  background: var(--color-bg-section-alt);
}
.section--surface {
  background: var(--color-surface);
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  background: #000;
  padding-top: calc(48px + clamp(80px, 12vw, 140px));
  padding-bottom: clamp(80px, 10vw, 140px);
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: var(--gradient-glow);
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-label {
  display: inline-block;
  font-size: 14px;
  color: var(--color-accent-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.section--dark .hero-label { color: #3ec8d5; }

.hero-headline {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: var(--tracking-tighter);
  line-height: var(--lh-headline);
  color: #f5f5f7;
  max-width: 860px;
  margin: 0 auto 20px;
}

.hero-subline {
  font-size: var(--text-subline);
  color: #a1a1a6;
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.4;
}

.hero-ctas {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* ── Section Typography ── */
.section-label {
  font-size: 14px;
  color: var(--color-accent-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}
.section-headline {
  font-size: var(--text-section);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-headline);
  margin-bottom: 20px;
}
.section-subline {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--color-text-secondary);
  max-width: 640px;
  line-height: 1.5;
  margin-bottom: var(--spacing-block);
}
.text-center { text-align: center; }
.text-center .section-subline { margin-left: auto; margin-right: auto; }

/* ── CTAs ── */
.link-cta {
  font-size: 19px;
  color: var(--color-link);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}
.link-cta:hover { text-decoration: underline; opacity: 0.8; }
.link-cta::after { content: " ›"; }

.link-cta--light { color: #3ec8d5; }
.link-cta--light:hover { color: #5dd8e3; }

.btn-pill {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 980px;
  background: var(--color-accent-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-pill:hover { opacity: 0.85; color: #fff; }

/* ── Cards ── */
.card {
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 40px;
  background: var(--color-surface);
}
.card--dark {
  background: #1d1d1f;
  color: #f5f5f7;
}
.card--accent { background: var(--color-accent-primary-subtle); }

/* ── Badges / Pills ── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
}
.badge--teal  { background: var(--color-accent-primary-subtle);   color: var(--color-accent-primary); }
.badge--coral { background: var(--color-accent-secondary-subtle);  color: var(--color-accent-secondary-dark); }
.badge--gray  { background: var(--color-bg-section-alt);          color: var(--color-text-secondary); }
.badge--violet { background: rgba(124,92,191,0.1); color: #7c5cbf; }
.badge--petrol { background: rgba(14,116,144,0.1); color: #0e7490; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-divider);
}
td {
  padding: 16px;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
  font-size: 15px;
}
tr:nth-child(even) td { background: var(--color-bg-section-alt); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-small); border: 1px solid var(--color-divider); }

/* ── Akkordeon (native details/summary) ── */
details {
  border-bottom: 1px solid var(--color-divider);
}
details:first-of-type { border-top: 1px solid var(--color-divider); }
summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
}
summary::-webkit-details-marker { display: none; }
summary .details-chevron {
  color: var(--color-accent-primary);
  font-size: 18px;
  transition: transform 0.2s;
  margin-left: auto;
}
details[open] summary .details-chevron { transform: rotate(90deg); }
.details-body { padding: 0 0 16px 0; color: var(--color-text-secondary); line-height: 1.6; }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1068px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 734px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Bento Grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.bento-grid .bento-cell {
  border-radius: var(--radius-card);
  padding: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
}
.bento-grid .bento-cell--wide { grid-column: span 2; }
.bento-grid .bento-cell--accent { background: var(--color-accent-primary-subtle); }
.bento-grid .bento-cell--dark { background: #1d1d1f; color: #f5f5f7; }

@media (max-width: 1068px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-grid .bento-cell--wide { grid-column: span 2; }
}
@media (max-width: 734px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid .bento-cell--wide { grid-column: span 1; }
}

/* ── Icons ── */
.icon { display: inline-block; line-height: 1; }
.icon--48 { width: 48px; height: 48px; }
.icon--24 { width: 24px; height: 24px; }

/* ── Flow Diagram ── */
.flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 8px;
}
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
  flex: 1;
}
.flow-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.flow-step-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  max-width: 100px;
}
.flow-connector {
  flex-shrink: 0;
  width: 40px;
  height: 2px;
  background: var(--color-accent-primary);
  margin-top: 17px;
  opacity: 0.4;
}

@media (max-width: 734px) {
  .flow {
    flex-direction: column;
    align-items: flex-start;
    overflow-x: visible;
  }
  .flow-step { flex-direction: row; gap: 16px; min-width: unset; text-align: left; align-items: center; }
  .flow-step-label { max-width: unset; }
  .flow-connector { width: 2px; height: 24px; margin: 0 0 0 17px; }
}

/* ── Agent Cards ── */
.agent-card {
  border-radius: var(--radius-card);
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.agent-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.agent-card--teal::before   { background: #147d89; }
.agent-card--coral::before  { background: #f35a7b; }
.agent-card--violet::before { background: #7c5cbf; }
.agent-card--petrol::before { background: #0e7490; }

.agent-card-role {
  margin-bottom: 12px;
}
.agent-card-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin-bottom: 8px;
}
.agent-card-quote {
  font-style: italic;
  color: #a1a1a6;
  font-size: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #424245;
  line-height: 1.5;
}
.agent-card-skills {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.agent-card-skills li {
  font-size: 14px;
  color: #d1d1d6;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.agent-card-skills li::before {
  content: "›";
  color: var(--color-accent-primary);
  flex-shrink: 0;
}
.agent-card-reach {
  font-size: 13px;
  color: #6e6e73;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-divider);
}
.timeline-entry {
  position: relative;
  padding-bottom: var(--spacing-block);
}
.timeline-dot {
  position: absolute;
  left: -37px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-divider);
  border: 2px solid var(--color-bg-primary);
}
.timeline-dot--milestone {
  background: var(--color-accent-primary);
  width: 16px;
  height: 16px;
  left: -39px;
}
.timeline-date {
  font-size: 13px;
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: var(--tracking-tight);
}
.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-bullets li {
  font-size: 15px;
  color: var(--color-text-secondary);
  display: flex;
  gap: 10px;
}
.timeline-bullets li::before {
  content: "–";
  color: var(--color-accent-primary);
  flex-shrink: 0;
}

/* ── Security Layers ── */
.security-layers {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.security-layer {
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
}
.security-layer-num {
  width: 48px;
  flex-shrink: 0;
  background: var(--color-accent-primary);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.security-layer-body {
  flex: 1;
  padding: 16px 20px;
}
.security-layer-name {
  font-weight: 600;
  margin-bottom: 2px;
  color: #f5f5f7;
}
.security-layer-desc {
  font-size: 13px;
  color: #a1a1a6;
}

/* Layer color intensity by number (1=darkest, 9=lightest teal) */
.layer-1 .security-layer-num { background: #0a4a52; }
.layer-2 .security-layer-num { background: #0d5a64; }
.layer-3 .security-layer-num { background: #0f6a76; }
.layer-4 .security-layer-num { background: #117a88; }
.layer-5 .security-layer-num { background: #147d89; }
.layer-6 .security-layer-num { background: #1a8f9e; }
.layer-7 .security-layer-num { background: #1da3b4; }
.layer-8 .security-layer-num { background: #22b8cc; }
.layer-9 .security-layer-num { background: #3ec8d5; }

.security-layer-body { background: #111; }

/* ── Berechtigungsmatrix ── */
.perm-check { color: var(--color-accent-primary); font-weight: 700; }
.perm-dash  { color: var(--color-text-tertiary); }
.perm-star  { color: var(--color-accent-secondary); font-size: 13px; }

/* ── Roadmap Table ── */
.priority-high   { background: var(--color-accent-secondary-subtle); color: var(--color-accent-secondary-dark); }
.priority-medium { background: var(--color-accent-primary-subtle); color: var(--color-accent-primary); }
.priority-low    { background: var(--color-bg-section-alt); color: var(--color-text-secondary); }

/* ── Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.8s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-group > *:nth-child(1) { transition-delay: 0s; }
.reveal-group > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

/* ── Footer ── */
.site-footer {
  background: var(--color-bg-section-alt);
  border-top: 1px solid var(--color-divider);
  padding: 48px 0 32px;
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}
.footer-tagline {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  max-width: 480px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  list-style: none;
  margin-bottom: 32px;
}
.footer-nav a {
  font-size: 13px;
  color: var(--color-text-secondary);
}
.footer-nav a:hover { color: var(--color-text-primary); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--color-text-tertiary);
  padding-top: 20px;
  border-top: 1px solid var(--color-divider);
}
.footer-legal a { color: var(--color-text-tertiary); }
.footer-legal a:hover { color: var(--color-text-secondary); }

/* ── SVG Diagram Placeholders ── */
.diagram-placeholder {
  border-radius: var(--radius-small);
  border: 1px dashed var(--color-accent-primary);
  background: var(--color-accent-primary-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  min-height: 200px;
  color: var(--color-accent-primary);
  font-size: 14px;
}
.diagram-placeholder strong {
  font