/* ============================================
   PII ZERO — piizero.com
   Scroll-Driven Design System
   WebGL Digital Dust Background
   ============================================ */

/* --- Variables --- */
:root {
  --pz-black: #000000;
  --pz-surface: #060606;
  --pz-border: #1A1A1A;
  --pz-white: #F0F0F0;
  --pz-white-dim: #D0D0D0;
  --pz-gold: #C9A84C;
  --pz-gold-dim: rgba(201,168,76,0.3);
  --pz-green: #00FF41;
  --pz-green-dim: rgba(0,255,65,0.15);
  --pz-red: #FF3333;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-display: 'Outfit', system-ui, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--pz-black);
  color: var(--pz-white);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Canvas Layers --- */
#dustCanvas, #cardCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
}
#dustCanvas {
  z-index: 0;
  opacity: 0.7;
}
#cardCanvas {
  z-index: 0;
  opacity: 0.7;
}

/* --- Scroll Sections --- */
.scroll-section {
  position: relative;
  z-index: 1;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
}

.scroll-section .inner {
  max-width: 960px;
  width: 100%;
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.3s;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--pz-gold);
  letter-spacing: 0.2em;
  text-decoration: none;
}

.header-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pz-gold);
  border: 1px solid var(--pz-gold);
  background: transparent;
  padding: 10px 28px;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}
.header-btn:hover {
  background: var(--pz-gold);
  color: var(--pz-black);
}

/* ============================================
   Hero
   ============================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
  position: relative;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--pz-gold);
  margin-bottom: 40px;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 900px;
  margin-bottom: 32px;
}

.hero-title .gold { color: var(--pz-gold); }

.hero-sub {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--pz-white-dim);
  max-width: 600px;
  margin: 0 auto 40px;
  font-weight: 300;
  line-height: 1.6;
}

.hero-hash {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.2vw, 14px);
  color: var(--pz-green);
  text-shadow: 0 0 20px var(--pz-green-dim);
  opacity: 0.5;
  margin-bottom: 56px;
  letter-spacing: 0.05em;
}

.hero-hash .cursor {
  display: inline-block;
  width: 8px; height: 17px;
  background: var(--pz-green);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pz-black);
  background: var(--pz-gold);
  border: none;
  padding: 18px 48px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}
.hero-cta:hover {
  background: #d4b35a;
  box-shadow: 0 0 40px var(--pz-gold-dim);
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.3;
  animation: scrollPulse 2s ease infinite;
}
.scroll-hint span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pz-white-dim);
}
.scroll-hint .arrow {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--pz-white-dim), transparent);
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.6; transform: translateX(-50%) translateY(6px); }
}

/* ============================================
   Stat Callout
   ============================================ */
.stat-section { text-align: center; }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 700;
  color: var(--pz-gold);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--pz-white-dim);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

/* ============================================
   Text Sections
   ============================================ */
.text-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--pz-gold);
  margin-bottom: 32px;
}

.text-section-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  max-width: 700px;
}

.text-section-body {
  font-size: clamp(17px, 1.3vw, 20px);
  color: var(--pz-white-dim);
  max-width: 700px;
  font-weight: 300;
  line-height: 1.7;
}

.text-section-body + .text-section-body { margin-top: 24px; }

/* ============================================
   Value Prop Number
   ============================================ */
.value-num {
  color: var(--pz-gold);
  font-family: var(--font-mono);
  font-size: 0.45em;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 16px;
}

/* ============================================
   Pipeline
   ============================================ */
.pipeline-container {
  display: flex;
  gap: 2px;
  width: 100%;
  margin-top: 56px;
}

.pipeline-card {
  flex: 1;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 36px 24px;
  text-align: center;
  transition: border-color 0.4s, background 0.4s;
}
.pipeline-card:hover {
  border-color: var(--pz-gold-dim);
  background: rgba(201,168,76,0.03);
}

.pipeline-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pz-gold);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.pipeline-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.pipeline-desc {
  font-size: 15px;
  color: var(--pz-white-dim);
  line-height: 1.6;
  font-weight: 300;
}

.pipeline-hash {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pz-green);
  text-shadow: 0 0 8px var(--pz-green-dim);
  margin-top: 16px;
  word-break: break-all;
}

/* ============================================
   Code Demo
   ============================================ */
.code-demo {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 40px 48px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 2;
  margin-top: 48px;
}
.code-demo .hash { color: var(--pz-green); text-shadow: 0 0 8px var(--pz-green-dim); }
.code-demo .dim { color: var(--pz-white-dim); }

/* ============================================
   Industry Grid
   ============================================ */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 56px;
}

.industry-card {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 36px 32px;
  transition: border-color 0.3s, background 0.3s;
}
.industry-card:hover {
  border-color: var(--pz-gold-dim);
  background: rgba(201,168,76,0.02);
}

.industry-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--pz-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.industry-what {
  font-size: 16px;
  color: var(--pz-white);
  margin-bottom: 8px;
  font-weight: 400;
}

.industry-does {
  font-size: 15px;
  color: var(--pz-white-dim);
  font-weight: 300;
  line-height: 1.6;
}

/* ============================================
   Sources
   ============================================ */
