@font-face {
  font-family: "Acre";
  src: url("fonts/acre-medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #edf4f5;
  --muted: #8b999d;
  --dim: #596569;
  --bg: #05080a;
  --panel: #0b1013;
  --line: rgba(201, 221, 225, 0.16);
  --accent: #b8fb4c;
  --accent-2: #64d9ee;
  --header-height: 94px;
  font-family: "Acre", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  cursor: default;
  background:
    radial-gradient(circle at 76% 12%, rgba(100, 217, 238, 0.07), transparent 25rem),
    linear-gradient(180deg, #080d10 0, var(--bg) 30rem);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 10, 0.88);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo { display: block; width: clamp(220px, 20vw, 330px); height: auto; max-height: 60px; object-fit: contain; object-position: left center; }

.viewer-caption p {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.topbar-actions { display: flex; align-items: center; gap: 22px; }
.counter { color: var(--muted); font-size: 0.92rem; }
.counter strong { color: var(--ink); font-size: 1.12rem; font-variant-numeric: tabular-nums; }

.touch-button, .tour-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 22px;
  border: 1px solid rgba(184, 251, 76, 0.45);
  border-radius: 4px;
  background: var(--accent);
  color: #0b0f08;
  font-weight: 750;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.touch-button:active, .tour-button:active, .icon-button:active, .nav-button:active { transform: scale(0.95); }
.play-icon { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; }

main { padding: 0 clamp(24px, 4vw, 72px) 80px; }

.intro {
  min-height: 310px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 64px 0 48px;
}

.intro h2 {
  margin: 12px 0 0;
  max-width: none;
  font-size: clamp(3rem, 7vw, 8rem);
  font-weight: 650;
  line-height: 0.96;
  letter-spacing: 0.015em;
}
.intro-note { margin: 0 0 5px; color: var(--muted); font-size: clamp(0.95rem, 1.2vw, 1.2rem); line-height: 1.8; text-align: right; }
.intro-note span { color: var(--accent); font-size: .82em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.filters {
  position: sticky;
  top: var(--header-height);
  z-index: 15;
  display: flex;
  gap: 8px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}

.filters::-webkit-scrollbar { display: none; }
.filter {
  min-width: max-content;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 16, 19, 0.82);
  color: var(--muted);
  cursor: pointer;
}
.filter span { margin-left: 7px; color: var(--dim); font-size: 0.78rem; }
.filter.is-active { border-color: var(--ink); background: var(--ink); color: #06090a; }
.filter.is-active span { color: #4b5658; }

.gallery {
  display: flex;
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(12px, 1.4vw, 24px);
  padding-top: 16px;
}

.card {
  flex: 1 1 calc(33.333% - 24px);
  grid-column: span 4;
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background: #12191c;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  aspect-ratio: 16 / 9;
}

.card:nth-child(7n + 1), .card:nth-child(7n + 5) { grid-column: span 6; aspect-ratio: 16 / 9; }
.card[hidden] { display: none; }
.card--special { box-shadow: inset 0 0 0 2px var(--accent); }

.card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2,.7,.2,1), filter 300ms ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  z-index: 1;
  background: linear-gradient(transparent, rgba(2, 5, 6, 0.9));
  pointer-events: none;
}

.card-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 22px; }
.card-special {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  max-width: calc(100% - 36px);
  padding: 9px 12px 7px;
  border-radius: 2px;
  background: var(--accent);
  color: #07100b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}
.card-copy span { color: var(--accent); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.14em; }
.card-copy h3 { margin: 6px 0 0; font-size: clamp(1.05rem, 1.4vw, 1.45rem); line-height: 1.2; font-weight: 580; }
.card-copy p { margin: 5px 0 0; color: rgba(237, 244, 245, 0.67); font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card:hover img, .card:focus-visible img { transform: scale(1.035); filter: brightness(1.08); }
.card:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
body.remote-mode .card:focus, body.remote-mode button:focus { outline: 4px solid var(--accent); outline-offset: 4px; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(24px, 4vw, 72px) 50px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.15em;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  overflow: hidden;
  background: #010203;
  touch-action: none;
}
.viewer.is-open { display: block; }
.viewer-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.viewer-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 140px rgba(0,0,0,.5); }
.viewer-stage img { width: 100%; height: 100%; display: block; object-fit: contain; will-change: transform; transform-origin: center; user-select: none; }
.viewer.is-touring .viewer-stage img { object-fit: cover; }

.viewer-top {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  min-height: 118px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px clamp(22px, 3vw, 52px);
  background: linear-gradient(rgba(1, 2, 3, 0.92), transparent);
  pointer-events: none;
}
.viewer-top > * { pointer-events: auto; }
.viewer-caption h2 { margin: 6px 0 2px; font-size: clamp(1.25rem, 2vw, 2rem); font-weight: 580; }
.viewer-caption span { display: block; max-width: min(54vw, 760px); overflow: hidden; color: var(--muted); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.viewer-special {
  width: fit-content;
  margin-top: 8px;
  padding: 7px 10px 5px;
  border-radius: 2px;
  background: var(--accent);
  color: #07100b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}
.viewer-special[hidden] { display: none; }
.icon-button, .nav-button, .zoom-controls button {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(5, 8, 10, 0.72);
  color: var(--ink);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.icon-button { width: 60px; height: 60px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.tour-button { min-height: 54px; }
.tour-button.is-playing { background: rgba(5, 8, 10, 0.74); color: var(--accent); }
.tour-button.is-playing .play-icon { width: 9px; height: 12px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }

.nav-button {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 70px;
  height: 82px;
  border-radius: 4px;
  font-size: 3.4rem;
  line-height: .6;
  transform: translateY(-50%);
}
.nav-button:active { transform: translateY(-50%) scale(.95); }
.nav-button.prev { left: clamp(16px, 2vw, 34px); }
.nav-button.next { right: clamp(16px, 2vw, 34px); }

.zoom-controls {
  position: absolute;
  z-index: 6;
  right: clamp(22px, 3vw, 52px);
  bottom: 144px;
  display: flex;
  overflow: hidden;
  border-radius: 4px;
}
.zoom-controls button { width: 58px; height: 54px; border-radius: 0; font-size: 1.35rem; }
.zoom-controls button + button { border-left: 0; }
#zoom-reset { width: 64px; font-size: 0.88rem; font-variant-numeric: tabular-nums; }

.viewer-bottom {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px clamp(22px, 3vw, 52px) 24px;
  background: linear-gradient(transparent, rgba(1,2,3,.95) 34%);
  transition: opacity 280ms ease, transform 280ms ease;
}
.viewer.is-touring .viewer-bottom {
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}
.viewer .close-button,
.viewer .tour-button,
.viewer .nav-button,
.viewer .zoom-controls {
  transition: opacity 240ms ease, transform 180ms ease;
}
.viewer.controls-hidden .close-button,
.viewer.controls-hidden .tour-button,
.viewer.controls-hidden .nav-button,
.viewer.controls-hidden .zoom-controls {
  opacity: 0;
  pointer-events: none;
}
.progress-track { width: 100%; height: 2px; margin-bottom: 14px; overflow: hidden; background: rgba(255,255,255,.16); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); }
.filmstrip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.filmstrip::-webkit-scrollbar { display: none; }
.filmstrip button { flex: 0 0 80px; width: 80px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 3px; overflow: hidden; background: #10181a; opacity: .56; cursor: pointer; }
.filmstrip button.is-active { border-color: var(--accent); opacity: 1; }
.filmstrip img { width: 100%; height: 100%; display: block; object-fit: cover; }

.loader { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity .2s; }
.loader.is-visible { opacity: 1; }
.loader span { display: block; width: 48px; height: 48px; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

body.viewer-open { overflow: hidden; }

@media (max-width: 900px) {
  :root { --header-height: 82px; }
  .topbar { padding-inline: 20px; }
  .brand-logo { width: 210px; max-height: 48px; }
  .counter { display: none; }
  .touch-button { min-height: 48px; padding-inline: 16px; }
  main { padding-inline: 18px; }
  .intro { min-height: 250px; display: block; padding: 54px 0 34px; }
  .intro-note { margin-top: 24px; text-align: left; }
  .gallery { gap: 10px; }
  .card, .card:nth-child(7n + 1), .card:nth-child(7n + 5) { grid-column: span 6; aspect-ratio: 16 / 9; }
  .card-copy { padding: 16px; }
  .card-copy p { display: none; }
  .nav-button { width: 56px; height: 68px; }
  .viewer-top { grid-template-columns: 54px 1fr auto; padding-inline: 18px; }
  .icon-button { width: 52px; height: 52px; }
  .tour-button { width: 54px; padding: 0; }
  .tour-label { display: none; }
  .zoom-controls { right: 18px; bottom: 126px; }
}

@media (max-width: 560px) {
  .brand-logo { width: 170px; }
  .touch-button { width: 50px; padding: 0; }
  .start-tour-label { display: none; }
  .intro h2 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .gallery { display: block; }
  .card, .card:nth-child(n) { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 12px; }
  footer { flex-direction: column; }
  footer span:nth-child(2) { display: none; }
  .viewer-caption span { display: none; }
  .nav-button { top: auto; bottom: 118px; }
  .zoom-controls { left: 50%; right: auto; bottom: 118px; transform: translateX(-50%); }
  .nav-button.prev { left: 14px; }
  .nav-button.next { right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
