/* ============================================================
   transparency lab — global design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=IBM+Plex+Mono:wght@300;400;500;600&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Brand */
  --orange:       #FF5F00;
  --orange-dim:   rgba(255, 95, 0, 0.15);
  --orange-glow:  rgba(255, 95, 0, 0.08);
  --olive:        #7A8C2A;
  --olive-dim:    rgba(122, 140, 42, 0.15);
  --olive-glow:   rgba(122, 140, 42, 0.08);

  /* Neutrals */
  --bg:           #080809;
  --surface:      #0D0D10;
  --surface2:     #131318;
  --surface3:     #18181F;
  --border:       #1E1E28;
  --border2:      #26262F;

  /* Text */
  --text:         #E2E2EE;
  --text-dim:     #ABABBC;
  --muted:        #666680;
  --faint:        #3A3A50;

  /* Semantic */
  --red:          #E8312A;
  --red-dim:      rgba(232, 49, 42, 0.12);
  --amber:        #F5A623;
  --amber-dim:    rgba(245, 166, 35, 0.12);
  --green:        #3DBB7A;
  --green-dim:    rgba(61, 187, 122, 0.12);
  --blue:         #2B7DE9;
  --blue-dim:     rgba(43, 125, 233, 0.12);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'IBM Plex Sans', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Spacing */
  --nav-h:        60px;
  --page-max:     1280px;
  --page-pad:     clamp(24px, 5vw, 72px);

  /* Easing */
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--orange);
  color: #000;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select { font: inherit; }
ul, ol { list-style: none; }

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-pad);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
}

.nav.scrolled {
  background: rgba(8, 8, 9, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--orange);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-mark svg {
  width: 16px;
  height: 16px;
  fill: #000;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--orange); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #000;
  background: var(--orange);
  padding: 8px 18px;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.nav-cta:hover { opacity: 0.88; }

/* ── Typography Helpers ──────────────────────────────────── */
.label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.label-orange { color: var(--orange); }
.label-olive  { color: var(--olive); }
.label-red    { color: var(--red); }
.label-amber  { color: var(--amber); }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-orange { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(255,95,0,0.25); }
.badge-olive  { background: var(--olive-dim);  color: var(--olive);  border: 1px solid rgba(122,140,42,0.25); }
.badge-red    { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(232,49,42,0.25); }
.badge-amber  { background: var(--amber-dim);  color: var(--amber);  border: 1px solid rgba(245,166,35,0.25); }
.badge-blue   { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(43,125,233,0.25); }
.badge-muted  { background: var(--surface2);   color: var(--muted);  border: 1px solid var(--border); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

/* ── Callout Blocks ──────────────────────────────────────── */
.callout {
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-dim);
}

.callout-red    { background: var(--red-dim);   border: 1px solid rgba(232,49,42,0.22); }
.callout-amber  { background: var(--amber-dim); border: 1px solid rgba(245,166,35,0.22); }
.callout-orange { background: var(--orange-glow); border: 1px solid rgba(255,95,0,0.22); }
.callout-olive  { background: var(--olive-glow);  border: 1px solid rgba(122,140,42,0.22); }

/* ── Tables ──────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.data-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--surface2);
  color: var(--text-dim);
  vertical-align: top;
}

.data-table tbody tr:hover td {
  background: var(--surface2);
}

.data-table .col-red    { color: var(--red); }
.data-table .col-amber  { color: var(--amber); }
.data-table .col-green  { color: var(--green); }
.data-table .col-orange { color: var(--orange); }
.data-table .col-white  { color: var(--text); font-weight: 600; }

/* ── Dividers ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ── Scroll Fade-in Animation ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Status dot ──────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}

.status-dot.active {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot.done { background: var(--muted); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-orange { color: var(--orange); }
.text-olive  { color: var(--olive); }
.text-red    { color: var(--red); }
.text-amber  { color: var(--amber); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--muted); }
.text-mono   { font-family: var(--font-mono); }
.text-display { font-family: var(--font-display); }

.w-full  { width: 100%; }
.flex    { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.gap-8  { gap: 32px; }

.mt-2  { margin-top: 8px; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mt-12 { margin-top: 48px; }

/* ── Mobile Nav ──────────────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-burger:hover { background: var(--surface2); }

.nav-burger-line {
  width: 20px;
  height: 1.5px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.nav-burger.open .nav-burger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open .nav-burger-line:nth-child(2) { opacity: 0; }
.nav-burger.open .nav-burger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(8, 8, 9, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px var(--page-pad) 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}

.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer .nav-link {
  font-size: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

.nav-drawer .nav-link:last-of-type { border-bottom: none; }

.nav-drawer .nav-cta {
  margin-top: 12px;
  display: inline-block;
  text-align: center;
  padding: 12px 20px;
}

/* ── Footer Expanded ─────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px var(--page-pad) 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-brand { }

.footer-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: block;
}

.footer-logo span { color: var(--orange); }

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  line-height: 1.7;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-col-links a:hover { color: var(--orange); }

.footer-copyright {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Skip to content ─────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -56px;
  left: 16px;
  background: var(--orange);
  color: #000;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Reading progress bar ────────────────────────────────── */
#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--orange);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* ── Back to top ─────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  z-index: 500;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #000;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .footer {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .back-to-top { bottom: 20px; right: 20px; }
}
