:root {
  color-scheme: dark;
  --bg: #060814;
  --bg-elevated: rgba(14, 21, 38, 0.82);
  --bg-panel: rgba(18, 28, 48, 0.72);
  --bg-panel-strong: rgba(18, 28, 48, 0.92);
  --line: rgba(190, 207, 232, 0.18);
  --line-strong: rgba(206, 220, 243, 0.28);
  --text: #edf2fb;
  --text-soft: #b4bfd4;
  --accent: #d7e7ff;
  --accent-soft: rgba(215, 231, 255, 0.16);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  --radius: 1.5rem;
  --radius-lg: 2rem;
  --container: min(1120px, calc(100vw - 2rem));
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Cormorant Garamond", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(circle at top, rgba(62, 88, 130, 0.18), transparent 32rem),
    linear-gradient(180deg, #08101d 0%, #060814 42%, #05060d 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid rgba(222, 235, 255, 0.9);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(8, 13, 26, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transform: translateY(-200%);
  transition: transform 180ms ease;
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: var(--space-3xl) 0;
}

.page-home main > .section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 960px;
}

.section--tight {
  padding-top: 0;
}

.section--closing {
  padding-top: var(--space-xl);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.8rem 0;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.6);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  margin-top: 1rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a,
.nav-toggle {
  color: var(--text-soft);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  transition: color 180ms ease, background-color 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(214, 226, 245, 0.08);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(92vh, 58rem);
  padding: 8rem 0 4rem;
  overflow: clip;
}

.hero__media,
.hero__backdrop,
.hero__canvas,
.hero__dust,
.hero__orb,
.hero__streak,
.hero__haze,
.hero__horizon,
.hero__wash {
  position: absolute;
  inset: 0;
}

.hero__media {
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 68%,
    rgba(0, 0, 0, 0.96) 76%,
    rgba(0, 0, 0, 0.72) 84%,
    rgba(0, 0, 0, 0.32) 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 68%,
    rgba(0, 0, 0, 0.96) 76%,
    rgba(0, 0, 0, 0.72) 84%,
    rgba(0, 0, 0, 0.32) 92%,
    transparent 100%
  );
}

.hero__backdrop,
.hero__canvas,
.hero__dust,
.hero__orb,
.hero__streak,
.hero__haze,
.hero__horizon {
  transform: translate3d(calc(var(--hero-x, 0) * 1px), calc(var(--hero-y, 0) * 1px), 0);
  transition: transform 260ms ease-out;
}

.hero__backdrop {
  background:
    radial-gradient(circle at 50% 14%, rgba(99, 122, 178, 0.22), transparent 28%),
    radial-gradient(circle at 20% 18%, rgba(57, 77, 120, 0.26), transparent 34%),
    radial-gradient(circle at 84% 22%, rgba(85, 95, 147, 0.18), transparent 24%),
    linear-gradient(180deg, #0b1222 0%, #091120 38%, #070c16 64%, #06070f 100%);
}

.hero__canvas {
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.95;
}

.hero__dust {
  filter: blur(48px);
  opacity: 0.28;
  z-index: 2;
}

.hero__dust--one {
  background:
    radial-gradient(circle at 30% 38%, rgba(176, 192, 235, 0.16), transparent 22%),
    radial-gradient(circle at 64% 30%, rgba(120, 136, 189, 0.12), transparent 20%),
    radial-gradient(circle at 82% 42%, rgba(164, 154, 215, 0.1), transparent 16%);
  animation: drift 34s linear infinite;
}

.hero__dust--two {
  background:
    radial-gradient(circle at 18% 48%, rgba(92, 109, 162, 0.18), transparent 18%),
    radial-gradient(circle at 58% 18%, rgba(198, 213, 247, 0.08), transparent 16%),
    radial-gradient(circle at 78% 28%, rgba(131, 145, 203, 0.14), transparent 17%);
  animation: drift 40s linear infinite reverse;
}

.hero__orb {
  inset: 12% auto auto 67%;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(251, 253, 255, 0.92), rgba(215, 224, 247, 0.82) 40%, rgba(138, 155, 197, 0.14) 70%, transparent 72%);
  filter: blur(1px);
  opacity: 0.85;
  box-shadow: 0 0 80px rgba(201, 215, 248, 0.18);
  z-index: 3;
}

