/* Silver Obscura — styles.css */

:root {
  --bg: #161616;
  --bg-deep: #0E0E0E;
  --text: #ECEAE4;
  --muted: #8A8780;
  --hairline: rgba(236, 234, 228, 0.12);
  --accent: #B8B3AB;
  --display: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --body: 'Manrope', system-ui, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

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

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2.5rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(22,22,22,0.6) 0%, rgba(22,22,22,0) 100%);
}

.site-header > * {
  pointer-events: auto;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  text-decoration: none;
  color: var(--text);
}

.wordmark-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.wordmark-divider {
  color: var(--muted);
  font-weight: 300;
  font-size: 1rem;
  transform: translateY(-1px);
}

.wordmark-sub {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 2.5rem;
}

.nav a {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 400ms ease;
  padding: 0.25rem 0;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.is-current {
  color: var(--text);
  outline: none;
}

/* ========== HOME — SLIDESHOW ========== */
body.page-home {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: page-enter 1800ms ease both;
}

@keyframes page-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stage {
  flex: 1;
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-deep);
  overflow: hidden;
  cursor: pointer;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1600ms cubic-bezier(0.4, 0.0, 0.2, 1),
    visibility 0s linear 1600ms;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 1600ms cubic-bezier(0.4, 0.0, 0.2, 1),
    visibility 0s linear 0s;
}

.slide img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.slide-meta {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  max-width: 60%;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 1200ms ease 600ms,
    transform 1200ms ease 600ms;
}

.slide.is-active .slide-meta {
  opacity: 1;
  transform: translateY(0);
}

.slide-title {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  letter-spacing: 0.01em;
  margin: 0;
}

.indicator {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 10;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  color: var(--muted);
  pointer-events: none;
}

.indicator-current {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.indicator-total {
  font-variant-numeric: tabular-nums;
}

.indicator-divider {
  width: 24px;
  height: 1px;
  background: var(--hairline);
  align-self: center;
}

/* ========== INTERIOR PAGES — common ========== */
body.page-interior {
  min-height: 100vh;
  padding-top: 7rem;
  padding-bottom: 6rem;
  animation: page-enter 1400ms ease both;
}

body.page-centered {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: page-enter 1400ms ease both;
}

/* ========== WORKS PAGE ========== */
.page-intro {
  max-width: 720px;
  margin: 0 auto 5rem;
  padding: 0 2.5rem;
  text-align: center;
}

.page-intro h1 {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.page-intro p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 540px;
  margin: 0 auto;
}

.works {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.work {
  margin-bottom: 8rem;
  position: relative;
}

.work:last-child {
  margin-bottom: 0;
}

.work-index {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
}

.work-index-divider {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--hairline);
}

.work-figure {
  margin: 0 0 2rem;
  display: flex;
  justify-content: center;
}

.work-figure img {
  background: var(--bg-deep);
}

.work-meta {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.work-title {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  letter-spacing: 0.005em;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.work-caption {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}

/* Paired pieces shown under a single shared image */
.work-pair-note {
  font-family: var(--body);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 1.25rem;
}

.work--paired .work-title {
  margin-top: 0;
}

.work-pair-divider {
  border: 0;
  width: 40px;
  height: 1px;
  background: currentColor;
  color: var(--muted);
  opacity: 0.3;
  margin: 2rem auto;
}

.work--paired .work-caption + .work-pair-divider + .work-title {
  margin-top: 0;
}

.end-mark {
  text-align: center;
  margin-top: 6rem;
  color: var(--muted);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  opacity: 0.5;
}

/* ========== ABOUT PAGE ========== */
body.page-about main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2.5rem 6rem;
}

.essay {
  max-width: 620px;
  width: 100%;
}

.essay-label {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
}

.essay-label::before,
.essay-label::after {
  content: '';
  flex: 0 0 32px;
  height: 1px;
  background: var(--hairline);
}

.essay-body {
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.78;
  color: var(--text);
}

.essay-body p {
  margin-bottom: 1.6em;
}

.essay-body p:last-of-type {
  margin-bottom: 0;
}

.essay-body p.lead::first-letter {
  font-family: var(--display);
  font-weight: 400;
  font-size: 4.2rem;
  line-height: 0.85;
  float: left;
  padding: 0.18em 0.18em 0 0;
  color: var(--text);
}

.essay-body em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: 0.005em;
}

.essay-body a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 400ms ease, border-color 400ms ease;
}

.essay-body a:hover,
.essay-body a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--text);
  outline: none;
}

.essay-signoff {
  margin-top: 3rem;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ========== CONTACT PAGE ========== */
body.page-contact main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2.5rem 6rem;
}

.contact-card {
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.contact-label {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
}

.contact-label::before,
.contact-label::after {
  content: '';
  flex: 0 0 32px;
  height: 1px;
  background: var(--hairline);
}

.contact-prompt {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--muted);
  margin-bottom: 1.75rem;
  letter-spacing: 0.005em;
}

.contact-email {
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: color 500ms ease, border-color 500ms ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

.contact-meta {
  margin-top: 3.5rem;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.contact-meta a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 400ms ease, border-color 400ms ease;
}

.contact-meta a:hover,
.contact-meta a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--text);
  outline: none;
}

/* ========== 404 PAGE ========== */
body.page-404 main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2.5rem 6rem;
}

.notfound-card {
  text-align: center;
  max-width: 480px;
}

.notfound-code {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.notfound-title {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: 1rem;
}

.notfound-prompt {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.notfound-link {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color 400ms ease, border-color 400ms ease;
}

.notfound-link:hover,
.notfound-link:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--text);
  outline: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 720px) {
  .site-header {
    padding: 1.25rem 1.25rem;
  }

  .wordmark {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15em;
  }

  .wordmark-divider {
    display: none;
  }

  .wordmark-name {
    font-size: 0.85rem;
  }

  .wordmark-sub {
    font-size: 0.62rem;
  }

  .nav {
    gap: 1.25rem;
  }

  .nav a {
    font-size: 0.62rem;
  }

  /* Slideshow */
  .slide-meta {
    bottom: 4rem;
    left: 1.25rem;
    right: 1.25rem;
    max-width: none;
  }

  .indicator {
    bottom: 1.5rem;
    right: 1.25rem;
    font-size: 0.62rem;
  }

  /* Interior pages */
  body.page-interior {
    padding-top: 5.5rem;
    padding-bottom: 4rem;
  }

  .page-intro {
    margin-bottom: 3.5rem;
    padding: 0 1.25rem;
  }

  .works {
    padding: 0 1.25rem;
  }

  .work {
    margin-bottom: 5rem;
  }

  .work-caption {
    font-size: 0.95rem;
  }

  body.page-about main,
  body.page-contact main,
  body.page-404 main {
    padding: 6rem 1.5rem 4rem;
  }

  .essay-body {
    font-size: 1rem;
    line-height: 1.75;
  }

  .essay-body p.lead::first-letter {
    font-size: 3.4rem;
  }

  .essay-label,
  .contact-label {
    margin-bottom: 1.75rem;
  }

  .contact-prompt {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .contact-email {
    font-size: 1.4rem;
    word-break: break-all;
  }

  .contact-meta {
    margin-top: 2.5rem;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    opacity: 1;
  }
}
