:root {
  --void: #030305;
  --gold: #c9a84c;
  --gold-soft: rgba(201,168,76,0.6);
  --gold-line: rgba(201,168,76,0.25);
  --ash: #8a7a9a;
  --ash-light: #b0a0c0;
  --white: #f0ecf8;
  --mono: 'Albert Sans', sans-serif;
  --serif: 'Albert Sans', sans-serif;
  --display: 'Albert Sans', sans-serif;
}

html, body {
  width: 100%; height: 100%;
  background: var(--void);
  color: var(--white);
  font-family: var(--serif);
  overflow: hidden;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
}

/* CURSOR */
.cursor {
  display: none;
  position: fixed;
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px 2px rgba(201,168,76,0.6);
  transition: opacity 0.2s;
}
.cursor-ring {
  display: none;
  position: fixed;
  width: 26px; height: 26px;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
body.over-bloom .cursor-ring,
body.over-close .cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--gold);
}

/* HEADER */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1.8rem 2.5rem;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.header.dimmed { opacity: 0.25; }

.brand {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  opacity: 0;
  animation: fadeIn 2s ease 0.8s forwards;
}
.brand-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: #FFFFFF;
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeIn 2s ease 1.2s forwards;
}
.brand-note {
  max-width: 520px;
  margin-top: 0.65rem;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--ash-light);
  opacity: 0;
  animation: fadeIn 2s ease 1.4s forwards;
}
.header-right {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ash);
  font-style: italic;
  opacity: 0;
  animation: fadeIn 2s ease 1.5s forwards;
  pointer-events: auto;
}
.header-right a {
  color: var(--ash);
  text-decoration: none;
  transition: color 0.3s;
  margin-left: 1.5rem;
}
.header-right a:hover { color: var(--gold); }

/* INTRO */
.intro {
  position: fixed;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  text-align: center;
  pointer-events: none;
  transition: opacity 1.2s ease;
}
.intro.hidden { opacity: 0; }

.intro-hint {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
  font-style: italic;
  opacity: 0;
  animation: fadeUp 1.5s ease 2.8s forwards, pulse 3s ease 4.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.intro-hint::before, .intro-hint::after {
  content: '';
  width: 24px; height: 1px;
  background: var(--gold-soft);
}

/* HOVER LABEL */
.bloom-label {
  position: fixed;
  pointer-events: none;
  z-index: 30;
  transform: translate(-50%, -100%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.bloom-label.visible {
  opacity: 1;
}

.bloom-label-num {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.bloom-label-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--white);
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(0,0,0,0.8);
}

/* CENTERED CONTENT — appears when a bloom is opened */
.bloom-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  z-index: 25;
  opacity: 0;
  transition: opacity 0.6s ease 0.5s, transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) 0.5s;
  text-align: center;
  width: 440px;
  max-width: 92vw;
  max-height: min(85vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,168,76,0.4) transparent;
  pointer-events: none;
}
.bloom-content::-webkit-scrollbar { width: 6px; }
.bloom-content::-webkit-scrollbar-track { background: transparent; }
.bloom-content::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,0.4);
  border-radius: 3px;
}
.bloom-content.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.bloom-content-heading {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.85rem;
  max-width: 100%;
  margin-bottom: 0.6rem;
}

.bloom-content-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  font-style: italic;
  font-weight: 300;
  flex: 0 0 auto;
}
.bloom-content-title {
  min-width: 0;
  font-family: var(--display);
  font-weight: 200;
  font-size: 2rem;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 0;
  text-shadow: 0 0 24px rgba(3,3,5,0.95), 0 0 12px rgba(3,3,5,0.95);
}
.bloom-content-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ash-light);
  margin-bottom: 1.8rem;
  text-shadow: 0 0 14px rgba(3,3,5,0.9);
}

/* DECORATIVE SEPARATOR */
.bloom-separator {
  width: 30px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto 1.8rem;
}

/* Focus blocks */
.bloom-content.focus-open {
  width: 680px;
}

.bloom-content.about-open {
  width: min(640px, calc(100vw - 4rem));
  max-height: min(90vh, 720px);
}

.bloom-content.about-open .bloom-content-sub {
  margin-bottom: 1.25rem;
}

.bloom-content.about-open .bloom-separator {
  margin-bottom: 1.25rem;
}