.hero__streak {
  inset: auto auto auto 12%;
  width: 34rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209, 220, 247, 0.22), transparent);
  filter: blur(0.6px);
  opacity: 0.35;
  z-index: 3;
}

.hero__streak--one {
  top: 24%;
  rotate: 12deg;
}

.hero__streak--two {
  top: 42%;
  left: 52%;
  width: 22rem;
  opacity: 0.16;
  rotate: -10deg;
}

.hero__haze {
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.18;
}

.hero__haze--one {
  inset: auto auto 14% -8%;
  width: 42rem;
  height: 18rem;
  background: rgba(164, 180, 220, 0.14);
  animation: drift 30s linear infinite;
}

.hero__haze--two {
  inset: 8% -8% auto auto;
  width: 36rem;
  height: 15rem;
  background: rgba(104, 118, 176, 0.16);
  animation: drift 36s linear infinite reverse;
}

.hero__horizon {
  inset: auto 0 0;
  height: 28%;
  background:
    radial-gradient(circle at 16% 140%, rgba(82, 103, 145, 0.34), transparent 42%),
    radial-gradient(circle at 70% 130%, rgba(61, 76, 118, 0.28), transparent 34%),
    linear-gradient(180deg, transparent 0%, rgba(7, 10, 18, 0.22) 16%, rgba(5, 8, 14, 0.88) 60%, rgba(3, 5, 10, 0.98) 100%);
  clip-path: polygon(0 72%, 8% 68%, 13% 70%, 19% 64%, 27% 67%, 34% 60%, 41% 65%, 50% 57%, 57% 63%, 66% 54%, 74% 61%, 82% 56%, 90% 62%, 100% 58%, 100% 100%, 0 100%);
  z-index: 4;
}

.hero__wash {
  background:
    linear-gradient(180deg, rgba(6, 10, 18, 0.18) 0%, rgba(6, 10, 18, 0.24) 20%, rgba(5, 8, 16, 0.72) 72%, rgba(5, 8, 14, 0.92) 100%),
    radial-gradient(circle at center 18%, rgba(130, 151, 192, 0.05), transparent 30%);
  z-index: 5;
}

.hero__content {
  position: relative;
  z-index: 6;
  max-width: 44rem;
  padding-bottom: var(--space-xl);
}

.page-home .hero__content,
.page-home .hero__content[data-reveal] {
  opacity: 1;
  transform: none;
}

.eyebrow,
.section-label {
  margin: 0 0 0.85rem;
  color: var(--text-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero h1,
.section-title,
.closing-line,
.about-panel h2 {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3.8rem, 10vw, 7rem);
  max-width: 10ch;
}

.hero__lede,
.lead {
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  max-width: 38rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: rgba(223, 233, 247, 0.1);
  border-color: rgba(225, 235, 250, 0.24);
  backdrop-filter: blur(12px);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.02);
}

.text-link {
  color: var(--accent);
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.intro-grid,
.section-head,
.footer-shell,
.about-panels {
  display: grid;
  gap: 1.5rem;
}

.intro-grid {
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
}

.section-head,
.footer-shell {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.feature-grid,
.notes-preview,
.notes-index,
.about-panels {
  display: grid;
  gap: 1.25rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scene-card,
.note-teaser,
.note-index-card,
.note-entry,
.about-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.72), rgba(9, 14, 24, 0.88));
  box-shadow: var(--shadow);
}

.scene-card {
  overflow: clip;
}

.scene-card img {
  width: 100%;
  aspect-ratio: 4 / 4.8;
  object-fit: cover;
}

.scene-card__body,
.note-teaser,
.note-index-card,
.about-panel {
  padding: 1.35rem;
}

