/* transactology.com -- Art Deco observatory, parallax layers */

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

:root {
  --bg-black: #0a0a0a;
  --bg-navy: #0d1b2a;
  --bg-gold: #1a1508;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dark: #8a7233;
  --text: #e8e0cc;
  --muted: #7a7060;
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
  background: var(--bg-black);
  color: var(--text);
  font-family: "Crimson Text", Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

/* Top bar */
.institute-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 20px clamp(28px, 5vw, 64px);
  z-index: 100;
  background: linear-gradient(180deg, rgba(10,10,10,0.9), transparent);
  pointer-events: none;
}

.bar-mono {
  font-family: "Fira Code", "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.bar-domain { color: var(--gold); }

/* Sections */
section {
  position: relative;
  padding: 120px clamp(28px, 6vw, 96px);
  overflow: hidden;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, #14140d 0%, var(--bg-black) 70%);
}

.layer {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layer-i { background: var(--bg-black); }
.layer-ii { background: var(--bg-navy); }
.layer-iii { background: var(--bg-gold); }
.flow-section { background: linear-gradient(180deg, var(--bg-gold), var(--bg-black)); padding-bottom: 160px; }
.footer-observatory { background: var(--bg-black); min-height: 70vh; padding-top: 140px; padding-bottom: 120px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; }

/* Parallax shapes (background layer) */
.parallax-shape {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  z-index: 1;
  color: var(--gold);
}

.spiral-wrap {
  top: 50%;
  left: 50%;
  width: clamp(420px, 60vw, 760px);
  height: clamp(420px, 60vw, 760px);
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.spiral { width: 100%; height: 100%; color: var(--gold); }

#fibPath {
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  animation: drawSpiral 3s ease-out forwards, rotateSpiral 60s linear 3s infinite;
  transform-origin: center;
}

@keyframes drawSpiral {
  to { stroke-dashoffset: 0; }
}

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

.radar {
  top: 50%;
  left: 50%;
  width: clamp(500px, 80vw, 920px);
  height: clamp(500px, 80vw, 920px);
  transform: translate(-50%, -50%);
  opacity: 0.45;
}

.radar svg { width: 100%; height: 100%; color: var(--gold-dark); }

.poly-wrap {
  width: 280px;
  height: 280px;
  opacity: 0.35;
  color: var(--gold);
}

.poly-icosa { top: 18%; right: 8%; }
.poly-dodeca { top: 22%; left: 10%; }
.poly-octa { bottom: 12%; right: 12%; }

.poly-wrap svg { width: 100%; height: 100%; }

.rotate-slow {
  animation: rotateShape 30s linear infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.rotate-counter {
  animation: rotateShape 36s linear infinite reverse;
  transform-origin: center;
  transform-box: fill-box;
}

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

/* Hero content */
.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 900px;
  will-change: transform;
}

.institute-title {
  font-family: "Poiret One", "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 92px);
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 36px;
  text-shadow: 0 0 24px rgba(201, 168, 76, 0.4);
}

.institute-tagline {
  font-family: "Crimson Text", serif;
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.institute-meta {
  font-family: "Fira Code", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Layer content */
.layer-content {
  position: relative;
  z-index: 5;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  will-change: transform;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 800ms var(--spring), transform 800ms var(--spring);
}

section.in-view .layer-content {
  opacity: 1;
  transform: translateY(0);
}

.concept-tag {
  display: inline-block;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  padding: 6px 12px;
  border: 1px solid var(--gold-dark);
  margin-bottom: 32px;
}

.concept-title {
  font-family: "Poiret One", serif;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.1;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}

.concept-lede {
  font-style: italic;
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--text);
  margin-bottom: 28px;
  padding-left: 24px;
  border-left: 1px solid var(--gold-dark);
}

.concept-lede em { color: var(--gold-light); font-style: italic; font-weight: 700; }

.concept-body {
  margin-bottom: 24px;
  color: var(--text);
}

.concept-axiom {
  display: block;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--gold-dark);
  font-family: "Fira Code", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* Flow section */
.flow-section .layer-content { text-align: center; max-width: 720px; }
.flow-title { color: var(--gold-light); }
.flow-lede { padding-left: 0; border-left: none; text-align: center; }

.flow-strip {
  margin-top: 64px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 32px 0 16px;
}

.flow-strip::-webkit-scrollbar { height: 4px; }
.flow-strip::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }
.flow-strip::-webkit-scrollbar-track { background: rgba(201, 168, 76, 0.1); }

.flow-svg {
  width: 100%;
  min-width: 1320px;
  height: 260px;
}

.thread {
  stroke: var(--gold);
  stroke-width: 1.2;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 800ms var(--spring);
}

.flow-section.in-view .thread {
  stroke-dashoffset: 0;
}

.flow-section.in-view .thread.t1 { transition-delay: 0ms; }
.flow-section.in-view .thread.t2 { transition-delay: 150ms; }
.flow-section.in-view .thread.t3 { transition-delay: 300ms; }
.flow-section.in-view .thread.t4 { transition-delay: 450ms; }
.flow-section.in-view .thread.t5 { transition-delay: 600ms; }

.node circle {
  fill: var(--bg-black);
  stroke: var(--gold);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.6));
  transition: transform 600ms var(--spring), stroke 300ms ease;
  transform-origin: center;
  transform-box: fill-box;
}

.node:hover circle {
  transform: scale(1.25);
  stroke: var(--gold-light);
}

.node text {
  text-anchor: middle;
  font-family: "Crimson Text", serif;
  font-style: italic;
  font-size: 16px;
  fill: var(--text);
}

.node text.node-label {
  font-family: "Fira Code", monospace;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: var(--gold);
}

/* Footer atom */
.atom-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.atom-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold-light);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 20px rgba(232, 212, 139, 0.9),
    0 0 40px rgba(201, 168, 76, 0.6),
    0 0 80px rgba(201, 168, 76, 0.3);
  animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.8; }
}

.atom-orbit {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid var(--gold-dark);
  pointer-events: none;
}

.atom-orbit-a {
  width: 120px; height: 120px;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: orbitSpin 12s linear infinite;
  border-style: dashed;
  opacity: 0.4;
}

.atom-orbit-b {
  width: 180px; height: 180px;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: orbitSpin 22s linear infinite reverse;
  opacity: 0.25;
}

@keyframes orbitSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.footer-quote {
  font-family: "Crimson Text", serif;
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px);
  max-width: 640px;
  color: var(--text);
  line-height: 1.7;
}

.footer-quote em { color: var(--gold-light); }

.footer-imprint {
  font-family: "Fira Code", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
}

@media (max-width: 720px) {
  section { padding: 96px 24px; }
  .poly-wrap { width: 180px; height: 180px; }
  .institute-bar { padding: 14px 24px; }
  .institute-title { letter-spacing: 0.15em; }
}