.bloom-content.about-open .narrative {
  padding: 1.25rem 1.45rem;
  font-size: 0.9rem;
  line-height: 1.56;
  margin-bottom: 1rem;
}

.bloom-content.about-open .narrative p + p {
  margin-top: 0.7rem;
}

.bloom-content.about-open .narrative-cta {
  padding: 0.55rem 1rem;
  font-size: 0.68rem;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

/* Equalize primary (narrative-cta) and secondary (back-button) widths inside About */
.bloom-content.about-open .narrative-cta,
.bloom-content.about-open .back-button {
  min-width: 200px;
  justify-content: center;
  margin-inline: auto;
  letter-spacing: 0.02em;
}
.bloom-content.about-open .back-button {
  margin-top: 0.25rem;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.8rem;
  text-align: left;
}

.focus-card {
  min-height: 164px;
  padding: 1rem;
  border: 1px solid rgba(201,168,76,0.24);
  background:
    linear-gradient(145deg, rgba(15,12,24,0.9), rgba(39,19,45,0.56));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.focus-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 1px;
  background: var(--gold);
  opacity: 0.8;
}

.focus-card-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.72rem;
}

.focus-card h3 {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--white);
  margin-bottom: 1.2rem;
}

.focus-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem;
  margin-top: auto;
}

.focus-keywords span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.34rem 0.52rem;
  border: 1px solid rgba(176,160,192,0.18);
  background: rgba(3,3,5,0.28);
  color: var(--ash-light);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

/* Sub-links */
.sub-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 2rem;
}

.sub-link {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--white);
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid rgba(201,168,76,0.25);
  background: rgba(15,12,24,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.35s ease;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 280px;
  justify-content: space-between;
}
.sub-link::before {
  content: '✿';
  color: var(--gold);
  font-size: 0.7rem;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}
.sub-link > span:first-child {
  flex: 1;
  text-align: left;
}
.sub-link:hover {
  border-color: var(--gold);
  background: rgba(107,31,107,0.28);
  color: var(--gold);
  transform: translateX(4px);
}
.sub-link:hover::before {
  opacity: 1;
  transform: rotate(45deg) scale(1.2);
}

.sub-link-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--ash);
  font-style: italic;
  font-weight: 300;
}

.sub-link.view-all {
  margin-top: 0.5rem;
  background: rgba(201,168,76,0.1);
  border-color: rgba(201,168,76,0.5);
  color: var(--gold);
  font-style: italic;
  font-size: 0.85rem;
}
.sub-link.view-all::before { content: '→'; }

/* Hidden extras revealed by the "Show all" button */
.sub-link.extra {
  display: none;
  opacity: 0;
  transform: translateY(-4px);
}
.sub-links.expanded .sub-link.extra {
  display: flex;
  animation: subLinkReveal 0.4s ease forwards;
}
@keyframes subLinkReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* "Show all" toggle button — styled like a view-all sub-link */
button.sub-link {
  font: inherit;
  font-family: var(--display);
  font-weight: 400;
  cursor: pointer;
  appearance: none;
}
.sub-link.show-all {
  margin-top: 0.5rem;
  background: rgba(201,168,76,0.1);
  border-color: rgba(201,168,76,0.5);
  color: var(--gold);
  font-style: italic;
  font-size: 0.85rem;
}
.sub-link.show-all::before { content: '+'; font-style: normal; }
.sub-link.show-all:hover::before {
  transform: rotate(180deg) scale(1.2);
}

/* Adaptive contrast — strengthen the backdrop when a CTA sits on a light petal.
   Toggled by JS (sampleCTAContrast). Regular sub-links go slightly *more* opaque than
   their default (0.78) so they don't appear thinner on bright petals; the gold-tinted
   CTAs (narrative-cta, view-all, show-all, back-button) sit in the middle with stronger blur. */
