/* ============================================
   BEYOND COMPREHENSION
   Nothing casual. Nothing half-done.
   Everything intentional.
   ============================================ */

:root {
  --black: #0a0a0a;
  --black-deep: #050505;
  --white: #e8e4df;
  --white-dim: #a09a93;
  --white-faint: #5a5550;
  --gold: #c9a96e;
  --gold-dim: #8a7548;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: var(--black-deep);
}

body {
  font-family: var(--sans);
  background: var(--black-deep);
  color: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--black);
}

/* ============================================
   PRELOADER
   ============================================ */

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.preloader-line {
  width: 120px;
  height: 1px;
  background: var(--white-faint);
  position: relative;
  overflow: hidden;
}

.preloader-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gold);
  animation: preloaderSlide 1.5s ease-in-out forwards;
}

@keyframes preloaderSlide {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 80px 24px;
}

.section-inner {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================
   HERO
   ============================================ */

#hero {
  flex-direction: column;
  text-align: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  max-width: clamp(280px, 50vw, 550px);
  height: auto;
  margin-bottom: 40px;
  filter: drop-shadow(0 0 40px rgba(201, 169, 110, 0.15));
}

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 40px;
}

.title-line {
  display: block;
  font-size: clamp(3rem, 8vw, 7rem);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.title-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.title-line:nth-child(2) {
  transition-delay: 0.4s;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 40px;
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 0.8s ease 1s, transform 0.8s ease 1s;
}

.hero-divider.visible {
  opacity: 1;
  transform: scaleX(1);
}

.hero-subtitle {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: var(--white-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 2;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.large-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.3;
  color: var(--white);
  letter-spacing: 0.02em;
}

.body-text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 2;
  color: var(--white-dim);
  letter-spacing: 0.01em;
}

.section-label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 80px;
}

.spacer {
  height: 40px;
}

.spacer-large {
  height: 80px;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */

.reveal-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-text {
  /* Handled per-child */
}

.reveal-line {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s ease;
}

.reveal-line.visible {
  transform: scaleX(1);
}

/* ============================================
   FOUNDER PORTRAIT
   ============================================ */

#founder {
  padding: 0;
  min-height: 80vh;
  overflow: hidden;
  background: var(--black-deep);
}

.founder-portrait {
  width: 100%;
  height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: contrast(1.1) brightness(0.9);
}

.founder-portrait::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--black-deep));
  pointer-events: none;
}

/* ============================================
   PILLARS
   ============================================ */

#pillars {
  padding-top: 120px;
  padding-bottom: 120px;
}

.pillar {
  margin-bottom: 120px;
}

.pillar:last-child {
  margin-bottom: 0;
}

.pillar-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--white);
}

.pillar-line {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 32px;
}

.pillar-body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 2;
  color: var(--white-dim);
  margin-bottom: 24px;
  max-width: 600px;
}

.pillar-body:last-child {
  margin-bottom: 0;
}

/* ============================================
   THE ONUS
   ============================================ */

#onus {
  background: var(--black);
}

.onus-inner {
  text-align: center;
}

.onus-border {
  border: 1px solid var(--gold-dim);
  padding: clamp(40px, 8vw, 80px) clamp(24px, 6vw, 60px);
  position: relative;
}

.onus-border::before,
.onus-border::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--gold);
  border-style: solid;
}

.onus-border::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.onus-border::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

.onus-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  line-height: 1.8;
  color: var(--white);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.onus-text:last-child {
  margin-bottom: 0;
}

.onus-text-final {
  color: var(--gold);
  font-weight: 400;
  margin-top: 48px;
  font-style: italic;
}

.onus-origin-label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-faint);
  margin-bottom: 32px;
}

.onus-handwritten {
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid var(--gold-dim);
  padding: 4px;
  opacity: 0.85;
  transition: opacity 0.5s ease;
}

.onus-handwritten:hover {
  opacity: 1;
}

.onus-handwritten img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(20%) contrast(1.1);
}

/* ============================================
   THE STANDARD
   ============================================ */

#standard {
  text-align: center;
}

#standard .large-text {
  color: var(--white);
  font-style: italic;
}

/* ============================================
   CLOSE
   ============================================ */

#close {
  min-height: 100vh;
}

.close-inner {
  text-align: center;
}

.close-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.5;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.close-text-small {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.4vw, 0.95rem);
  line-height: 2.2;
  color: var(--white-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.final-block {
  padding-top: 40px;
}

.final-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--white-dim);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.final-text-last {
  color: var(--gold);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 400;
  margin-top: 32px;
  font-style: italic;
}

