* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #fbf8f2;
  font-family: 'Inter', ui-sans-serif, sans-serif;
}

.landing {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 76px 20px 90px;
  cursor: none;
}

/* background: creamy textured scan paper */
.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #fbf8f2;
}

.texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.02) 0px, transparent 1px, transparent 3px);
  opacity: 1;
}

/* intro text */
.intro {
  position: relative;
  z-index: 1;
  max-width: 620px;
  width: min(86vw, 620px);
  text-align: justify;
  text-justify: inter-word;
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: #111;
  margin: 0;
}

.intro-name {
  position: relative;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  cursor: pointer;
}

.intro-name--plain {
  font-weight: 400;
}

.intro-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.name-preview {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 130px;
  background: #fdfdf8;
  border: 2px solid #111;
  border-radius: 4px;
  padding: 6px;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 5;
}

.name-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
}

.intro-name:hover .name-preview,
.intro-name:focus .name-preview,
.intro-name.is-active .name-preview {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.intro-primary,
.intro-secondary {
  display: none;
}

/* folders: 2x2 grid right below the text */
.folders {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 108px);
  grid-auto-rows: 78px;
  gap: 52px 60px;
  margin-top: 104px;
}

.folder {
  position: relative;
  width: 88px;
  height: 66px;
  justify-self: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease;
}

.folder:hover,
.folder:focus-visible {
  transform: translateY(-6px);
  outline: none;
}

.folder-tab {
  position: absolute;
  top: -10px;
  left: 9px;
  width: 46%;
  height: 13px;
  background: #fdfdf8;
  border: 2px solid #111;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

.folder-body {
  position: absolute;
  inset: 0;
  background: #fdfdf8;
  border: 2px solid #111;
  border-radius: 2px 5px 5px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.4);
  transition: box-shadow 0.18s ease;
}

.folder:hover .folder-body,
.folder:focus-visible .folder-body {
  box-shadow: 4px 5px 0 rgba(0,0,0,0.4);
}

.flower {
  margin: 0;
  color: #111;
  font-family: 'Courier New', ui-monospace, monospace;
  font-weight: normal;
  font-size: 8px;
  line-height: 0.95;
  letter-spacing: 3px;
  white-space: pre;
  user-select: none;
}

.folder-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  text-align: center;
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #111;
  line-height: 1.3;
}

/* ascii garden hero */
.ascii-garden {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  min-height: 160px;
  margin-top: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  padding: 0 10px;
}

.ascii-tree {
  margin: 0;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: clamp(13px, 2.2vw, 22px);
  line-height: 1.25;
  white-space: pre;
  text-align: left;
  user-select: none;
  color: #171717;
}

.ascii-tree--bounce {
  animation: tree-bounce 2.6s ease-in-out infinite;
}

@keyframes tree-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* popup */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 12, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}

.popup-overlay.open {
  display: flex;
}

.popup-box {
  position: relative;
  background: #fdfdf8;
  border: 2px solid #111;
  border-radius: 6px;
  max-width: 380px;
  width: 100%;
  padding: 32px 28px 28px;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.4);
  font-family: 'Inter', ui-sans-serif, sans-serif;
  color: #111;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #111;
}

.popup-content h2 {
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.popup-content p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
}

.popup-content a {
  display: inline-block;
  color: #111;
  text-decoration: underline;
  font-size: 13px;
}

.popup-content .popup-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.film-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.film-item {
  font-size: 13px;
  line-height: 1.5;
}

.film-item a {
  font-size: 13px;
  margin: 0;
}

.film-year {
  color: #777;
  font-size: 12px;
}

.list-heading {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #555;
  margin-bottom: -2px;
}

.film-cta {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.visitor-count {
  position: relative;
  z-index: 1;
  margin: 40px 0 0;
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #999;
  text-align: center;
}

/* cursor sparkles */
.sparkle {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background: #111;
  clip-path: polygon(
    50% 0%, 61% 39%, 100% 50%, 61% 61%,
    50% 100%, 39% 61%, 0% 50%, 39% 39%
  );
  pointer-events: none;
  z-index: 20;
  animation: sparkle-fade 700ms ease-out forwards;
}

@keyframes sparkle-fade {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.15) rotate(35deg) translateY(-16px);
  }
}

@media (max-width: 700px) {
  .intro-full {
    display: none;
  }
  .intro-primary,
  .intro-secondary {
    display: block;
  }
  .intro-secondary {
    order: 1;
    margin-top: 40px;
  }
  .ascii-garden {
    order: 2;
    margin-top: 24px;
  }

  .name-preview {
    top: auto;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(-6px);
  }

  .intro-name:not(.intro-name--plain) .name-preview {
    top: calc(100% + 12px);
    bottom: auto;
    transform: translateX(-50%) translateY(6px);
  }
}

@media (max-width: 480px) {
  .folders {
    grid-template-columns: repeat(2, 84px);
    gap: 40px 28px;
  }
  .folder {
    width: 76px;
    height: 58px;
  }
  .folder-label {
    width: 110px;
    font-size: 9px;
  }
}
