/* ============================================================
   PONTE
   ============================================================ */

@font-face {
  font-family: 'Retrato Grotesque';
  src: url('../fonts/RetratoGrotesk-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adobe Garamond Pro';
  src: url('../fonts/AGaramondPro-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & base --- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: #fff;
  color: #000;
  font-family: 'EB Garamond', Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  letter-spacing: 0.02em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Header --- */

.header {
  position: relative;
  z-index: 100;
  background: #fff;
  transition: box-shadow 0.4s ease;
}

.header--shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header__logo {
  display: block;
  width: min(265px, 50vw);
  text-decoration: none;
  color: inherit;
}

@media (min-width: 600px) {
  .header__logo {
    width: min(265px, 50vw);
  }
}

.header__logo img,
.header__logo svg {
  display: block;
  width: 100%;
  height: auto;
}

.header__logo-text {
  display: block;
  text-align: center;
  font-family: 'Retrato Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  white-space: nowrap;
}

/* --- Subscribe dropdown --- */

.subscribe {
  position: relative;
  z-index: 90;
  background: #fff;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    box-shadow 0.4s ease;
}

.subscribe--open {
  max-height: 10rem;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.subscribe__inner {
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.25rem);
}

.subscribe__form {
  width: 100%;
}

.subscribe__field {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.subscribe__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  color: #000;
  padding: 0.25rem 0;
  letter-spacing: 0.15em;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.subscribe__input:focus {
  border-bottom: 1px solid #000;
}

.subscribe__input::placeholder {
  color: #000;
  opacity: 1;
  letter-spacing: 0.2em;
}

.subscribe__button {
  border: none;
  background: transparent;
  font-family: 'Retrato Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  padding: 0.25rem 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.subscribe__button:hover {
  opacity: 0.6;
}

/* Mobile: stack input and button */
@media (max-width: 599px) {
  .subscribe__field {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .subscribe__input {
    width: 100%;
    text-align: left;
  }

  .subscribe__button {
    align-self: center;
  }
}

/* --- Main / Slideshow --- */

.main {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vh, 2.25rem) clamp(1rem, 2vw, 2rem) clamp(3.5rem, 15vh, 6.5rem);
}

.slideshow {
  height: 100%;
  aspect-ratio: 4 / 5;
  max-width: min(580px, 100%);
  position: relative;
}

.slideshow__stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slideshow__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  will-change: opacity;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-user-drag: none;
}

/* Active (visible) state */
.slideshow__img--active {
  opacity: 1;
}

/* Outgoing frame: smooth ease-out fade */
.slideshow__img--bloom-out {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Incoming frame: natural fade-in after outgoing image clears */
.slideshow__img--fade-in {
  opacity: 1;
  transition: opacity 1s cubic-bezier(0.12, 0, 0.39, 0);
}

/* Starting state for the incoming image */
.slideshow__img--prepped {
  opacity: 0;
  transition: none;
}

/* --- Caption --- */

.caption {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 80;
  padding: clamp(1rem, 2vw, 2rem);
  font-family: 'Adobe Garamond Pro', 'EB Garamond', Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(0.8rem, 1.1vw, 0.85rem);
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: 'onum' 1;
  pointer-events: none;
  opacity: 0;
}

.caption__line {
  display: block;
}

.caption--ready {
  opacity: 1;
}

@media (max-width: 599px) {
  .slideshow__img--bloom-out {
    transition-duration: 0.675s;
  }

  .slideshow__img--fade-in {
    transition-duration: 0.75s;
  }
}

/* --- Utility --- */

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

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