/* ============================================================
   AM Studio — Adelka Mora
   editorial, minimal, photos lead
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --fg: #e8e6e1;
  --mute: #7f7b75;
  --line: rgba(232, 230, 225, 0.1);
  --serif: 'Cormorant Garamond', 'Times New Roman', Times, serif;
  --display: 'UnifrakturMaguntia', 'UnifrakturCook', 'Old English Text MT', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(1.5rem, 6vw, 5.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 300ms var(--ease), color 300ms var(--ease);
}
a:hover { opacity: 0.55; }

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

/* ============================================================
   intro — shutter-burst inside the cover frame (plays once)
   cover masthead / menu / byline stay visible
   ============================================================ */

.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  transition: opacity 650ms var(--ease);
}

.intro.hidden { opacity: 0; }

.intro img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 48vw;
  max-height: 62vh;
  object-fit: contain;
  opacity: 0;
  filter: saturate(0.92) contrast(1.04);
  box-shadow: 0 30px 80px -25px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(232, 230, 225, 0.06);
  will-change: opacity;
}

.intro img.on { opacity: 1; }

@media (max-width: 720px) {
  .intro img {
    max-width: 72vw;
    max-height: 48vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}

/* ============================================================
   footer spotify player
   ============================================================ */

.player {
  margin: 2.6rem auto 0;
  max-width: 380px;
}

.player-label {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: lowercase;
  color: var(--mute);
  margin-bottom: 0.9rem;
}

#spotify-embed,
#spotify-embed iframe {
  width: 100%;
  max-width: 380px;
  height: 80px;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

/* ============================================================
   cover
   ============================================================ */

.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--gutter);
  display: block;
}

.masthead {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  opacity: 0;
  animation: fade-up 1400ms 150ms var(--ease) forwards;
}

.logo {
  font-family: var(--display);
  font-size: clamp(3.6rem, 7.5vw, 6rem);
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: #00bcd4; /* cyan blue */
  font-weight: 400;
}

.studio {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  letter-spacing: 0.45em;
  text-transform: lowercase;
  color: var(--mute);
  margin-top: 0.4em;
  /* offset trailing letter-spacing so the word sits optically centered */
  text-indent: 0.45em;
}

.menu {
  position: absolute;
  top: calc(var(--gutter) + 0.9em);
  right: var(--gutter);
  display: flex;
  gap: clamp(1rem, 2vw, 2.2rem);
  font-family: var(--serif);
  font-size: 0.86rem;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--mute);
  opacity: 0;
  animation: fade-in 1200ms 700ms var(--ease) forwards;
}

.byline {
  position: absolute;
  bottom: calc(var(--gutter) + 0.2rem);
  left: var(--gutter);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  letter-spacing: 0.3em;
  text-transform: lowercase;
  color: var(--mute);
  line-height: 1.9;
  max-width: 22rem;
  opacity: 0;
  animation: fade-in 1400ms 1000ms var(--ease) forwards;
}

/* hero — the cover's centerpiece photo */

.hero {
  position: absolute;
  left: 50%;
  top: 46%;                       /* bias slightly up so bottom stays clear */
  transform: translate(-50%, -50%);
  margin: 0;
  pointer-events: none;
  opacity: 0;
  animation: hero-in 1600ms 2500ms var(--ease) forwards;
}

.hero picture { display: block; }

.hero img {
  display: block;
  max-width: 44vw;
  max-height: 54vh;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: saturate(0.92) contrast(1.04);
  box-shadow: 0 30px 80px -25px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(232, 230, 225, 0.06);
}

