/* ==========================================================
   AFTERGLOW | Sky & Nani
   ========================================================== */

:root {
  --paper: #F8F7F1;
  --sky: #D8E8F0;
  --apricot: #F1D2BE;
  --olive: #A7AE91;
  --plum: #71647F;
  --plum-deep: #5A4E68;
  --navy: #34485A;
  --ink: #303B43;
  --muted: #5E6872;
  --white: #FFFFFF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --header-h: 76px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 10px);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a { color: inherit; text-decoration: none; }
ol { list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Shared type ---------- */

.eyebrow {
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--plum-deep);
  margin-bottom: 22px;
  font-weight: 500;
}

.tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--plum-deep);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 16px 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}

.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--plum); transform: translateY(-3px); }

.btn-light { background: var(--apricot); color: var(--ink); }
.btn-light:hover { background: var(--white); transform: translateY(-3px); }

/* ---------- Photos and credit tag ---------- */

.photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky), var(--apricot));
}

.photo img.is-broken { visibility: hidden; }

.credit {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 10px;
  background: rgba(248, 247, 241, .92);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .02em;
  border-radius: 2px;
  pointer-events: none;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .35s, box-shadow .35s;
}

.site-header.is-scrolled {
  background: rgba(248, 247, 241, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(52, 72, 90, .12);
}

.logo {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: .16em;
}

.site-nav {
  display: flex;
  gap: 30px;
}

.site-nav a {
  position: relative;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 6px 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.site-nav a:hover::after,
.site-nav a.is-active::after { transform: scaleX(1); }

.site-nav a.is-active { color: var(--plum-deep); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  padding: calc(var(--header-h) + 50px) 8% 80px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 70px;
  background:
    radial-gradient(circle at 90% 15%, var(--sky) 0, transparent 30%),
    radial-gradient(circle at 5% 90%, var(--apricot) 0, transparent 26%),
    var(--paper);
}

.hero h1 {
  font-size: clamp(64px, 9vw, 128px);
  line-height: .92;
  letter-spacing: -.01em;
}

.hero h1 em {
  display: block;
  color: var(--plum);
  font-style: italic;
}

.hero-text {
  max-width: 440px;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.hero-photo {
  position: relative;
  height: 600px;
}

.hero-frame {
  height: 100%;
  border: 8px solid var(--white);
  border-radius: 4px 150px 4px 4px;
  box-shadow: 0 24px 60px rgba(52, 72, 90, .18);
}

.photo-label {
  position: absolute;
  bottom: 70px;
  left: -40px;
  background: var(--apricot);
  padding: 18px 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  transform: rotate(-4deg);
  box-shadow: 0 10px 24px rgba(52, 72, 90, .15);
}

.hero-star {
  position: absolute;
  right: -18px;
  top: 6%;
  font-size: 64px;
  line-height: 1;
  color: var(--olive);
}

/* One orchestrated page-load moment */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise .9s var(--ease) both;
  }
  .hero-copy > :nth-child(1) { animation-delay: .05s; }
  .hero-copy > :nth-child(2) { animation-delay: .18s; }
  .hero-copy > :nth-child(3) { animation-delay: .32s; }
  .hero-copy > :nth-child(4) { animation-delay: .44s; }

  .hero-frame { animation: unveil 1.2s var(--ease) .15s both; }
  .photo-label { animation: stick .8s var(--ease) .9s both; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
  }
  @keyframes unveil {
    from { clip-path: inset(0 0 100% 0); }
    to   { clip-path: inset(0 0 0 0); }
  }
  @keyframes stick {
    from { opacity: 0; transform: rotate(-9deg) scale(.9); }
  }
}

/* ---------- Sections ---------- */

.section { padding: 110px 8%; }

.section-heading {
  text-align: center;
  margin-bottom: 56px;
}

.section-heading h2 {
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.1;
}

.section-heading p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

/* About */

.intro {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 120px 8%;
}

.intro .eyebrow { color: var(--apricot); }

.intro h2 {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.15;
}

.intro p:last-child {
  max-width: 640px;
  margin: 28px auto 0;
  color: #D5E0E5;
  font-size: 17px;
  line-height: 1.9;
}

/* Projects */

.projects { background: var(--paper); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--white);
  box-shadow: 0 8px 26px rgba(52, 72, 90, .06);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 38px rgba(52, 72, 90, .14);
}

.poster { aspect-ratio: 4 / 4.6; }

.poster img { transition: transform .6s var(--ease); }
.project-card:hover .poster img { transform: scale(1.04); }

.project-info { padding: 26px 24px 30px; }

.project-info h3 {
  font-size: 28px;
  margin-top: 8px;
  line-height: 1.2;
}

.project-info p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

/* Spotlight */

.spotlight { background: var(--apricot); }

.artist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  max-width: 1100px;
  margin: 0 auto;
}

.artist-card {
  background: var(--paper);
  padding: 18px;
}

.portrait { aspect-ratio: 4 / 4.8; }

.artist-info { padding: 28px 12px 14px; }

.artist-info h3 {
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.1;
  margin: 8px 0 12px;
}

.artist-info p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 46ch;
}

/* Music */

.music { background: var(--olive); }

