/* =============================================
   multipledger.com — Bauhaus Ledger Design System
   Colors: #D4A574 #8B6F47 #F5EDE0 #F0D9B5 #A0522D #3D2B1F #8B9E7C #C4713B #2B1D12
   Fonts: Playfair Display, Lora, Inter, DM Mono, Space Grotesk
   ============================================= */

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

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

body {
  background-color: #F5EDE0;
  color: #2B1D12;
  font-family: 'Lora', Georgia, serif;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ---- Ruled Lines Background ---- */
.ruled-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 39px,
      rgba(139, 111, 71, 0.08) 39px,
      rgba(139, 111, 71, 0.08) 40px
    );
}

.ruled-lines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: rgba(160, 82, 45, 0.06);
}

/* ---- Blob Container ---- */
.blob-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.blob {
  position: absolute;
  will-change: transform;
}

.blob-1 {
  width: 500px;
  height: 500px;
  top: -10%;
  right: -5%;
  z-index: -1;
  animation: blobFloat1 25s ease-in-out infinite;
}

.blob-2 {
  width: 400px;
  height: 400px;
  top: 40%;
  left: -8%;
  z-index: -2;
  animation: blobFloat2 30s ease-in-out infinite;
}

.blob-3 {
  width: 450px;
  height: 450px;
  bottom: -5%;
  right: 20%;
  z-index: -3;
  animation: blobFloat3 28s ease-in-out infinite;
}

.blob-4 {
  width: 380px;
  height: 380px;
  top: 60%;
  left: 30%;
  z-index: -2;
  animation: blobFloat4 22s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(-30px, 40px) rotate(5deg) scale(1.05); }
  66% { transform: translate(20px, -20px) rotate(-3deg) scale(0.95); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(40px, -30px) rotate(-4deg) scale(1.03); }
  66% { transform: translate(-20px, 50px) rotate(6deg) scale(0.97); }
}

@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(-50px, -20px) rotate(3deg) scale(1.04); }
  66% { transform: translate(30px, 30px) rotate(-5deg) scale(0.96); }
}

@keyframes blobFloat4 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(25px, 35px) rotate(-6deg) scale(1.06); }
  66% { transform: translate(-35px, -25px) rotate(4deg) scale(0.94); }
}

/* ---- Logotype ---- */
.logotype {
  position: fixed;
  top: 28px;
  left: 32px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #3D2B1F;
  z-index: 100;
  user-select: none;
  transition: opacity 0.4s ease;
}