/* ============================================
   THE THRESHOLD (Email Capture)
   ============================================ */

#threshold {
  min-height: auto;
  padding: 120px 24px;
  background: var(--black-deep);
}

.threshold-inner {
  text-align: center;
  max-width: 520px;
}

.threshold-prompt {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--white-dim);
  letter-spacing: 0.02em;
  margin-bottom: 40px;
  font-style: italic;
}

.threshold-form {
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--gold-dim);
  overflow: hidden;
  transition: border-color 0.4s ease;
}

.form-row:focus-within {
  border-color: var(--gold);
}

.threshold-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px 20px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--white);
  letter-spacing: 0.05em;
  outline: none;
}

.threshold-input::placeholder {
  color: var(--white-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.threshold-button {
  background: var(--gold-dim);
  border: none;
  padding: 16px 28px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black-deep);
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease;
  white-space: nowrap;
}

.threshold-button:hover {
  background: var(--gold);
  color: var(--black-deep);
}

.threshold-note {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-faint);
  opacity: 0.6;
}

.form-message {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  min-height: 1.2em;
  transition: opacity 0.4s ease;
}

.form-message.success {
  color: var(--gold);
}

.form-message.error {
  color: #c47070;
}

/* ============================================
   THE WALL (Public Names)
   ============================================ */

#wall {
  min-height: auto;
  padding: 80px 24px 120px;
  background: var(--black);
}

.wall-inner {
  text-align: center;
  max-width: 900px;
}

.wall-label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 60px;
}

.names-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  min-height: 60px;
}

.wall-loading {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-faint);
  opacity: 0.4;
}

.wall-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--white-dim);
  letter-spacing: 0.04em;
  padding: 6px 14px;
  opacity: 0;
  transform: translateY(8px);
  animation: nameAppear 0.6s ease forwards;
}

.wall-name::after {
  content: '\00B7';
  margin-left: 14px;
  color: var(--gold-dim);
  opacity: 0.4;
}

.wall-name:last-child::after {
  display: none;
}

@keyframes nameAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.names-count {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white-faint);
  margin-top: 48px;
  opacity: 0.5;
}

/* ============================================
   THE SIGNAL (Email Capture)
   ============================================ */

#signal {
  min-height: auto;
  padding: 120px 24px 100px;
  background: var(--black-deep);
  position: relative;
}

.signal-inner {
  text-align: center;
  max-width: 520px;
}

.signal-divider {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim), transparent);
  margin: 0 auto 60px;
}

.signal-label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 48px;
}

.signal-prompt {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  line-height: 1.5;
}

.signal-body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  color: var(--white-dim);
  line-height: 2;
  letter-spacing: 0.02em;
  margin-bottom: 48px;
}

.signal-form {
  margin-bottom: 20px;
}

.signal-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--gold-dim);
  overflow: hidden;
  transition: border-color 0.4s ease;
}

.signal-row:focus-within {
  border-color: var(--gold);
}

.signal-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px 20px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--white);
  letter-spacing: 0.05em;
  outline: none;
}

.signal-input::placeholder {
  color: var(--white-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.signal-button {
  background: var(--gold-dim);
  border: none;
  padding: 16px 24px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black-deep);
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease;
  white-space: nowrap;
}

.signal-button:hover {
  background: var(--gold);
  color: var(--black-deep);
}

.signal-note {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-faint);
  opacity: 0.5;
  margin-top: 8px;
  font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */

#footer {
  padding: 60px 24px;
  text-align: center;
}

.footer-line {
  width: 40px;
  height: 1px;
  background: var(--white-faint);
  margin: 0 auto 24px;
}

.footer-text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-faint);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .section {
    padding: 60px 20px;
  }

  .pillar {
    margin-bottom: 80px;
  }

  .section-label {
    margin-bottom: 60px;
  }

  .spacer-large {
    height: 60px;
  }

  #pillars {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    margin-bottom: 30px;
  }

  .hero-divider {
    margin-bottom: 30px;
  }

  .onus-border {
    padding: 32px 20px;
  }

  .form-row {
    flex-direction: column;
  }

  .threshold-button {
    padding: 14px 28px;
  }

  #threshold {
    padding: 80px 20px;
  }

  #wall {
    padding: 60px 16px 80px;
  }

  #signal {
    padding: 80px 20px 60px;
  }

  .signal-row {
    flex-direction: column;
  }

  .signal-button {
    padding: 14px 24px;
  }
}
