/* ==========================================================================
   ARCHIVE — curated second hand
   Dark luxury · editorial · contemporary
   --------------------------------------------------------------------------
   Contents
   1. Tokens (colors, type, easing)
   2. Reset & base
   3. Utilities (reveal, micro type)
   4. Preloader
   5. Header
   6. Hero
   7. Marquee
   8. The Archive (word behind image)
   9. Pieces
   10. Curation (sticky typography)
   11. About
   12. Instagram CTA
   13. Footer
   14. Responsive
   15. Reduced motion
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --black:    #080808;
  --burgundy: #3B0D14;
  --off:      #E4E4E4;
  --muted:    rgba(228, 228, 228, .55);
  --faint:    rgba(228, 228, 228, .32);
  --line:     rgba(228, 228, 228, .12);
  --gold:     #B9975B;               /* metallic accent — sparing use only */
  --font:     'Inter', -apple-system, 'Helvetica Neue', sans-serif;
  --ease:     cubic-bezier(.22, 1, .36, 1);
  --pad:      clamp(20px, 5vw, 72px);
  --mega:     clamp(64px, 14vw, 220px);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }

::selection { background: var(--burgundy); color: var(--off); }

/* ---------- 3. Utilities ---------- */
.dot { color: var(--faint); }

.micro, .hero__kicker, .pieces__head p, .about__head p, .instagram__micro,
.footer__meta, .piece p, .piece__no, .archive__kicker, .archive__micro {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Editorial reveal: masked clip + soft rise. JS adds .is-in when in viewport. */
.reveal {
  display: block;
  clip-path: inset(0 0 110% 0);
  transform: translateY(24px);
  opacity: .001;
  transition:
    clip-path 1s var(--ease),
    transform 1s var(--ease),
    opacity .9s var(--ease);
  will-change: clip-path, transform, opacity;
}
.reveal.is-in {
  clip-path: inset(0 0 -10% 0);
  transform: translateY(0);
  opacity: 1;
}

/* ---------- 4. Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--black);
  display: grid; place-items: center;
  transition: opacity .9s var(--ease), visibility .9s;
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader__stage { position: relative; width: min(60vw, 340px); height: 150px; }
.preloader__mark {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transform: translateY(10px) scale(.96);
}
.preloader__mark.is-show { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- 5. Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad);
  transition: transform .6s var(--ease), background .6s var(--ease),
              backdrop-filter .6s var(--ease), padding .6s var(--ease);
}
.header.is-hidden { transform: translateY(-110%); }
.header.is-scrolled {
  background: rgba(8, 8, 8, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding-top: 14px; padding-bottom: 14px;
}

.header__logo img { height: 38px; width: auto; opacity: .92; transition: opacity .25s var(--ease); }



.header__nav {
  display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px);
  font-size: 11px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase;
}
.header__nav a { color: var(--muted); transition: color .4s var(--ease); }
.header__nav a:hover { color: var(--off); }

.header__cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  color: var(--off) !important;
  transition: background .4s var(--ease), border-color .4s var(--ease) !important;
}
.header__cta:hover { background: var(--burgundy); border-color: var(--burgundy); }

/* ---------- 6. Hero ---------- */
/* Home hero — dark editorial stage: the phrase sits low, the handwritten
   "a." mark drifts behind it. (The 3D drum now lives at the end of the page.) */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 0 var(--pad) 11vh;
  overflow: hidden;
  background: var(--black);
  color: var(--off);
  --radius: clamp(260px, 21.5vw, 340px);
}

/* the closing stage reuses .hero but stays dark */
.hero--end {
  min-height: 92svh;
  display: block;
  padding: 0;
  background: var(--black);
  color: var(--off);
}

.hero__scene {
  position: absolute; inset: 0;
  perspective: 1200px;
  transform-style: preserve-3d;
  transform: rotateX(calc(-22deg + var(--tiltX, 0deg))) rotateY(var(--tiltY, 0deg));
  will-change: transform, opacity;
}
.hero__stage {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}

/* home hero — type + handwritten mark */
.hero__inner { position: relative; width: 100%; }

.hero__title {
  font-weight: 600;
  line-height: .92;
  letter-spacing: -.035em;
  text-transform: uppercase;
  position: relative; z-index: 3;
}
/* giant two-line phrase — each line spans the stage horizontally */
.hero__line { display: block; overflow: hidden; font-size: clamp(28px, 7.8vw, 150px); white-space: nowrap; }
.hero__accent {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.04em;
  text-transform: none;
  letter-spacing: -.01em;
  color: #A62639;
}