/* ---- Navigation Toggle ---- */
.nav-toggle {
  position: fixed;
  top: 24px;
  right: 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #C4713B;
  border: none;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.nav-toggle:hover {
  transform: scale(1.1);
}

.nav-toggle.active {
  background: #A0522D;
  transform: rotate(45deg);
}

.nav-toggle-inner {
  width: 10px;
  height: 10px;
  border: 2px solid #F5EDE0;
  border-radius: 50%;
  transition: border-radius 0.3s ease;
}

.nav-toggle.active .nav-toggle-inner {
  border-radius: 2px;
}

/* ---- Navigation Overlay ---- */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(61, 43, 31, 0.92);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-radial {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-overlay.open .nav-item {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay.open .nav-item-1 { transition-delay: 0.1s; }
.nav-overlay.open .nav-item-2 { transition-delay: 0.2s; }
.nav-overlay.open .nav-item-3 { transition-delay: 0.3s; }
.nav-overlay.open .nav-item-4 { transition-delay: 0.4s; }

.nav-item-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #C4713B;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.nav-item:hover .nav-item-dot {
  transform: scale(1.5);
  background: #D4A574;
}

.nav-item-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #F0D9B5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.nav-item:hover .nav-item-label {
  color: #D4A574;
}

/* ---- Scroll Container ---- */
.scroll-container {
  position: relative;
  z-index: 2;
}

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

/* ---- Opening Section ---- */
.section-opening {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.opening-content {
  text-align: center;
  max-width: 800px;
}

.typewriter-line {
  margin-bottom: 48px;
  height: 20px;
}

.typewriter-text {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8B6F47;
}

.typewriter-cursor {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: #C4713B;
  animation: cursorBlink 0.8s steps(1) infinite;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.opening-headline {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 72px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #2B1D12;
  margin-bottom: 32px;
}

.headline-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.headline-line-1.visible { transition-delay: 0.3s; }
.headline-line-2.visible { transition-delay: 0.6s; }
.headline-line-3.visible { transition-delay: 0.9s; }

.opening-rule {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C4713B, transparent);
  margin: 0 auto 24px;
  transition: width 1.2s ease;
}

.opening-rule.visible {
  width: 200px;
}

.opening-sub {
  font-family: 'Lora', serif;
  font-size: 18px;
  font-style: italic;
  color: #8B6F47;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 1s ease 1.5s, transform 1s ease 1.5s;
}

.opening-sub.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Marginalia (Geometric Accents) ---- */
.marginalia {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.geo-circle {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(196, 113, 59, 0.2);
}

.geo-circle-1 {
  width: 120px;
  height: 120px;
  top: 15%;
  right: 8%;
  animation: geoSpin 40s linear infinite;
}

.geo-circle-2 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 5%;
  border-color: rgba(139, 158, 124, 0.25);
  animation: geoSpin 35s linear infinite reverse;
}

.geo-circle-3 {
  width: 100px;
  height: 100px;
  top: 10%;
  left: 10%;
  border-color: rgba(160, 82, 45, 0.15);
  animation: geoSpin 45s linear infinite;
}

.geo-circle-4 {
  width: 60px;
  height: 60px;
  top: 30%;
  right: 12%;
  border-color: rgba(212, 165, 116, 0.2);
  animation: geoSpin 30s linear infinite reverse;
}

@keyframes geoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.geo-line {
  position: absolute;
  background: rgba(139, 111, 71, 0.12);
}

.geo-line-1 {
  width: 1px;
  height: 200px;
  top: 20%;
  left: 12%;
  transform: rotate(15deg);
}

.geo-line-2 {
  width: 180px;
  height: 1px;
  top: 85%;
  right: 5%;
  transform: rotate(-5deg);
}

.geo-line-3 {
  width: 1px;
  height: 160px;
  bottom: 15%;
  right: 8%;
  transform: rotate(-10deg);
}

.geo-line-4 {
  width: 140px;
  height: 1px;
  top: 20%;
  left: 8%;
  transform: rotate(8deg);
}

.geo-square {
  position: absolute;
  border: 1.5px solid rgba(160, 82, 45, 0.12);
}

.geo-square-1 {
  width: 40px;
  height: 40px;
  bottom: 25%;
  left: 7%;
  transform: rotate(45deg);
  animation: geoSpin 50s linear infinite;
}

.geo-square-2 {
  width: 30px;
  height: 30px;
  top: 15%;
  right: 6%;
  transform: rotate(30deg);
  border-color: rgba(139, 158, 124, 0.18);
  animation: geoSpin 42s linear infinite reverse;
}

.geo-square-3 {
  width: 50px;
  height: 50px;
  bottom: 20%;
  right: 10%;
  transform: rotate(20deg);
  animation: geoSpin 55s linear infinite;
}

/* ---- Ledger Section ---- */
.section-ledger {
  padding: 120px 48px;
  min-height: auto;
}

.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.ledger-col {
  padding: 40px;
}

.ledger-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 2px solid #C4713B;
}

.ledger-credit .ledger-header {
  flex-direction: row;
  justify-content: flex-end;
}

.ledger-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #A0522D;
}

.ledger-header-line {
  flex: 1;
  height: 1px;
  background: rgba(196, 113, 59, 0.3);
}

.ledger-divider {
  display: flex;
  justify-content: center;
}

.ledger-divider-line {
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #C4713B 10%, #C4713B 90%, transparent);
}

.ledger-entry {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ledger-entry.visible {
  opacity: 1;
  transform: translateY(0);
}

.ledger-entry-num {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #C4713B;
  display: block;
  margin-bottom: 8px;
}

.ledger-entry-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #2B1D12;
  margin-bottom: 12px;
}