.sub-link.on-light {
  background: rgba(15,12,24,0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.narrative-cta.on-light,
.back-button.on-light {
  background: rgba(15,12,24,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.sub-link.view-all.on-light,
.sub-link.show-all.on-light {
  background: rgba(15,12,24,0.6);
  border-color: rgba(201,168,76,0.6);
}
.back-button.on-light {
  border-color: rgba(240,236,248,0.4);
  color: var(--white);
}
.sub-link.on-light:hover {
  background: rgba(107,31,107,0.55);
}
.sub-link.view-all.on-light:hover,
.sub-link.show-all.on-light:hover {
  background: rgba(15,12,24,0.74);
}

/* NARRATIVE CONTAINER — used for About bloom */
.narrative {
  padding: 1.6rem 1.8rem;
  border: 1px solid rgba(201,168,76,0.2);
  background: rgba(15,12,24,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ash-light);
  text-align: left;
  margin-bottom: 1.4rem;
  position: relative;
}
.narrative::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 30px; height: 1px;
  background: var(--gold);
}
.narrative em {
  color: var(--white);
  font-style: italic;
  font-weight: 400;
}
.narrative p {
  margin: 0;
}
.narrative p + p {
  margin-top: 1rem;
}

.narrative-cta {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--gold);
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid rgba(201,168,76,0.5);
  background: rgba(201,168,76,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.35s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-style: italic;
  margin-bottom: 1.5rem;
}
.narrative-cta::after {
  content: '→';
  font-style: normal;
  transition: transform 0.3s;
}
.narrative-cta:hover {
  background: rgba(201,168,76,0.18);
  color: var(--white);
  border-color: var(--gold);
}
.narrative-cta:hover::after {
  transform: translateX(4px);
}

/* ANALOGUE ARCHIVE */
.bloom-content.analogue-open {
  width: min(1120px, 92vw);
  height: min(760px, 86vh);
  max-height: min(760px, 86vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bloom-content.analogue-open .bloom-content-sub {
  margin-bottom: 1.2rem;
}
.bloom-content.analogue-open .bloom-separator {
  margin-bottom: 1rem;
  flex: 0 0 auto;
}

.analogue-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(201,168,76,0.28);
  background:
    repeating-linear-gradient(120deg, rgba(240,236,248,0.018) 0 1px, transparent 1px 18px),
    rgba(8,6,14,0.84);
  box-shadow: 0 24px 80px rgba(0,0,0,0.38), inset 0 1px 0 rgba(240,236,248,0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  text-align: left;
  position: relative;
}
.analogue-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1rem 1.2rem 0.8rem;
  border-bottom: 1px solid rgba(201,168,76,0.16);
  background: rgba(3,3,5,0.42);
}
.analogue-tab {
  appearance: none;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ash);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.25rem 0 0.45rem;
  transition: color 0.25s, border-color 0.25s;
}
.analogue-tab.active {
  color: var(--white);
  border-color: var(--gold);
}
.analogue-tab:hover {
  color: var(--gold);
}
.analogue-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
.analogue-tab-panel {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,168,76,0.4) transparent;
}
.analogue-tab-panel::-webkit-scrollbar { width: 6px; }
.analogue-tab-panel::-webkit-scrollbar-track { background: transparent; }
.analogue-tab-panel::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,0.4);
  border-radius: 3px;
}

.photo-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.photo-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
.photo-item {
  appearance: none;
  border: 1px solid rgba(201,168,76,0.18);
  background: rgba(15,12,24,0.62);
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  padding: 0.8rem;
  text-align: left;
  transition: border-color 0.28s, background 0.28s, transform 0.28s;
}
.photo-item:hover {
  border-color: rgba(201,168,76,0.65);
  background: rgba(107,31,107,0.2);
  transform: translateY(-2px);
}
.photo-placeholder {
  display: block;
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(240,236,248,0.08);
  background:
    linear-gradient(135deg, rgba(201,168,76,0.24), transparent 38%),
    linear-gradient(315deg, rgba(196,69,90,0.22), rgba(107,31,107,0.22));
}
.photo-placeholder::after {
  content: '';
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(240,236,248,0.12);
}
.photo-placeholder > span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(240,236,248,0.08), transparent),
    repeating-linear-gradient(0deg, rgba(3,3,5,0.18) 0 2px, transparent 2px 9px);
  opacity: 0.75;
}
.photo-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.photo-placeholder.has-image::after { display: none; }
.photo-item:hover .photo-placeholder img { transform: scale(1.025); }
.photo-item.portrait .photo-placeholder {
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(201,168,76,0.16), transparent 42%),
    linear-gradient(315deg, rgba(196,69,90,0.14), rgba(107,31,107,0.16));
}
.photo-item.portrait .photo-placeholder::after {
  inset: 9% 31%;
  background: rgba(3,3,5,0.16);
}
.photo-item.portrait .photo-placeholder > span {
  inset: 9% 31%;
  border: 1px solid rgba(240,236,248,0.1);
  box-shadow: 0 18px 36px rgba(0,0,0,0.34);
}
.photo-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  padding: 0;
  text-align: left;
}
.photo-meta span:first-child {
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--white);
  overflow-wrap: anywhere;
}
.photo-meta span:last-child {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ash-light);
}