.scene-card h3,
.note-teaser h3,
.note-index-card h2,
.note-entry h2 {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.1;
}

.scene-card p,
.note-teaser p,
.note-index-card p,
.note-entry p,
.about-panel p,
.site-footer p {
  margin: 0;
  color: var(--text-soft);
}

.notes-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note-teaser {
  padding: 1.5rem;
}

.closing-line {
  font-size: clamp(2rem, 5vw, 3.5rem);
  max-width: 12ch;
}

.page-intro {
  padding-bottom: 2rem;
}

.page-404 {
  overflow-x: clip;
}

.not-found {
  position: relative;
  min-height: calc(100vh - 11rem);
  display: grid;
  align-items: center;
  overflow: clip;
}

.not-found::before,
.not-found::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.not-found::before {
  inset: 8% auto auto -8%;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle, rgba(115, 137, 186, 0.16), transparent 68%);
  filter: blur(12px);
}

.not-found::after {
  inset: auto -10% 6% auto;
  width: 24rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(173, 192, 232, 0.12), transparent 70%);
  filter: blur(24px);
}

.not-found__shell {
  position: relative;
  z-index: 1;
  max-width: 56rem;
}

.not-found__panel {
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at top right, rgba(132, 153, 197, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(19, 29, 49, 0.84), rgba(8, 12, 22, 0.94));
}

.not-found__panel .section-title {
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  max-width: none;
}

.not-found__panel .section-label {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(4.8rem, 16vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--accent);
}

.not-found__panel .lead {
  margin-top: 1.25rem;
  max-width: 34rem;
}

.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.1rem;
}

.gallery-card {
  grid-column: span 4;
  overflow: clip;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.gallery-card--wide {
  grid-column: span 8;
}

.gallery-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.gallery-button img {
  width: 100%;
  aspect-ratio: 4 / 3.25;
  object-fit: cover;
}

.gallery-card__meta {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1.15rem;
}

.gallery-card__meta strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.gallery-card__meta span:last-child {
  color: var(--text-soft);
}

.notes-index {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note-index-card {
  transition: border-color 180ms ease, transform 180ms ease;
}

.note-index-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.note-stack {
  display: grid;
  gap: 1.25rem;
  max-width: 50rem;
}

.note-entry {
  padding: 1.8rem;
}

.about-copy {
  display: grid;
  gap: 1rem;
  max-width: 38rem;
}

.lightbox {
  width: min(96vw, 78rem);
  border: 1px solid rgba(234, 239, 248, 0.16);
  border-radius: 1.5rem;
  padding: 1rem;
  background: rgba(7, 10, 18, 0.94);
  color: var(--text);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.42);
}

.lightbox::backdrop {
  background: rgba(3, 5, 10, 0.82);
  backdrop-filter: blur(8px);
}

.lightbox__close {
  display: inline-flex;
  margin-left: auto;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.lightbox__figure {
  margin: 0;
}

.lightbox__image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 1rem;
}

.lightbox__caption {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 0 0.35rem;
}

.lightbox__caption strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.lightbox__caption span {
  color: var(--text-soft);
}

.site-footer {
  padding: 0 0 2.5rem;
}

.footer-shell {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes drift {
  from {
    transform: translateX(-3%) translateY(0);
  }

  to {
    transform: translateX(3%) translateY(-2%);
  }
}

@media (max-width: 980px) {
  .intro-grid,
  .section-head,
  .notes-preview,
  .about-panels,
  .notes-index,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card--wide {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  html {
    scroll-behavior: auto;
  }

  .section {
    padding: 5.5rem 0;
  }

  .nav-shell {
    flex-wrap: wrap;
    border-radius: 1.25rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.4rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero {
    min-height: 42rem;
    padding-top: 6rem;
  }

  .hero__content {
    padding-bottom: 1.5rem;
  }

  .hero__orb {
    inset: 10% auto auto 60%;
    width: 8rem;
    height: 8rem;
  }

  .hero__streak {
    width: 16rem;
  }

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

  .gallery-card,
  .gallery-card--wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