.ledger-entry-body {
  font-family: 'Lora', serif;
  font-size: 15px;
  line-height: 1.7;
  color: #3D2B1F;
  max-width: 420px;
}

.ledger-credit .ledger-entry {
  text-align: right;
}

.ledger-credit .ledger-entry-body {
  margin-left: auto;
}

/* ---- Principles Section ---- */
.section-principles {
  padding: 120px 48px;
  flex-direction: column;
}

.principles-content {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.principles-intro {
  text-align: center;
  margin-bottom: 80px;
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C4713B;
  display: block;
  margin-bottom: 16px;
}

.principles-headline {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 56px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #2B1D12;
  margin-bottom: 20px;
}

.principles-sub {
  font-family: 'Lora', serif;
  font-size: 18px;
  line-height: 1.65;
  color: #8B6F47;
  max-width: 600px;
  margin: 0 auto;
}

.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.principle-card {
  background: rgba(240, 217, 181, 0.4);
  border: 1px solid rgba(196, 113, 59, 0.12);
  padding: 40px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.principle-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.principle-card:hover {
  box-shadow: 0 8px 40px rgba(43, 29, 18, 0.08);
}

.principle-card-1.visible { transition-delay: 0.1s; }
.principle-card-2.visible { transition-delay: 0.2s; }
.principle-card-3.visible { transition-delay: 0.3s; }
.principle-card-4.visible { transition-delay: 0.4s; }

.principle-number {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 48px;
  color: rgba(196, 113, 59, 0.12);
  line-height: 1;
  margin-bottom: 16px;
}

.principle-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: #2B1D12;
  margin-bottom: 12px;
}

.principle-desc {
  font-family: 'Lora', serif;
  font-size: 14px;
  line-height: 1.7;
  color: #3D2B1F;
}

.principle-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #C4713B, #D4A574, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.principle-card:hover .principle-accent {
  transform: scaleX(1);
}

/* ---- Closing Section ---- */
.section-closing {
  min-height: 80vh;
  flex-direction: column;
}

.closing-content {
  text-align: center;
  max-width: 600px;
}

.closing-rule {
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #A0522D, transparent);
  margin: 0 auto 48px;
}

.closing-headline {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 64px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #2B1D12;
  margin-bottom: 16px;
}

.closing-tagline {
  font-family: 'Lora', serif;
  font-size: 20px;
  font-style: italic;
  color: #8B6F47;
  margin-bottom: 48px;
}

.closing-mono {
  margin-bottom: 48px;
}

.closing-mono-text {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #A0522D;
  opacity: 0.6;
}

.closing-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.signature-line {
  width: 80px;
  height: 1px;
  background: #8B6F47;
}

.signature-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8B6F47;
}

/* ---- Scroll Progress ---- */
.scroll-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(139, 111, 71, 0.1);
  z-index: 100;
}

.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #C4713B, #D4A574);
  transition: width 0.1s linear;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .section {
    padding: 60px 24px;
  }

  .opening-headline {
    font-size: 48px;
  }

  .ledger-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ledger-divider {
    height: 2px;
    width: 100%;
  }

  .ledger-divider-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #C4713B 10%, #C4713B 90%, transparent);
  }

  .ledger-col {
    padding: 24px 0;
  }

  .ledger-credit .ledger-entry {
    text-align: left;
  }

  .ledger-credit .ledger-entry-body {
    margin-left: 0;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principles-headline {
    font-size: 40px;
  }

  .closing-headline {
    font-size: 44px;
  }

  .nav-item-label {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .opening-headline {
    font-size: 36px;
  }

  .logotype {
    font-size: 14px;
    top: 20px;
    left: 20px;
  }

  .nav-toggle {
    top: 16px;
    right: 20px;
  }

  .section {
    padding: 48px 16px;
  }

  .ledger-entry-title {
    font-size: 24px;
  }

  .principles-headline {
    font-size: 32px;
  }

  .closing-headline {
    font-size: 36px;
  }

  .principle-card {
    padding: 24px;
  }
}
