﻿:root {
  --bg: #f7f5f0;
  --fg: #161616;
  --muted: #77736b;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #f7f5f0;
  color: #161616;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  cursor: default;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
a {
  font: inherit;
}

.page {
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(14px, 2.2vh, 26px);
  padding: clamp(18px, 3.8vh, 36px) clamp(18px, 4.5vw, 64px) clamp(16px, 3vh, 28px);
  overflow: hidden;
  background: #f7f5f0;
}

.identity {
  justify-self: center;
  text-align: center;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.identity h1 {
  margin: 0;
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.identity p {
  margin: 0;
  color: #77736b;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.identity a {
  margin-top: 4px;
  color: #34312d;
  font-size: 11px;
  line-height: 1.35;
  text-decoration: none;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(52, 49, 45, 0.22);
}

.identity a:hover {
  border-bottom-color: currentColor;
}

.stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.main-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 1280px);
  max-height: min(72svh, calc(100svh - 158px));
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  filter: none;
  transition: opacity 180ms ease;
}

.main-image.is-changing {
  opacity: 0.18;
}

.controls {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 32px);
  min-height: 24px;
  color: #312f2b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.03em;
}

.controls span {
  min-width: 64px;
  text-align: center;
  color: #77736b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.nav-arrow,
.win95-button {
  appearance: none;
  min-width: 24px;
  height: 24px;
  border: 0;
  margin: 0;
  padding: 0 4px;
  background: transparent;
  color: #312f2b;
  font-size: 18px;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  border-radius: 0;
}

.nav-arrow:hover,
.win95-button:hover {
  color: #000;
}

.nav-arrow:active,
.win95-button:active {
  transform: translateY(1px);
}

.nav-arrow:focus-visible,
.win95-button:focus-visible,
.identity a:focus-visible {
  outline: 1px solid #77736b;
  outline-offset: 5px;
}

@media (max-width: 700px) {
  .page {
    gap: 12px;
    padding: 16px 12px 14px;
  }

  .identity h1 {
    font-size: 18px;
  }

  .main-image {
    max-width: 100%;
    max-height: min(68svh, calc(100svh - 150px));
  }

  .controls {
    gap: 22px;
  }

  .nav-arrow,
  .win95-button {
    font-size: 20px;
  }
}

@media (max-height: 640px) {
  .page {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .identity p,
  .identity a {
    font-size: 10px;
  }

  .main-image {
    max-height: calc(100svh - 132px);
  }
}
