:root {
  --paper: #f2f0e9;
  --ink: #1a1a1a;
  --muted: #8c8c8c;
  --line: rgba(26, 26, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: var(--paper);
  overflow: hidden;
  cursor: crosshair;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.08;
  mix-blend-mode: multiply;
  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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.time-cursor {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 40;
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: #555;
  opacity: 0.8;
  mix-blend-mode: difference;
}

.subtle-contact {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 40;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease, transform 1s ease;
}

.subtle-contact.is-idle {
  opacity: 1;
  transform: translateY(0);
}

.subtle-contact a {
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.3s ease;
}

.subtle-contact a:hover {
  border-color: var(--ink);
}

.brand {
  position: fixed;
  top: 32px;
  left: 32px;
  z-index: 40;
  mix-blend-mode: darken;
  pointer-events: none;
}

.brand h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 18px;
  margin: 0;
}

.brand p {
  margin: 6px 0 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.6;
}

.stream {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.stream-item {
  position: absolute;
  width: min(720px, 92vw);
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.stream-item.silence {
  width: 2px;
  padding: 0;
  cursor: default;
  pointer-events: none;
}

.stream-item.silence::before {
  content: "";
  width: 1px;
  height: 128px;
  background: rgba(26, 26, 26, 0.2);
  display: block;
}

.item-line {
  width: 1px;
  height: 48px;
  background: rgba(26, 26, 26, 0.1);
  margin-bottom: 16px;
  transition: all 0.5s ease;
}

.stream-item:hover .item-line {
  height: 96px;
  background: var(--ink);
}

.item-card {
  background: var(--paper);
  border: 1px solid transparent;
  padding: 32px;
  text-align: center;
  transition: all 0.6s ease;
  box-shadow: 0 0 0 rgba(26, 26, 26, 0.05);
}

.stream-item:hover .item-card {
  border-color: rgba(26, 26, 26, 0.2);
  box-shadow: 0 24px 60px rgba(26, 26, 26, 0.08);
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.4;
  margin-bottom: 16px;
  transition: opacity 0.5s ease;
}

.stream-item:hover .item-meta {
  opacity: 1;
}

.item-meta span:last-child {
  font-family: "Cormorant Garamond", serif;
  text-transform: none;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.item-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(22px, 4vw, 40px);
  margin: 0 0 8px;
  line-height: 1.2;
  transition: transform 0.6s ease;
}

.stream-item:hover .item-title {
  transform: scale(1.05);
}

.item-action {
  height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.stream-item:hover .item-action {
  height: 24px;
}

.item-action span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-bottom: 1px solid var(--ink);
}

.scale-mark {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 32px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.scale-mark svg {
  width: min(400px, 70vw);
  height: auto;
  color: var(--ink);
}

.instruction {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 1s ease;
  z-index: 10;
}

.instruction.hidden {
  opacity: 0;
}

.instruction-inner {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(26, 26, 26, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(242, 240, 233, 0.95);
  backdrop-filter: blur(4px);
  z-index: 200;
  transition: opacity 0.4s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
}

.modal-card {
  position: relative;
  max-width: 720px;
  width: calc(100% - 48px);
  padding: 48px;
  border-left: 1px solid var(--ink);
  background: transparent;
}

.modal-close {
  position: absolute;
  top: 0;
  left: -12px;
  background: var(--paper);
  border: none;
  padding: 6px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-close svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink);
  stroke-width: 2;
  fill: none;
}

.modal-meta {
  font-family: "Cormorant Garamond", serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.modal-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 5vw, 48px);
  margin: 0 0 24px;
  line-height: 1.1;
}

.modal-content {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  max-width: 520px;
}

.modal-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-footer span {
  font-family: "Cormorant Garamond", serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.fingerprint {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  opacity: 0.2;
}

@media (max-width: 720px) {
  .modal-card {
    padding: 32px;
  }

  .brand {
    top: 24px;
    left: 20px;
  }

  .time-cursor {
    top: 24px;
    right: 20px;
  }

  .subtle-contact {
    bottom: 24px;
    left: 20px;
  }
}
