/* =============================================
   UPIE — Breaking Barriers, Building Bridges
   Structure inspired by fluid editorial layouts;
   visual identity original to Upie Collection.
   ============================================= */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --bg-soft: #1a1814;
  --text: #f3efe6;
  --muted: rgba(243, 239, 230, 0.62);
  --gold: #c9a24d;
  --gold-soft: #a8873e;
  --line: rgba(243, 239, 230, 0.14);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Outfit", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-move: cubic-bezier(0.77, 0, 0.175, 1);
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --header: 5rem;
  --max: 1200px;
}

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

html {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .reveal-child,
  .look-media img,
  .hero-media,
  .banner-media,
  .parallax-img,
  .hero-line,
  .hero-haze {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: 0.02em;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: color-mix(in srgb, var(--gold) 40%, transparent);
}

/* ——— Header (Hales-style centered brand) ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s ease, background-color 0.35s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}

.header-left {
  justify-self: start;
}

.header-center {
  justify-self: center;
}

.header-right {
  justify-self: end;
  display: none;
  gap: 1.75rem;
  align-items: center;
}

.logo-img {
  height: 2.4rem;
  width: auto;
}

img[loading="lazy"] {
  background: var(--bg-elevated);
}

.menu-btn {
  width: 2rem;
  height: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.15rem 0;
}

.menu-btn span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-link {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
  color: var(--gold);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: var(--pad);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.nav-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-drawer a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: 0.04em;
}

@media (min-width: 900px) {
  .menu-btn { display: none; }
  .header-right { display: flex; }
  .header-left .nav-desktop {
    display: flex;
    gap: 1.75rem;
  }
}

.header-left .nav-desktop {
  display: none;
}

/* ——— Shared type ——— */
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.display em {
  font-style: italic;
  color: var(--gold);
}

.lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 38rem;
}

.section {
  padding: clamp(4rem, 10vw, 7rem) var(--pad);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--gold);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--gold);
  color: #111;
}

.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--gold);
  background: transparent;
  color: var(--gold);
}

.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.3rem;
  transition: opacity 0.25s ease;
}

.text-link:hover {
  opacity: 0.75;
}

/* Reveal — scroll entrances (transform + opacity only) */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.98);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.reveal-left {
  transform: translate3d(-32px, 0, 0) scale(0.98);
}

.reveal-left.is-in {
  transform: translate3d(0, 0, 0) scale(1);
}

.reveal-right {
  transform: translate3d(32px, 0, 0) scale(0.98);
}

.reveal-right.is-in {
  transform: translate3d(0, 0, 0) scale(1);
}

.reveal-scale {
  transform: scale(0.94);
}

.reveal-scale.is-in {
  transform: scale(1);
}

/* Stagger children inside a container */
.stagger > .reveal:nth-child(1) { --delay: 0ms; }
.stagger > .reveal:nth-child(2) { --delay: 70ms; }
.stagger > .reveal:nth-child(3) { --delay: 140ms; }
.stagger > .reveal:nth-child(4) { --delay: 210ms; }
.stagger > .reveal:nth-child(5) { --delay: 280ms; }
.stagger > .reveal:nth-child(6) { --delay: 350ms; }
.stagger > .reveal:nth-child(7) { --delay: 420ms; }
.stagger > .reveal:nth-child(8) { --delay: 490ms; }
.stagger > .reveal:nth-child(9) { --delay: 560ms; }

/* Image clip / zoom on reveal */
.look-media {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-elevated);
  clip-path: inset(8% 8% 8% 8%);
  transition: clip-path 1s var(--ease-out);
}

.look.reveal.is-in .look-media,
.look.is-in .look-media {
  clip-path: inset(0 0 0 0);
}

.look-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.1s var(--ease-out);
}

.look.reveal.is-in .look-media img,
.look.is-in .look-media img {
  transform: scale(1);
}

.look.reveal.is-in:hover .look-media img,
.look.is-in:hover .look-media img {
  transform: scale(1.04);
  transition-duration: 0.7s;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: -8% 0;
  will-change: transform;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  transition: transform 1.4s var(--ease-out);
  will-change: transform;
}

.hero.is-ready .hero-media img {
  transform: scale(1.02);
}

/* Soft global veil — keeps the photo visible */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 45%, rgba(10, 10, 10, 0.5) 100%),
    linear-gradient(90deg, rgba(10, 10, 10, 0.2) 0%, transparent 48%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--pad);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