.sound-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.sound-card {
  min-height: 220px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.2rem;
  border: 1px solid rgba(201,168,76,0.18);
  background: rgba(15,12,24,0.62);
  padding: 1.2rem;
}
.sound-index {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  font-style: italic;
  letter-spacing: 0.08em;
}
.sound-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sound-collaborator {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ash);
  font-style: italic;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}
.sound-card h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 0.8rem;
  overflow-wrap: anywhere;
}
.sound-card p {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ash-light);
  margin-bottom: 1rem;
}
.sound-meta {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ash);
}
.sound-link {
  width: fit-content;
  margin-top: 1rem;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.86rem;
  font-style: italic;
  border-bottom: 1px solid rgba(201,168,76,0.45);
  transition: color 0.25s, border-color 0.25s;
}
.sound-link:hover {
  color: var(--white);
  border-color: var(--white);
}

.photo-lightbox {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  background: rgba(3,3,5,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.photo-lightbox[hidden],
.analogue-panel[hidden] {
  display: none;
}
.photo-lightbox-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.photo-lightbox-figure {
  max-width: min(780px, 74vw);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.photo-lightbox-art {
  display: block;
  width: auto;
  height: auto;
  max-width: min(900px, 84vw);
  max-height: calc(100vh - 220px);
  object-fit: contain;
  border: 1px solid rgba(201,168,76,0.35);
  background: rgba(3,3,5,0.4);
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}
.photo-lightbox-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ash-light);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-style: italic;
}
.lightbox-button {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(201,168,76,0.32);
  background: rgba(15,12,24,0.82);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.lightbox-button:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(107,31,107,0.28);
}
.lightbox-close {
  top: 0;
  right: 0;
}
.lightbox-prev {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* LINK PREVIEW — shared hover card next to a sub-link */
.link-preview {
  position: fixed;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;

  max-width: 280px;
  padding: 0.95rem 1.15rem;
  background: rgba(15,12,24,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201,168,76,0.3);
  text-align: left;
}
.link-preview.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.link-preview.flip-left { transform: translateY(-50%) translateX(6px); }
.link-preview.flip-left.visible { transform: translateY(-50%) translateX(0); }
.link-preview-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 0.45rem;
  letter-spacing: -0.005em;
}
.link-preview-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ash-light);
  line-height: 1.55;
}
@media (hover: none), (max-width: 700px) {
  .link-preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .link-preview { transition: none; }
}

/* ABOUT EXTENDED — full-story overlay layered on top of the About bloom */
.about-extended {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 2rem 1.6rem;
  background: rgba(3,3,5,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.about-extended.open {
  opacity: 1;
  pointer-events: auto;
}
.about-extended[hidden] { display: none; }
.about-extended-shell {
  position: relative;
  width: min(940px, 100%);
  max-height: 100%;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2.4rem;
  align-items: stretch;
  text-align: left;
  padding: 2.2rem 2.2rem 2rem;
  border: 1px solid rgba(201,168,76,0.22);
  background: linear-gradient(160deg, rgba(15,12,24,0.85), rgba(39,19,45,0.72));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,168,76,0.4) transparent;
  transform-origin: center center;
  opacity: 0;
  transform: scale(0.72);
  transition: transform 0.55s cubic-bezier(0.22, 0.9, 0.3, 1.05),
              opacity 0.4s ease 0.05s;
}
.about-extended.open .about-extended-shell {
  opacity: 1;
  transform: scale(1);
}
/* New content (photo + bio) fades in inside the growing container */
.about-extended-photo,
.about-extended-body {
  opacity: 0;
  transition: opacity 0.4s ease 0.28s;
}
.about-extended.open .about-extended-photo,
.about-extended.open .about-extended-body {
  opacity: 1;
}
.about-extended-shell::-webkit-scrollbar { width: 6px; }
.about-extended-shell::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,0.4);
  border-radius: 3px;
}
.about-extended-photo {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border: 1px solid rgba(201,168,76,0.32);
  display: block;
}
.about-extended-body {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ash-light);
  font-weight: 300;
}
.about-extended-body h3 {
  font-family: var(--display);
  font-weight: 200;
  font-size: 1.45rem;
  color: var(--white);
  margin-bottom: 0.95rem;
  letter-spacing: -0.01em;
}
.about-extended-body p + p { margin-top: 0.7rem; }
.about-extended-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--gold);
  background: rgba(201,168,76,0.08);
  padding: 0.05em 0.35em;
  border-radius: 2px;
}
.about-extended-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 1;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
}

