/* ── reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── base ── */
:root {
  --black: #000000;
  --white: #e8e8e8;
  --dim: #555;
  --rule: #333;
  --surface: #0a0a0a;
  --gold: #c9a84c;
  --gold-faint: #c9a84c33;
  --mono: 'JetBrains Mono', monospace;
  --col: 680px;
  --gap: 80px;
}

html {
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  cursor: crosshair;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #333;
  color: #fff;
}

body {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--white);
  text-decoration: none;
  cursor: crosshair;
}

a:hover {
  color: #fff;
  transition: none;
}

/* ── header ── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.header-year {
  color: var(--dim);
}

/* ── rules ── */
.rule {
  color: var(--rule);
  font-size: 0.65rem;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

/* ── carousel ── */
.carousel {
  padding: var(--gap) 0;
}

.carousel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #222;
  background: var(--black);
}

.carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  will-change: opacity, transform;
}

.carousel-img:not(.carousel-img--loaded) {
  filter: blur(20px);
}

.carousel-img--visible {
  opacity: 1;
}

.carousel-img--loaded {
  filter: blur(0);
  transition: filter 0.6s ease-out;
}

/* crossfade — enabled after first image loads to prevent fade-in on initial paint */
.carousel--ready .carousel-img {
  transition: opacity 0.5s ease-in-out;
}

.carousel--ready .carousel-img--loaded {
  transition: opacity 0.5s ease-in-out, filter 0.5s ease-out;
}


/* ── tagline ── */
.tagline {
  padding: var(--gap) 0;
}

.tagline p {
  font-size: 1.25rem;
  font-weight: 400;
}

/* ── lattice block ── */
.lattice-block {
  display: flex;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--gold-faint);
  border-left: 3px solid var(--gold);
  padding: 2.5rem 2rem;
  margin: var(--gap) 0;
  text-decoration: none;
  cursor: crosshair;
}

.lattice-block:hover {
  background: #0e0e0e;
  border-color: #c9a84c55;
  transition: none;
}

.lattice-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lattice-path {
  color: var(--gold);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.lattice-desc {
  color: #999;
  font-size: 0.85rem;
}

.lattice-hero {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
}

.lattice-install {
  color: var(--dim);
  font-size: 0.8rem;
  margin-top: 1.2rem;
}

.lattice-link {
  color: var(--gold) !important;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  font-weight: 400;
}

.lattice-link:hover {
  color: #e0c060 !important;
  transition: none;
}

/* ── footer ── */
.footer {
  padding: 3rem 0 4rem;
  font-size: 0.7rem;
  color: #333;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── mobile ── */
@media (max-width: 640px) {
  :root {
    --gap: 60px;
  }

  html {
    font-size: 13.5px;
  }

  body {
    padding: 0 1.2rem;
  }

  .carousel {
    padding: var(--gap) 0;
  }

  .carousel-frame {
    aspect-ratio: 1 / 1;
  }

  .lattice-block {
    margin-left: -1.2rem;
    margin-right: -1.2rem;
    border-left-width: 3px;
    border-right: none;
    border-top: 1px solid var(--gold-faint);
    border-bottom: 1px solid var(--gold-faint);
    padding: 2rem 1.5rem;
  }
}
