:root {
  --bg-deep: #0c1311;
  --bg-ink: #07100e;
  --bg-card: #121c19;
  --bg-theme: #1c2e26;
  --surface-raised: rgba(255, 250, 240, 0.08);
  --surface-glass: rgba(18, 28, 25, 0.82);
  --glass-whisper: rgba(18, 28, 25, 0.6);
  --glass-present: rgba(18, 28, 25, 0.75);
  --glass-prominent: rgba(18, 28, 25, 0.85);
  --glow-signal: rgba(107, 233, 205, 0.15);
  --text-primary: #fffaf0;
  --text-muted: #a5aea9;
  --text-dim: #6f7c77;
  --action-primary: #1f7a5a;
  --action-pressed: #175a44;
  --signal-early: #5ccfb3;
  --signal-strong: #6be9cd;
  --signal-dim: rgba(92, 207, 179, 0.24);
  --status-waiting: #d4a017;
  --status-boundary: #b45432;
  --status-quiet: #66736d;
  --border-subtle: rgba(229, 231, 235, 0.1);
  --border-emphasis: rgba(229, 231, 235, 0.22);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 20px 70px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 34px 100px rgba(0, 0, 0, 0.52);
  color: var(--text-primary);
  background: var(--bg-deep);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(31, 122, 90, 0.26), transparent 34%),
    linear-gradient(180deg, #0c1311 0%, #07100e 48%, #0c1311 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(255, 250, 240, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 250, 240, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.4;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

main {
  overflow: hidden;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100vw - 32px));
  min-height: 64px;
  margin: 0 auto;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
}

.brand span {
  width: 14px;
  height: 14px;
  border: 2px solid var(--signal-strong);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(107, 233, 205, 0.24);
  animation: pulseGlow 4s ease-in-out infinite;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar nav a,
.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0 15px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.topbar nav a:hover,
.topbar nav a:focus-visible,
.button-link:hover,
.button-link:focus-visible {
  border-color: var(--border-emphasis);
  background: rgba(255, 250, 240, 0.06);
  color: var(--text-primary);
  outline: none;
  transform: translateY(-1px);
}

.button-link.primary {
  min-height: 56px;
  border-color: rgba(92, 207, 179, 0.44);
  background: var(--action-primary);
  color: var(--text-primary);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 420px);
  gap: 56px;
  align-items: center;
  width: min(1180px, calc(100vw - 32px));
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 44px 0 64px;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow,
.pattern-id,
.screen-kicker,
.source-chip,
.screen-status,
.timeline-meta,
.public-band span,
footer {
  font-family: "JetBrains Mono", "SF Mono", monospace;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--signal-strong);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: 58px;
  line-height: 0.96;
}

h2 {
  margin-bottom: 14px;
  font-size: 40px;
  line-height: 1.04;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.18;
}

p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 590px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.phone-frame {
  position: relative;
  width: min(100%, 390px);
  margin: 0 auto;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 38px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.12), rgba(255, 250, 240, 0.02)),
    #080d0c;
  box-shadow: var(--shadow-lg);
}

.phone-speaker {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 50%;
  width: 70px;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 250, 240, 0.16);
  transform: translateX(-50%);
}

.phone-screen {
  display: flex;
  min-height: 690px;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 240, 0.1);
  border-radius: 28px;
  padding: 34px 18px 18px;
  background:
    linear-gradient(180deg, rgba(28, 46, 38, 0.9), rgba(12, 19, 17, 0.98)),
    var(--bg-deep);
}

.screen-status,
.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 11px;
}

.screen-hero {
  border: 1px solid rgba(92, 207, 179, 0.2);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(255, 250, 240, 0.055);
  box-shadow: var(--shadow-sm);
}

.screen-kicker {
  margin-bottom: 8px;
  color: var(--signal-strong);
  font-size: 11px;
  text-transform: uppercase;
}

.screen-hero h2 {
  margin-bottom: 8px;
  font-size: 31px;
}

.screen-hero p,
.trust-row p,
.sheet-preview p {
  margin-bottom: 0;
  font-size: 14px;
}

.capture-control {
  display: inline-flex;
  width: 100%;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(107, 233, 205, 0.44);
  border-radius: var(--radius-xl);
  color: var(--bg-deep);
  background: var(--signal-strong);
  box-shadow: 0 16px 44px rgba(92, 207, 179, 0.2);
  cursor: pointer;
}

.capture-control span {
  width: 18px;
  height: 18px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.capture-control:hover,
.capture-control:focus-visible {
  background: #8bf6dd;
  outline: 2px solid rgba(255, 250, 240, 0.5);
  outline-offset: 3px;
}

.timeline-card,
.trust-row,
.sheet-preview {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.timeline-card {
  border-left: 4px solid var(--status-waiting);
}

.source-chip {
  border: 1px solid rgba(92, 207, 179, 0.34);
  border-radius: var(--radius-full);
  padding: 4px 8px;
  color: var(--signal-strong);
}

.timeline-card strong,
.trust-row strong,
.sheet-preview strong {
  display: block;
  margin-top: 10px;
  color: var(--text-primary);
  line-height: 1.35;
}

.status-dots {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}

.status-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-waiting);
}