/* Local dark haze behind the copy only */
.hero-haze {
  position: absolute;
  z-index: -1;
  left: -8%;
  top: -18%;
  width: min(42rem, 92%);
  height: 140%;
  background: radial-gradient(
    ellipse 70% 65% at 28% 55%,
    rgba(6, 6, 6, 0.78) 0%,
    rgba(6, 6, 6, 0.45) 42%,
    rgba(6, 6, 6, 0.16) 68%,
    transparent 82%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s var(--ease-out) 0.05s;
}

.hero.is-ready .hero-haze {
  opacity: 1;
}

.hero-content .display {
  max-width: 14ch;
  display: flex;
  flex-direction: column;
  gap: 0.08em;
}

.hero-content .display .hero-line {
  display: block;
}

.hero-content .display em {
  font-style: italic;
  color: var(--gold);
}

/* Staggered text entrance */
.hero-line {
  opacity: 0;
  transform: translate3d(0, 1.1em, 0);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
  transition-delay: calc(0.12s + var(--i, 0) * 0.14s);
  will-change: opacity, transform;
}

.hero-line.btn {
  transform: translate3d(0, 1.25rem, 0);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out),
    background-color 0.3s ease,
    color 0.3s ease;
  transition-delay: calc(0.12s + var(--i, 0) * 0.14s);
  width: fit-content;
}

.hero.is-ready .hero-line {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ——— Intro ——— */
.intro {
  text-align: center;
  background: var(--bg);
}

.intro .lede {
  margin: 1.25rem auto 0;
}

/* ——— Featured looks (model grid) ——— */
.featured-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 800px) {
  .featured-head {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: end;
    gap: 3rem;
  }
}

.looks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .looks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .looks-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.look {
  display: block;
}

.look-meta {
  padding: 1rem 0 0.25rem;
}

.look-meta h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.look-meta p {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ——— Banner ——— */
.banner {
  position: relative;
  min-height: 48vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.banner-media {
  position: absolute;
  inset: -12% 0;
  will-change: transform;
}

.banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.gallery-grid figure,
.event-gallery img {
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.97);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.gallery-grid figure.is-in,
.event-gallery img.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.banner-shade {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.62);
}

.banner-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--pad);
  text-align: center;
}

.banner-content .display {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

.line-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 60;
  background: var(--gold);
  transform-origin: left center;
  pointer-events: none;
}

/* ——— Story teaser ——— */
.story-teaser {
  background: var(--bg-soft);
}

.story-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.story-copy .display {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  margin-bottom: 1.25rem;
}

.pillars {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.pillars span {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.story-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.story-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.story-visual img:first-child {
  margin-top: 2rem;
}

/* ——— Page hero (inner pages) ——— */
.page-hero {
  padding: clamp(3rem, 8vw, 5rem) var(--pad) 2rem;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.page-hero .display {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.page-hero .lede {
  margin: 1.25rem auto 0;
}

/* ——— Story page ——— */
.bio {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 var(--pad) 3rem;
}

.bio p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.awards {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.awards li {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text);
}

.awards li span {
  color: var(--gold);
  margin-right: 0.5rem;
}

.event-feature {
  padding: 0 var(--pad) 2rem;
  max-width: var(--max);
  margin: 0 auto;
}

.event-feature img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  padding: 0 var(--pad) clamp(4rem, 8vw, 6rem);
  max-width: var(--max);
  margin: 0 auto;
}

@media (min-width: 800px) {
  .event-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

.event-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--bg-elevated);
}

.event-gallery img.wide {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

/* ——— Gallery page ——— */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  padding: 0 var(--pad) clamp(4rem, 8vw, 6rem);
  max-width: var(--max);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

.gallery-grid figure {
  overflow: hidden;
  background: var(--bg-elevated);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.gallery-grid figure:hover img {
  transform: scale(1.04);
}

/* ——— Contact ——— */
.contact-wrap {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(4rem, 8vw, 6rem);
}

.field {
  margin-bottom: 1.35rem;
}

.field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
  outline: none;
  border-radius: 0;
  transition: border-color 0.25s ease;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--gold);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-note.is-success {
  color: var(--gold);
}

/* ——— Community (kept light) ——— */
.community {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) var(--pad) 5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  margin: 2rem 0;
}

.filters button {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.4;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.filters button.active {
  opacity: 1;
  color: var(--gold);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-elevated);
  margin-bottom: 0.85rem;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
}

.card .meta {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.25rem;
}

.upload-box {
  display: none;
  margin: 2rem 0 3rem;
  max-width: 32rem;
}

.upload-box.open { display: block; }

.upload-zone {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  overflow: hidden;
  cursor: pointer;
}

.upload-zone span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.upload-zone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--pad) 2.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-brand img {
  height: 2rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 22rem;
}

.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.powered-by {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.65rem;
  opacity: 0.85;
}

.tagline {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--gold);
}