.music-list {
  max-width: 780px;
  margin: 0 auto;
  border-top: 1px solid rgba(62, 71, 51, .4);
}

.music-item {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px 12px;
  border-bottom: 1px solid rgba(62, 71, 51, .4);
  transition: background .3s var(--ease), padding-left .3s var(--ease);
}

.music-item:hover {
  background: rgba(248, 247, 241, .3);
  padding-left: 24px;
}

.track-no {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: #3E4733;
  min-width: 34px;
}

.track-info h3 { font-size: 26px; line-height: 1.2; }

.track-info p {
  margin-top: 6px;
  font-size: 14px;
  color: #3E4733;
}

/* Gallery */

.gallery { background: var(--sky); }

.gallery-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr 1fr;
  gap: 20px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item { aspect-ratio: 4 / 5; }
.gallery-item:nth-child(2) { margin-top: 56px; aspect-ratio: 1 / 1.15; }
.gallery-item:nth-child(3) { margin-top: 108px; }

.photo-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.photo-btn img { transition: transform .6s var(--ease); }
.photo-btn:hover img { transform: scale(1.05); }

/* Postcard */

.postcard {
  background: var(--plum);
  color: var(--white);
  text-align: center;
  padding: 120px 8%;
}

.postcard .eyebrow { color: var(--apricot); }

.postcard h2 {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.15;
}

.postcard-lead {
  color: #E9E3F2;
  margin: 22px 0 32px;
  font-size: 16px;
}

.postcard-message {
  display: grid;
  grid-template-rows: 0fr;
  max-width: 620px;
  margin: 0 auto;
  transition: grid-template-rows .6s var(--ease);
}

.postcard-message.is-open {
  grid-template-rows: 1fr;
  margin-top: 40px;
}

.postcard-inner { overflow: hidden; }

.postcard-paper {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 46px 40px 36px;
  text-align: left;
  border-radius: 3px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .25);
  transform: rotate(-1.2deg);
}

.postcard-paper p:first-of-type {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.7;
  max-width: 28em;
}

.signature {
  margin-top: 22px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--plum-deep);
  font-size: 17px;
}

.stamp {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 52px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--plum);
  color: var(--plum);
  font-size: 22px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 64px 8% 48px;
  text-align: center;
}

.site-footer h2 {
  font-size: 38px;
  letter-spacing: .12em;
}

.footer-tag {
  margin-top: 10px;
  color: var(--apricot);
  font-size: 13px;
  letter-spacing: .1em;
}

.footer-note {
  max-width: 600px;
  margin: 20px auto 0;
  color: #C8D4DB;
  font-size: 13px;
  line-height: 1.9;
}

.back-top {
  display: inline-block;
  margin-top: 28px;
  font-size: 13px;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, .5);
  padding-bottom: 2px;
}
.back-top:hover { border-color: var(--apricot); color: var(--apricot); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(36, 46, 56, .94);
  color: var(--white);
}

.lightbox:not([open]) { display: none; }

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-figure {
  max-width: min(90vw, 900px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.lb-figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border: 6px solid var(--white);
}

.lb-figure figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  text-align: center;
}

.lb-credit { font-size: 12px; color: #C8D4DB; }

.lb-close,
.lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: var(--white);
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  transition: background .25s;
}

.lb-close:hover,
.lb-nav:hover { background: rgba(255, 255, 255, .26); }

.lb-close { top: 20px; right: 20px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 32px; padding-bottom: 4px; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* ---------- Tablet ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 50px;
    min-height: auto;
  }

  .hero-photo { height: 520px; }
  .hero-star { right: 6px; }

  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .artist-grid { gap: 26px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  :root { --header-h: 66px; }

  .site-header { padding: 0 5%; }
  .logo { font-size: 21px; }

  .menu-toggle { display: block; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    box-shadow: 0 18px 30px rgba(52, 72, 90, .15);
    padding: 8px 5% 20px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    padding: 16px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(52, 72, 90, .12);
  }
  .site-nav a::after { display: none; }
}

@media (max-width: 600px) {
  .hero { padding: calc(var(--header-h) + 30px) 7% 64px; gap: 40px; }
  .hero-photo { height: 430px; }
  .photo-label { left: -8px; bottom: 56px; font-size: 17px; padding: 14px 18px; }
  .hero-star { font-size: 48px; }

  .section { padding: 80px 7%; }
  .intro, .postcard { padding: 88px 7%; }

  .project-grid { grid-template-columns: 1fr; }
  .artist-grid { grid-template-columns: 1fr; }

  .track-info h3 { font-size: 22px; }
  .music-item { gap: 16px; padding: 22px 6px; }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .gallery-item,
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3) { margin-top: 0; aspect-ratio: 4 / 5; }
  .gallery-item:nth-child(3) { grid-column: span 2; aspect-ratio: 16 / 11; }

  .credit { font-size: 10px; left: 6px; bottom: 6px; padding: 4px 8px; }

  .postcard-paper { padding: 64px 24px 28px; }
  .postcard-paper p:first-of-type { font-size: 19px; }

  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-nav { background: rgba(0, 0, 0, .4); }
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation: none !important;
  }
}