@media (max-width: 760px) {
  .about-extended {
    padding: 1rem;
    place-items: start center;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .about-extended-shell {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.8rem 1.5rem;
    max-height: none;
    overflow: visible;
  }
  .about-extended-photo {
    aspect-ratio: 4 / 5;
    height: auto;
    width: 100%;
    max-height: 60vh;
    object-position: center top;
  }
  .about-extended-body { font-size: 0.92rem; line-height: 1.6; }
  .about-extended-body h3 { font-size: 1.3rem; margin-bottom: 0.9rem; }
  .about-extended-close { top: 0.6rem; right: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .about-extended,
  .about-extended-shell,
  .about-extended-photo,
  .about-extended-body {
    transition: none;
  }
  .about-extended-shell,
  .about-extended.open .about-extended-shell {
    transform: none;
  }
  .about-extended-photo,
  .about-extended-body {
    opacity: 1;
  }
}

/* CLEAR CLOSE BUTTON — labeled, primary affordance */
.back-button {
  margin-top: 1rem;
  width: fit-content;
  align-self: center;
  background: none;
  border: 1px solid rgba(138,122,154,0.25);
  padding: 0.55rem 1rem;
  color: var(--ash);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  font-style: italic;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.back-button::before {
  content: '←';
  font-size: 0.78rem;
  transition: transform 0.3s;
}
.back-button:hover {
  color: var(--white);
  border-color: var(--gold);
  background: rgba(201,168,76,0.05);
}
.back-button:hover::before {
  transform: translateX(-3px);
}

/* FOCUS RINGS — keyboard-only, visible on dark background */
:where(.map-dot, .back-button, .sub-link, .narrative-cta, .analogue-tab, .photo-item, .lightbox-button, .sound-link, .header-right a):focus {
  outline: none;
}
.bloom-content:focus { outline: none; }
.map-dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
  box-shadow: 0 0 12px var(--gold);
}
.back-button:focus-visible,
.sub-link:focus-visible,
.narrative-cta:focus-visible,
.analogue-tab:focus-visible,
.photo-item:focus-visible,
.lightbox-button:focus-visible,
.sound-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.header-right a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  color: var(--gold);
}

/* Secondary close hint */
.close-hint {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: rgba(138,122,154,0.5);
  font-style: italic;
  margin-top: 1.2rem;
}

/* MINI MAP */
.garden-map {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 40;
  opacity: 0;
  animation: fadeIn 1.5s ease 3.5s forwards;
  transition: opacity 0.6s ease;
}
.garden-map.dimmed { opacity: 0.25; }

.map-dot {
  width: 28px; height: 28px;
  margin: -11px;
  transition: all 0.3s;
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  font: inherit;
  color: inherit;
  outline: none;
}
.map-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s;
}
.map-dot::after {
  content: attr(data-label);
  position: absolute;
  right: calc(50% + 12px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ash);
  font-style: italic;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}