/* supporting line under the phrase — key words in bright emphasis */
.hero__desc {
  margin-top: clamp(28px, 5vh, 48px);
  max-width: 560px;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.6;
  font-weight: 400;
  color: var(--muted);
}
.hero__desc strong { color: var(--off); font-weight: 600; }

/* handwritten "a." — parked in the empty bottom-right quadrant, clear of the type */
.hero__mark {
  position: absolute;
  z-index: 1;
  right: var(--pad);
  bottom: 6vh;
  width: clamp(180px, 22vw, 380px);
  opacity: .16;
  pointer-events: none;
  will-change: transform;
}

/* the word — anchored high, spanning the full width like the reference;
   the drum rises from below and covers its lower edge */
.hero__word {
  position: absolute;
  left: 50%; top: 13vh;
  transform: translateX(-50%);
  font-size: clamp(140px, 24vw, 420px);
  font-weight: 300;
  line-height: .8;
  letter-spacing: -.04em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* the drum */
.hero__drum {
  position: absolute;
  left: 50%; top: 54%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  animation: drumSpin 90s linear infinite;
}
@keyframes drumSpin {
  from { transform: rotateY(360deg); }
  to   { transform: rotateY(0deg); }
}

.hero__card {
  position: absolute;
  left: 0; top: 0;
  width: calc(var(--radius) * .8);   /* arc length of 1/8 of the drum — closes the circle */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #101010;
  transform: translate(-50%, -50%) rotateY(calc(var(--i) * 45deg)) translateZ(var(--radius));
}
.hero__card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.15) brightness(.92) contrast(1.03);
}