@keyframes hero-in {
  from { opacity: 0; transform: translate(-50%, -44%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* scroll button — centered, pulsing line, slow-pull on click */

.scroll-btn {
  position: absolute;
  bottom: 2.2rem;                 /* lower, out of the hero's column */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  background: transparent;
  border: none;
  color: var(--mute);
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.5em;
  text-transform: lowercase;
  padding: 0.5rem 1.2rem 0.8rem;
  opacity: 0;
  animation: fade-in 1200ms 2700ms var(--ease) forwards;
  transition: color 500ms var(--ease), transform 600ms var(--ease);
  z-index: 3;
}

.scroll-btn:hover { color: var(--fg); }
.scroll-btn:hover .scroll-btn-line { animation-duration: 1.4s; }
.scroll-btn:active { transform: translateX(-50%) translateY(2px); }
.scroll-btn:focus-visible {
  outline: 1px solid var(--mute);
  outline-offset: 6px;
  border-radius: 1px;
}

.scroll-btn-label {
  display: block;
  padding-left: 0.5em; /* visually center with the line */
}

.scroll-btn-line {
  display: block;
  width: 1px;
  height: 4.2rem;
  background: currentColor;
  transform-origin: top center;
  animation: scroll-pulse 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.scroll-btn-arrow {
  font-size: 1.2rem;
  opacity: 0.8;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(0.2); opacity: 0.35; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ============================================================
   photo sequence
   ============================================================ */

.sequence {
  display: flex;
  flex-direction: column;
}

.frame {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem var(--gutter);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1100ms var(--ease), transform 1100ms var(--ease);
  will-change: opacity, transform;
}

.frame.visible {
  opacity: 1;
  transform: translateY(0);
}

.frame picture { display: block; }

.frame img {
  max-height: 82vh;
  max-height: 82dvh;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
}

.frame.diptych {
  gap: clamp(1rem, 2.2vw, 2.4rem);
}

.frame.diptych picture {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.frame.diptych img {
  max-height: 76vh;
  max-height: 76dvh;
}

/* ============================================================
   contact
   ============================================================ */

.contact {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--gutter);
}

.contact .eyebrow {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.4em;
  text-transform: lowercase;
  color: var(--mute);
  margin-bottom: 2rem;
}

.contact .email {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 4.2vw, 2.9rem);
  letter-spacing: 0.015em;
  color: var(--fg);
  padding-bottom: 0.18em;
  border-bottom: 1px solid transparent;
  transition: border-color 500ms var(--ease), opacity 300ms var(--ease);
}

.contact .email:hover {
  opacity: 1;
  border-bottom-color: var(--mute);
}

/* ============================================================
   about / footer
   ============================================================ */

.about {
  padding: 6rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
  position: relative;
}

.about-inner {
  max-width: 34rem;
  margin: 0 auto;
}

.about p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin-bottom: 1.1rem;
  color: var(--fg);
}

.about .lead {
  font-weight: 400;
  letter-spacing: 0.08em;
}

.about .contact-line {
  margin-top: 2.2rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--mute);
}

.about .contact-line a { color: var(--fg); }

.about .socials {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.about .socials a {
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
  border: 1px solid transparent;
}

.about .socials a:hover {
  color: var(--fg);
  opacity: 1;
  border-color: rgba(232, 230, 225, 0.18);
}

.colophon {
  margin-top: 4.5rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: lowercase;
  color: var(--mute);
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.6em;
}

.colophon .mark {
  font-family: var(--display);
  font-size: 1.3em;
  letter-spacing: 0.03em;
  color: #00bcd4; /* cyan blue — matches header */
}

.to-top {
  position: absolute;
  bottom: 1.8rem;
  right: var(--gutter);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--mute);
}

/* ============================================================
   animations
   ============================================================ */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================
   mobile
   ============================================================ */

@media (max-width: 720px) {
  body { font-size: 15px; }

  .cover { min-height: 100vh; min-height: 100dvh; }

  /* menu stays top-right, just shrunk */
  .menu {
    top: calc(var(--gutter) + 0.8em);
    right: var(--gutter);
    left: auto;
    bottom: auto;
    gap: 1.1rem;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
  }

  /* byline at the very bottom, two lines visibly separated */
  .byline {
    left: 50%;
    right: auto;
    bottom: 1.4rem;
    transform: translateX(-50%);
    text-align: center;
    max-width: 92vw;
    font-size: 0.68rem;
    letter-spacing: 0.26em;
    line-height: 2.3;           /* breathing room between the two lines */
  }

  /* hero shifted up, smaller, so the scroll + byline block sits clear below */
  .hero { top: 40%; }
  .hero img {
    max-width: 78vw;
    max-height: 38vh;
  }

  /* scroll button sits ABOVE the byline */
  .scroll-btn {
    display: flex;
    bottom: 6.2rem;
    gap: 0.55rem;
    font-size: 0.72rem;
    letter-spacing: 0.42em;
    padding: 0.35rem 0.9rem 0.55rem;
    min-height: 44px;
  }
  .scroll-btn-line { height: 2.4rem; }
  .scroll-btn-arrow { font-size: 0.95rem; }

  .frame {
    min-height: 72vh;
    min-height: 72dvh;
    padding: 3rem var(--gutter);
  }

  .frame img { max-height: 68vh; max-height: 68dvh; }

  .frame.diptych {
    flex-direction: column;
    gap: 2rem;
  }
  .frame.diptych img { max-height: 40vh; max-height: 40dvh; }

  .contact .email { font-size: 1.25rem; letter-spacing: 0.02em; }

  .about { padding: 4rem var(--gutter) 2rem; }
  .to-top { position: static; display: inline-block; margin-top: 2rem; }
}

/* extra-small phones (iPhone SE class) — pack tighter */
@media (max-width: 380px) {
  .logo { font-size: 3rem; }
  .hero img { max-height: 34vh; }
  .byline { bottom: 1.2rem; font-size: 0.62rem; line-height: 2.2; }
  .scroll-btn { bottom: 5.4rem; }
  .scroll-btn-line { height: 2rem; }
}

/* ============================================================
   reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .masthead, .menu, .byline, .hero, .scroll-btn, .scroll-btn-line, .frame {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) !important; /* preserve centering on .hero */
  }
  .scroll-btn { transform: translateX(-50%) !important; }
  .masthead, .menu, .byline, .frame { transform: none !important; }
  html { scroll-behavior: auto; }
}