.map-dot:hover::after, .map-dot.active::after { opacity: 1; }
.map-dot:hover::before, .map-dot.active::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@media (hover: hover) and (pointer: fine) {
  html,
  body,
  .header-right a,
  .sub-link,
  .narrative-cta,
  .analogue-tab,
  .photo-item,
  .lightbox-button,
  .sound-link,
  .back-button,
  .map-dot {
    cursor: none;
  }

  .cursor,
  .cursor-ring {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .brand-sub,
  .brand-note,
  .header-right,
  .intro-hint,
  .garden-map {
    animation: none;
    opacity: 1;
  }

  .bloom-content {
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.6s ease;
  }

  .bloom-content.visible {
    transform: translate(-50%, -50%) scale(1);
  }

  .header,
  .intro,
  .cursor,
  .cursor-ring,
  .sub-link,
  .sub-link::before,
  .narrative-cta,
  .narrative-cta::after,
  .analogue-tab,
  .photo-item,
  .lightbox-button,
  .sound-link,
  .back-button,
  .back-button::before,
  .garden-map,
  .map-dot,
  .map-dot::after {
    transition: none;
  }

  .sub-link:hover,
  .sub-link:hover::before,
  .narrative-cta:hover::after,
  .photo-item:hover,
  .back-button:hover::before {
    transform: none;
  }

  .sub-links.expanded .sub-link.extra {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 700px) {
  .header { padding: 1.2rem 1.5rem; }
  .header.dimmed { opacity: 0; pointer-events: none; }
  .header-right { display: none; }
  .bloom-content { width: 320px; }
  .bloom-content-heading {
    gap: 0.55rem;
  }
  .bloom-content.about-open {
    width: calc(100vw - 1.25rem);
    max-height: calc(100dvh - 1rem);
    scrollbar-width: none;
  }
  .bloom-content.about-open::-webkit-scrollbar {
    display: none;
  }
  .bloom-content.about-open .narrative {
    padding: 1rem 1.1rem;
    font-size: 0.82rem;
    line-height: 1.48;
  }
  .bloom-content.about-open .narrative p + p {
    margin-top: 0.55rem;
  }
  .bloom-content.about-open .bloom-content-title {
    font-size: 1.65rem;
  }
  .bloom-content.about-open .bloom-content-sub {
    margin-bottom: 0.95rem;
  }
  .bloom-content.about-open .bloom-separator {
    margin-bottom: 0.95rem;
  }
  .bloom-content.about-open .narrative-cta {
    margin-bottom: 0.4rem;
  }
  .bloom-content.focus-open {
    width: min(360px, calc(100vw - 1.25rem));
    max-height: min(86dvh, 720px);
  }
  .focus-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
  }
  .focus-card {
    min-height: 126px;
    padding: 0.82rem;
  }
  .focus-card-num {
    margin-bottom: 0.45rem;
  }
  .focus-card h3 {
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
  }
  .focus-keywords {
    gap: 0.34rem;
  }
  .focus-keywords span {
    min-height: 24px;
    padding: 0.3rem 0.42rem;
    font-size: 0.62rem;
  }
  .bloom-content.analogue-open {
    width: calc(100vw - 1rem);
    height: min(560px, calc(100dvh - 4rem));
    max-height: min(560px, calc(100dvh - 4rem));
  }
  .photo-group {
    grid-template-columns: 1fr;
  }
  .bloom-content.analogue-open .bloom-content-heading {
    margin-bottom: 0.35rem;
  }
  .bloom-content.analogue-open .bloom-content-title {
    font-size: 1.45rem;
  }
  .bloom-content.analogue-open .bloom-content-sub {
    font-size: 0.78rem;
    margin-bottom: 0.8rem;
  }
  .bloom-content.analogue-open .bloom-separator {
    margin-bottom: 0.7rem;
  }
  .analogue-tabs {
    gap: 1rem;
    padding: 0.85rem 1rem 0.65rem;
  }
  .analogue-tab-panel {
    padding: 0.8rem;
  }
  .photo-list,
  .photo-group {
    gap: 0.75rem;
  }
  .photo-item {
    gap: 0.5rem;
    padding: 0.62rem;
  }
  .photo-meta {
    gap: 0.12rem;
  }
  .photo-meta span:first-child {
    font-size: 0.78rem;
  }
  .photo-meta span:last-child {
    font-size: 0.7rem;
  }
  .sound-list {
    grid-template-columns: 1fr;
  }
  .sound-card {
    min-height: 0;
    grid-template-columns: 34px 1fr;
    gap: 0.85rem;
    padding: 1rem;
  }
  .sound-card h3 {
    font-size: 1.08rem;
  }
  .photo-lightbox {
    padding: 0.8rem;
  }
  .photo-lightbox-figure {
    width: min(100%, 90vw);
  }
  .photo-lightbox-art {
    max-width: 90vw;
    max-height: calc(100vh - 180px);
  }
  .photo-lightbox-figure figcaption {
    flex-direction: column;
    gap: 0.25rem;
  }
  .lightbox-button {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  .sub-link { min-width: 240px; font-size: 0.7rem; padding: 0.7rem 1.1rem; }
  .garden-map { right: 1rem; }
  .map-dot::after { display: none; }
}