.sources {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.source-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  transition: border-color 0.3s;
  flex: 1 1 180px;
  max-width: 260px;
}
.source-card:hover { border-color: var(--pz-gold-dim); }

.source-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--pz-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.source-title {
  font-size: 16px;
  color: var(--pz-white-dim);
  line-height: 1.5;
}

/* ============================================
   Transparency
   ============================================ */
.transparency-list {
  margin-top: 40px;
  display: grid;
  gap: 2px;
}

.transparency-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.transparency-item .t-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--pz-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.transparency-item .t-reason {
  font-size: 16px;
  color: var(--pz-white-dim);
  font-weight: 300;
  line-height: 1.7;
}

/* ============================================
   Contact Form
   ============================================ */
.form-wrapper { max-width: 560px; }
.form-group { margin-bottom: 32px; }

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #4CC9A8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--pz-white);
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(76,201,168,0.5);
  padding: 14px 0;
  outline: none;
  transition: border-color 0.3s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #4CC9A8;
}
.form-input::placeholder { color: rgba(76,201,168,0.3); }
.form-select { cursor: pointer; }
.form-select option { background: var(--pz-black); color: var(--pz-white); }
.form-textarea { resize: vertical; min-height: 60px; }

.submit-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pz-black);
  background: #4CC9A8;
  border: none;
  padding: 18px 48px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 16px;
}
.submit-btn:hover { background: #5DD9B8; box-shadow: 0 0 40px rgba(76,201,168,0.3); }

.form-status {
  display: none;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2.2;
  margin-top: 24px;
}
.form-status .status-line { color: var(--pz-green); text-shadow: 0 0 8px var(--pz-green-dim); }
.form-status .status-confirm { color: var(--pz-white); margin-top: 16px; }

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pz-white-dim);
  letter-spacing: 0.05em;
}
.footer a {
  color: var(--pz-gold-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.footer a:hover { color: var(--pz-gold); }

/* ============================================
   Responsive
   ============================================ */
/* ============================================
   Tablet (< 900px)
   ============================================ */
@media (max-width: 900px) {
  .header { padding: 0 20px; }
  .scroll-section { padding: 60px 24px; min-height: auto; }
  .hero-section { padding: 90px 24px 50px; }
  .pipeline-container { flex-direction: column; }
  .industry-grid { grid-template-columns: 1fr; }
  .transparency-item { grid-template-columns: 1fr; gap: 8px; }
  .code-demo { padding: 24px 20px; font-size: 14px; word-break: break-all; }
  .footer { flex-direction: column; gap: 8px; text-align: center; padding: 24px 20px; }
  .sources { display: grid; grid-template-columns: 1fr 1fr; }
  .source-card { max-width: none; }
}

/* ============================================
   Mobile (< 480px) — bigger text, full width
   ============================================ */
@media (max-width: 480px) {
  body { font-size: 18px; }
  .header { height: 56px; padding: 0 16px; }
  .wordmark { font-size: 13px; }
  .header-btn { font-size: 10px; padding: 8px 16px; }

  .scroll-section { padding: 60px 20px; min-height: auto; }
  .scroll-section .inner { max-width: 100%; }

  .hero-section { padding: 80px 20px 50px; min-height: 100vh; }
  .hero-title { font-size: 32px; line-height: 1.1; margin-bottom: 24px; }
  .hero-label { font-size: 10px; margin-bottom: 28px; }
  .hero-sub { font-size: 17px; line-height: 1.6; margin-bottom: 32px; max-width: 100%; }
  .hero-hash { font-size: 10px; margin-bottom: 40px; }
  .hero-cta { font-size: 12px; padding: 16px 36px; width: 100%; text-align: center; }

  .stat-number { font-size: 48px; }
  .stat-label { font-size: 17px; max-width: 100%; }

  .text-section-title { font-size: 11px; margin-bottom: 20px; }
  .text-section-headline { font-size: 26px; line-height: 1.2; margin-bottom: 24px; max-width: 100%; }
  .text-section-body { font-size: 17px; line-height: 1.7; max-width: 100%; }

  .value-num { font-size: 0.5em; }

  .pipeline-card { padding: 24px 20px; }
  .pipeline-label { font-size: 12px; }
  .pipeline-desc { font-size: 14px; }
  .pipeline-hash { font-size: 10px; }

  .code-demo { padding: 20px 16px; font-size: 14px; line-height: 1.8; }

  .industry-card { padding: 24px 20px; }
  .industry-name { font-size: 11px; }
  .industry-what { font-size: 15px; }
  .industry-does { font-size: 14px; }

  .sources { grid-template-columns: 1fr; }
  .source-card { padding: 12px 14px; }
  .source-label { font-size: 10px; }
  .source-title { font-size: 13px; }

  .transparency-item { padding: 20px 0; }
  .transparency-item .t-label { font-size: 11px; margin-bottom: 6px; }
  .transparency-item .t-reason { font-size: 15px; }

  .form-wrapper { max-width: 100%; }
  .form-input, .form-select, .form-textarea { font-size: 18px; padding: 16px 0; }
  .form-label { font-size: 12px; }
  .form-group { margin-bottom: 28px; }
  .submit-btn { width: 100%; font-size: 14px; padding: 20px 36px; }
  .form-status { font-size: 13px; }

  .footer { padding: 20px 16px; font-size: 10px; }
}