.trust-row {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
}

.trust-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--signal-strong);
}

.sheet-preview {
  margin-top: auto;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
}

.sheet-handle {
  width: 52px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 250, 240, 0.2);
}

.principle-band,
.public-band,
footer {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.principle-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--border-subtle);
}

.principle-band span {
  min-height: 70px;
  padding: 20px;
  background: rgba(18, 28, 25, 0.88);
  color: var(--text-muted);
}

.section {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 96px 0 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-heading.narrow {
  max-width: 620px;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pattern-card,
.token-group,
.glass-tier {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(18, 28, 25, 0.86);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.pattern-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-emphasis);
}

.pattern-card {
  padding: 18px;
}

.pattern-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pattern-id {
  color: var(--text-dim);
  font-size: 11px;
}

.tone-mark {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--signal-strong);
}

.tone-green .tone-mark {
  background: var(--action-primary);
}

.tone-amber .tone-mark {
  background: var(--status-waiting);
}

.tone-rust .tone-mark {
  background: var(--status-boundary);
}

.tone-slate .tone-mark {
  background: var(--status-quiet);
}

.state-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0;
}

.state-list span,
.token-group span {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 9px;
  color: var(--text-muted);
  font-size: 12px;
}

.pattern-contract {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pattern-contract dt {
  color: var(--signal-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.pattern-contract dd {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1.2fr);
  gap: 36px;
  align-items: start;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.token-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
}

.token-group h3 {
  flex-basis: 100%;
}

.glass-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.glass-tier {
  min-height: 260px;
  padding: 18px;
}

.glass-tier:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tier-visual {
  display: grid;
  min-height: 120px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 250, 240, 0.1);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.11), rgba(255, 250, 240, 0.02)),
    rgba(28, 46, 38, 0.72);
  position: relative;
  overflow: hidden;
}

.tier-visual::before {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, var(--action-primary) 0%, transparent 70%);
  opacity: 0.3;
  z-index: 0;
}

.tier-whisper .tier-visual span {
  background: var(--glass-whisper);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 250, 240, 0.1);
}

.tier-present .tier-visual {
  border-color: rgba(92, 207, 179, 0.32);
}

.tier-present .tier-visual span {
  background: var(--glass-present);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 250, 240, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.tier-prominent .tier-visual {
  border-color: rgba(212, 160, 23, 0.44);
  box-shadow: inset 0 0 40px rgba(212, 160, 23, 0.08);
}

.tier-prominent .tier-visual span {
  background: var(--glass-prominent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 250, 240, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 250, 240, 0.05);
}

.tier-visual span {
  width: 76px;
  height: 76px;
  border-radius: 28px;
  position: relative;
  z-index: 1;
}

.glass-tier p {
  margin-bottom: 6px;
  color: var(--signal-strong);
  font-weight: 700;
}

.glass-tier > span {
  color: var(--text-muted);
}

.quality-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 40px;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 104px 0 0;
}

.quality-section ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quality-section li {
  min-height: 56px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(18, 28, 25, 0.86);
  color: var(--text-muted);
}

.quality-section li::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--signal-strong);
  content: "";
}

.public-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 96px;
  border: 1px solid rgba(92, 207, 179, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(28, 46, 38, 0.72);
}

.public-band div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-band span {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 7px 10px;
  color: var(--text-muted);
  font-size: 11px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 48px 0 36px;
  color: var(--text-dim);
  font-size: 12px;
}

/* Animations */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 12px rgba(107, 233, 205, 0.2); }
  50% { box-shadow: 0 0 24px rgba(107, 233, 205, 0.4); }
  100% { box-shadow: 0 0 12px rgba(107, 233, 205, 0.2); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes phoneFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.section {
  animation: fadeSlideUp 0.8s ease-out forwards;
}

.phone-frame {
  animation: phoneFloat 6s ease-in-out infinite;
}

@media (max-width: 1040px) {
  .hero-section,
  .split-section,
  .quality-section {
    grid-template-columns: 1fr;
  }

  .pattern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-frame {
    max-width: 390px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Demo Utility Classes */
.glass-demo-bg {
  display: flex;
  gap: 8px;
  padding: 16px;
  background: radial-gradient(circle, var(--action-primary) 0%, transparent 70%);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.demo-bg-deep {
  display: flex;
  gap: 8px;
  padding: 16px;
  background: var(--bg-deep);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.demo-bg-deep.centered {
  justify-content: center;
}

.demo-bg-deep.bottom-aligned {
  align-items: flex-end;
  height: 120px;
}

.glass-box-whisper {
  flex: 1;
  height: 40px;
  background: var(--glass-whisper);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,250,240,0.1);
  border-radius: var(--radius-sm);
}

.glass-box-present {
  flex: 1;
  height: 40px;
  background: var(--glass-present);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,250,240,0.15);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.glass-box-prominent {
  flex: 1;
  height: 40px;
  background: var(--glass-prominent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,250,240,0.25);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .hero-section {
    min-height: auto;
    padding-top: 24px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }

  .principle-band,
  .pattern-grid,
  .token-grid,
  .glass-grid {
    grid-template-columns: 1fr;
  }

  .phone-screen {
    min-height: 640px;
    padding: 34px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