.hero__scroll {
  position: absolute;
  z-index: 4;
  left: var(--pad); bottom: 26px;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--faint);
  transition: color .4s var(--ease);
  white-space: nowrap;
}
.hero__scroll:hover { color: var(--off); }
.hero__arrow { animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@media (max-width: 900px) {
  .hero { --radius: clamp(150px, 40vw, 220px); }
  .hero__word { top: 20vh; font-size: clamp(80px, 24vw, 150px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__drum { animation: none; }
}

/* ---------- 7. Feed (post previews) ---------- */
/* Horizontal strip of post previews, sliding like a slow film —
   the Archive is also a fashion feed. */
.feed {
  position: relative;
  padding: clamp(48px, 9vh, 110px) 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feed__track {
  display: flex;
  align-items: flex-start;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: feedScroll 42s linear infinite;
}
@keyframes feedScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
/* fine pointers: JS pauses the auto-scroll and steers the track with the cursor */
.feed.is-hover { cursor: ew-resize; }
.feed.is-hover .feed__track { animation: none; }

.post {
  position: relative;
  width: clamp(250px, 24vw, 380px);
  margin-right: clamp(28px, 3.4vw, 64px);
  flex-shrink: 0;
  white-space: normal;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  transition: border-color .6s var(--ease);
}
.post:hover { border-top-color: var(--burgundy); }
.post__no {
  font-size: 10px; font-weight: 400;
  letter-spacing: .2em;
  color: var(--faint);
}
.post__title {
  margin-top: 16px;
  font-size: clamp(19px, 1.7vw, 26px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  transition: color .5s var(--ease);
}
.post:hover .post__title { color: #fff; }
.post__line {
  margin-top: 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- 7b. The Edit ---------- */
.edit { padding: clamp(90px, 16vh, 180px) 0 0; }
.edit__head {
  padding: 0 var(--pad);
  margin-bottom: clamp(48px, 8vh, 96px);
}
.edit__head .micro { margin-bottom: 16px; }
.edit__head h2 {
  font-size: clamp(56px, 9vw, 150px);
  font-weight: 300;
  line-height: .95;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

/* ---------- 8. The Archive ---------- */
.archive {
  position: relative;
  min-height: 130vh;
  padding: 20vh var(--pad) 24vh;
  overflow: hidden;
}
.archive__word {
  position: absolute;
  top: 12vh; left: 50%;
  transform: translateX(-50%);
  font-size: clamp(90px, 21vw, 420px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: rgba(228, 228, 228, .05);
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}
.archive__media {
  position: relative; z-index: 2;
  width: min(78vw, 880px);
  margin: 22vh auto 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.archive__media img {
  position: relative; top: -6%;
  width: 100%; height: 112%; object-fit: cover;
  filter: grayscale(.2);
}
.archive__text {
  position: relative; z-index: 3;
  max-width: min(78vw, 880px);
  margin: -12vh auto 0;
}
.archive__kicker { margin-bottom: 18px; }
.archive__lede {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.archive__body {
  margin-top: 1.2em;
  max-width: 100%;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}
.archive__micro { margin-top: 24px; }

/* ---------- 9. Pieces ---------- */
.pieces { padding: clamp(80px, 16vh, 180px) var(--pad); }

.pieces__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: clamp(56px, 10vh, 120px);
}
.pieces__head h2 {
  font-size: clamp(56px, 9vw, 150px);
  font-weight: 300;
  line-height: .95;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.pieces__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2.4vw, 40px);
  row-gap: clamp(72px, 12vh, 150px);
  align-items: start;
}

.piece { position: relative; cursor: pointer; }
.piece__no {
  position: absolute; top: -26px; left: 0; z-index: 2;
  font-size: 11px; letter-spacing: .22em;
  color: var(--faint);
}
.piece__media { position: relative; overflow: hidden; }
.piece__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), filter 1.2s var(--ease);
  filter: grayscale(.15);
}
.piece:hover .piece__media img { transform: scale(1.045); filter: grayscale(0); }
.piece__cta {
  position: absolute; left: 14px; bottom: 14px;
  font-size: 10px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase;
  background: rgba(8, 8, 8, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.piece:hover .piece__cta { opacity: 1; transform: translateY(0); }
.piece h3 {
  margin-top: 16px;
  font-size: 15px; font-weight: 400;
  letter-spacing: .04em; text-transform: uppercase;
}
.piece p { margin-top: 6px; }

/* Asymmetric placement (desktop) */
.piece--1 { grid-column: 1 / span 5; }
.piece--1 .piece__media { aspect-ratio: 3 / 4; }
.piece--2 { grid-column: 8 / span 4; margin-top: 22vh; }
.piece--2 .piece__media { aspect-ratio: 3 / 4; }
.piece--3 { grid-column: 2 / span 4; margin-top: 6vh; }
.piece--3 .piece__media { aspect-ratio: 4 / 5; }
.piece--4 { grid-column: 7 / span 5; margin-top: -8vh; }
.piece--4 .piece__media { aspect-ratio: 1 / 1; }
.piece--5 { grid-column: 1 / span 4; margin-top: 10vh; }
.piece--5 .piece__media { aspect-ratio: 4 / 5; }
.piece--6 { grid-column: 6 / span 5; margin-top: 26vh; }
.piece--6 .piece__media { aspect-ratio: 3 / 4; }

.pieces__more {
  margin-top: clamp(64px, 10vh, 120px);
  font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
  text-align: center;
}

/* ---------- 10. Curation (removed — section dropped from the page) ---------- */

/* ---------- 11. About ---------- */
.about {
  position: relative;
  padding: clamp(90px, 18vh, 200px) var(--pad);
  background: linear-gradient(180deg, var(--black) 0%, var(--burgundy) 42%, #1c080c 68%, var(--black) 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  column-gap: clamp(40px, 7vw, 120px);
  align-items: center;
}
.about__head {
  grid-column: 1; grid-row: 1;
  align-self: end;
  margin-bottom: clamp(28px, 5vh, 64px);
}
.about__head p { margin-bottom: 16px; }
.about__head h2 {
  font-size: clamp(40px, 5.4vw, 92px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
}
/* highlighted "a." — typographic accent that echoes the identity, not the logo */
.about__accent {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.18em;
  letter-spacing: -.01em;
  text-transform: none;
  color: #A62639;
}
.about__media {
  grid-column: 2; grid-row: 1 / 3;
  justify-self: end;
  width: 100%; max-width: 640px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.about__media img {
  position: relative; top: -6%;
  width: 100%; height: 112%; object-fit: cover;
  filter: grayscale(.2);
}
.about__text {
  grid-column: 1; grid-row: 2;
  align-self: start;
  justify-self: start;
  position: relative;
  z-index: 2;
  max-width: 100%;
  margin-top: 0;
}
.about__text p {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.65;
  color: var(--off);
  text-shadow: 0 1px 10px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.4);
}
.about__text p + p { margin-top: 1.1em; }
/* signature — plain "ana" in the brand's italic voice */
.about__text .about__sign {
  margin-top: 32px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(64px, 7vw, 110px);
  line-height: 1;
  color: var(--off);
  opacity: .85;
}

/* ---------- 12. Instagram ---------- */
.instagram {
  padding: clamp(100px, 20vh, 220px) var(--pad);
  text-align: center;
}
.instagram__micro { margin-bottom: clamp(24px, 4vh, 44px); }
.instagram__title {
  font-size: clamp(44px, 8vw, 130px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
}
.instagram__cta {
  display: inline-block;
  margin-top: clamp(36px, 6vh, 64px);
  border: 1px solid var(--burgundy);
  background: var(--burgundy);
  border-radius: 999px;
  padding: 18px 38px;
  font-size: 12px; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
.instagram__cta:hover {
  background: #551220;
  border-color: #551220;
  transform: translateY(-2px);
}

/* secondary route — WhatsApp */
.instagram__alt {
  margin-top: clamp(24px, 4vh, 40px);
  font-size: 12px; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted);
}
.instagram__cta--wa {
  background: transparent;
  border-color: var(--line);
  margin-top: 16px;
}
.instagram__cta--wa:hover {
  background: var(--off);
  border-color: var(--off);
  color: var(--black);
  transform: translateY(-2px);
}

/* live feed — the widget embed lands inside #instafeed; the cells below are
   placeholders that mirror the grid until the account is connected */
.instafeed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 880px;
  margin: clamp(48px, 8vh, 88px) auto 0;
}
.instafeed__cell {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #101010;
}
.instafeed__cell img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.35) brightness(.85);
  transition: filter .6s var(--ease), transform .8s var(--ease);
}
.instafeed__cell:hover img { filter: grayscale(0) brightness(1); transform: scale(1.04); }

/* ---------- 13. Footer ---------- */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vh, 96px) var(--pad) 0;
  overflow: hidden;
}
.footer__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.footer__logo { height: 44px; width: auto; opacity: .9; }
.footer__nav {
  display: flex; gap: clamp(18px, 3vw, 40px); flex-wrap: wrap;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
}
.footer__nav a { color: var(--muted); transition: color .4s var(--ease); }
.footer__nav a:hover { color: var(--off); }

.footer__meta {
  display: flex; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap;
  margin-top: clamp(40px, 7vh, 80px);
  padding-bottom: clamp(40px, 7vh, 80px);
}

.footer__giant { display: none; }
/* the pattern is the footer's background — a soft band behind the content */
.footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(200px, 30vw, 480px);
  background: url('../images/pattern-ar.png') repeat-x left bottom / auto 100%;
  opacity: .06;
  pointer-events: none;
}
.footer__top, .footer__meta { position: relative; z-index: 1; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 900px) {
  .header__nav a:not(.header__cta) { display: none; }

  .header { padding: 16px 18px; }
  .header__logo img { height: 28px; }
  .header__nav { gap: 8px; }
  .header__cta { padding: 8px 12px; font-size: 9px; letter-spacing: .1em; }

  .hero__mark { top: -8vh; right: 2vw; bottom: auto; width: 52vw; }

  .feed .post { width: clamp(240px, 74vw, 320px); }
  .instafeed { grid-template-columns: repeat(2, 1fr); }

  .archive { min-height: auto; padding-bottom: 16vh; }
  .archive__media { width: 100%; margin-top: 14vh; }
  .archive__text { margin-top: -6vh; }

  .pieces__grid { grid-template-columns: 1fr; row-gap: 72px; }
  .piece--1, .piece--2, .piece--3, .piece--4, .piece--5, .piece--6 {
    grid-column: 1 / -1;
    margin-top: 0;
    width: 100%;
  }
  .piece--1, .piece--3, .piece--5 { width: 84%; }
  .piece--2, .piece--4, .piece--6 { width: 84%; margin-left: auto; }

  .about { grid-template-columns: 1fr; row-gap: 0; }
  .about__head, .about__media, .about__text { grid-column: 1; grid-row: auto; }
  .about__head { margin-bottom: clamp(36px, 7vh, 64px); }
  .about__media { width: 100%; }
  .about__text { margin-top: 40px; }
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    clip-path: none; transform: none; opacity: 1;
    transition: none;
  }
  .hero__arrow { animation: none; }
  .feed__track { animation: none; }
  * { transition-duration: .01ms !important; }
}
