:root {
  --bg: #060606;
  --bg-deep: #020202;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.68);
  --accent: #f2eee6;
  --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display-font: "Baskerville", "Times New Roman", Georgia, serif;
  --page-width: min(1440px, calc(100% - 1.5rem));
  --viewer-height: clamp(18rem, calc(100svh - 13rem), 56rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 28rem),
    linear-gradient(180deg, #111111 0%, var(--bg) 22%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font: inherit;
}

.page,
.site-shell {
  min-height: 100svh;
}

.site-shell {
  display: flex;
  flex-direction: column;
}

.page--home {
  overflow: hidden;
}

.page--home .site-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}

.site-main {
  flex: 1 1 auto;
}

.site-main--home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

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

.site-header,
.site-footer {
  flex: 0 0 auto;
}

.site-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
}

.site-header .site-chrome {
  border-bottom: 1px solid var(--line);
}

.site-footer .site-chrome {
  border-top: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand__mark {
  width: 2.7rem;
  height: 2.7rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-nav a,
.site-footer__mark,
.site-footer__link {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a,
.site-footer__mark,
.site-footer__link {
  color: var(--muted);
  transition: color 180ms ease;
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--text);
}

.site-footer__mark {
  margin: 0;
}

.gallery-viewer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(var(--page-width), 1720px);
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.gallery-viewer__viewport {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  outline: none;
}

.gallery-slide {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.85rem, 1.6vw, 1.5rem) clamp(3.3rem, 8vw, 6.8rem);
  margin: 0;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  overflow: visible;
  transition: opacity 950ms ease;
  pointer-events: none;
}

.gallery-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24);
}

.gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-viewer__control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-top: -1.45rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.7);
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.gallery-viewer__control:hover,
.gallery-viewer__control:focus-visible {
  background: rgba(20, 20, 20, 0.92);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.gallery-viewer__control--prev {
  left: clamp(0.15rem, 1.4vw, 0.75rem);
}

.gallery-viewer__control--next {
  right: clamp(0.15rem, 1.4vw, 0.75rem);
}

.gallery-viewer__control span {
  font-size: 1rem;
  line-height: 1;
}

.copy-panel {
  display: flex;
  align-items: center;
  min-height: calc(100svh - 9.8rem);
  padding: clamp(3rem, 9vw, 6rem) 0;
}

.copy-panel--about {
  align-items: center;
}

.copy-panel__text {
  max-width: 38rem;
  margin: 0;
  color: rgba(244, 241, 234, 0.86);
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.35rem);
  line-height: 1.72;
  text-align: center;
}

.copy-panel--about .site-width {
  display: flex;
  justify-content: center;
}

.copy-panel--about .copy-panel__text {
  max-width: 32rem;
  font-size: clamp(0.98rem, 0.92rem + 0.28vw, 1.15rem);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
  width: 100%;
}

.contact-card__title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.2rem, 3.5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0.01em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.95rem 1.4rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0b0b0b;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 719px) {
  :root {
    --page-width: min(100% - 1.25rem, 40rem);
    --viewer-height: clamp(16rem, calc(100svh - 15rem), 42rem);
  }

  .site-chrome {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.85rem;
  }

  .gallery-slide {
    padding: 0.75rem 2.8rem;
  }

  .gallery-viewer__control {
    width: 2.55rem;
    height: 2.55rem;
    margin-top: -1.275rem;
  }

  .copy-panel {
    min-height: auto;
    padding: 4rem 0;
  }

  .copy-panel__text {
    max-width: 34ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gallery-slide,
  .gallery-viewer__control,
  .button,
  .site-nav a,
  .site-footer__link {
    transition: none;
  }
}
