/* ============================================================
   FOLDSUN — Vine Collection
   Cinematic scroll-driven one-pager
   ============================================================ */

@property --live-accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #8f8f8f;
}

:root {
  --bg: #0a0a0a;
  --fg: #f4f2ee;
  --fg-dim: rgba(244, 242, 238, 0.62);
  --fg-faint: rgba(244, 242, 238, 0.38);
  --accent: #cfd2d6;
  --live-accent: #8f8f8f;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --nav-h: 84px;
  transition: --live-accent 1.4s ease;
}

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

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

html.lock-scroll, body.lock-scroll {
  overflow: hidden;
  height: 100%;
}

body {
  position: relative;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- ambient mood-lighting, tied to the active scene ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(46% 38% at 88% 10%, var(--live-accent) 0%, transparent 72%);
  opacity: 0.16;
  filter: blur(70px);
  mix-blend-mode: screen;
}

main { position: relative; z-index: 1; }

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

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

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ---------- progress bar ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--fg);
  z-index: 200;
  transition: width 0.08s linear;
}

/* ---------- top nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  z-index: 150;
  mix-blend-mode: difference;
  transition: transform 0.6s var(--ease);
}

.nav.nav--hidden {
  transform: translateY(-100%);
}

.nav__mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
}

.nav__collection {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  mix-blend-mode: normal;
  color: var(--fg);
  opacity: 0.75;
}

/* ---------- side rail nav ---------- */
.rail {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}

.rail.is-visible { opacity: 1; pointer-events: auto; }

.rail__dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.rail__dot span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(244, 242, 238, 0.35);
  transition: all 0.4s var(--ease);
  display: block;
}

.rail__dot:hover span { background: rgba(244, 242, 238, 0.7); }

.rail__dot.is-active span {
  width: 9px;
  height: 9px;
  background: var(--dot-accent, var(--fg));
  box-shadow: 0 0 12px var(--dot-accent, var(--fg));
}

/* ---------- shared section frame ---------- */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 18px;
}

/* ---------- reveal animation base ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 0.12s);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal:not(.is-in) { transition-delay: 0s; }

.reveal-scale {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.1s var(--ease), transform 1.4s var(--ease);
}
.reveal-scale.is-in { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   INTRO / OPENING SEQUENCE
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #08080a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  cursor: pointer;
  transition: opacity 1s var(--ease), transform 1.15s var(--ease);
}

.intro__vine {
  overflow: visible;
}

.intro__vine path {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: vine-draw 1.7s var(--ease) 0.15s forwards;
}

@keyframes vine-draw {
  to { stroke-dashoffset: 0; }
}

.intro__word {
  display: flex;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: 0.32em;
  padding-left: 0.32em; /* balance the trailing letter-spacing */
}

.intro__word span {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  animation: intro-letter 0.7s var(--ease) forwards;
  animation-delay: calc(1.15s + var(--i) * 0.06s);
}

@keyframes intro-letter {
  to { opacity: 1; transform: translateY(0); }
}

.intro__tag {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-faint);
  opacity: 0;
  animation: intro-letter 0.8s var(--ease) 2.1s forwards;
}

.intro__skip {
  position: absolute;
  bottom: 30px;
  right: 30px;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  opacity: 0;
  animation: intro-letter 0.8s var(--ease) 1.1s forwards;
}

.intro__skip:hover { color: var(--fg); }

.intro.is-done {
  opacity: 0;
  transform: translateY(-6%);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .intro { transition: opacity 0.3s linear; }
  .intro__vine path,
  .intro__word span,
  .intro__tag,
  .intro__skip { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.15);
  filter: saturate(0.85) brightness(0.7);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.15) translateY(0); }
  to   { transform: scale(1.24) translateY(-2%); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,6,6,0.55) 0%, rgba(6,6,6,0.25) 35%, rgba(6,6,6,0.65) 78%, rgba(6,6,6,0.92) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero__title span {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.2rem, 13vw, 9rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.hero__sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  margin-top: 18px;
  color: var(--fg-dim);
}

.hero__tagline {
  max-width: 34ch;
  margin: 20px auto 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--fg-dim);
}

.scrollcue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.scrollcue i {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--fg-faint), transparent);
  position: relative;
  overflow: hidden;
}

.scrollcue i::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fg);
  animation: cue-drop 2.2s ease-in-out infinite;
}

@keyframes cue-drop {
  0%   { top: -100%; }
  60%  { top: 100%; }
  100% { top: 100%; }
}

/* ============================================================
   DESIGN SECTION
   ============================================================ */
.design {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(90px, 12vh, 140px) clamp(24px, 6vw, 80px);
  background: #0d0d0d;
}

.design__media {
  overflow: hidden;
  border-radius: 4px;
}

.design__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
}

.design__text h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  margin-bottom: 24px;
}

.design__text p {
  max-width: 46ch;
  color: var(--fg-dim);
  line-height: 1.75;
  font-size: 1rem;
}

.specs {
  list-style: none;
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  max-width: 46ch;
}

.specs li {
  font-size: 0.9rem;
  border-top: 1px solid rgba(244,242,238,0.14);
  padding-top: 12px;
}

.specs li span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 6px;
}

/* ============================================================
   COLOR SCENES
   ============================================================ */
.scene {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.scene__bg {
  position: absolute;
  inset: -6% -2%;
  z-index: 0;
  will-change: transform;
}

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

.scene__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(6,6,6,0.92) 0%, rgba(6,6,6,0.45) 40%, rgba(6,6,6,0.05) 62%);
}

.scene__frame {
  position: relative;
  z-index: 2;
  padding: 0 clamp(24px, 6vw, 80px) clamp(56px, 9vh, 110px);
  max-width: 780px;
}

.scene__index {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.scene__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 6.4rem);
  line-height: 0.95;
  margin-bottom: 18px;
}

.scene__desc {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--fg-dim);
  max-width: 42ch;
  margin-bottom: 24px;
}

.scene__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.scene__tags span {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border: 1px solid rgba(244,242,238,0.28);
  border-radius: 999px;
  color: var(--fg-dim);
  backdrop-filter: blur(6px);
}

.scene__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 15px 28px;
  background: var(--fg);
  color: #0a0a0a;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.scene__cta:hover {
  transform: translateY(-2px);
  opacity: 0.88;
}

.scene__cta-price {
  opacity: 0.55;
  font-size: 0.78rem;
}

.scene__cta--soon {
  background: transparent;
  border: 1px solid rgba(244,242,238,0.28);
  color: var(--fg-faint);
  cursor: default;
  pointer-events: none;
}

.scene__cta--soon:hover { transform: none; }

.detail-card {
  position: absolute;
  z-index: 2;
  top: clamp(90px, 16vh, 160px);
  right: clamp(24px, 6vw, 90px);
  width: clamp(150px, 18vw, 230px);
  transform: rotate(2.5deg);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7);
  background: #111;
  border: 1px solid rgba(244,242,238,0.14);
}

.detail-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.detail-card figcaption {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding: 10px 12px;
}

/* ============================================================
   CAMPAIGN INTERLUDE
   ============================================================ */
.campaign {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.campaign__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6,6,6,0.5) 0%, rgba(6,6,6,0.15) 30%, rgba(6,6,6,0.55) 100%);
}

.campaign__frame {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.campaign__frame h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* ============================================================
   COLLECTION / FINALE
   ============================================================ */
.collection {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 100px 24px;
}

.collection__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.collection__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.55);
}

.collection__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(120% 90% at 50% 100%, rgba(6,6,6,0.35) 0%, rgba(6,6,6,0.85) 100%);
}

.collection__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
}

.collection__content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  margin-bottom: 44px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.swatches button {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 10px 18px 10px 12px;
  border: 1px solid rgba(244,242,238,0.24);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.swatches button:hover {
  border-color: rgba(244,242,238,0.7);
  transform: translateY(-2px);
}

.swatches i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c, #888);
  border: 2px solid var(--c, #888);
  display: block;
}

/* ============================================================
   COMMUNITY / TOPLULUKTAN
   ============================================================ */
.community {
  padding: clamp(90px, 12vh, 140px) clamp(24px, 6vw, 80px);
  background: #0d0d0d;
  text-align: center;
}

.community .eyebrow { margin-bottom: 14px; }

.community h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: clamp(48px, 8vh, 80px);
}

.community__grid {
  columns: 3 260px;
  column-gap: clamp(20px, 3vw, 40px);
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
}

.community__card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: clamp(20px, 3vw, 40px);
  background: #131313;
  border: 1px solid rgba(244,242,238,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.community__card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: 50% 20%;
}

.community__card blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  padding: 24px 24px 8px;
}

.community__card cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--fg-faint);
  padding: 0 24px 24px;
}

.community__card--text {
  padding: 30px 24px 26px;
}

.community__card--text blockquote { padding: 0 0 16px; }
.community__card--text cite { padding: 0; }

.community__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: 1rem;
  color: #0a0a0a;
  background: var(--c, var(--fg-dim));
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 90px 24px 60px;
  text-align: center;
  background: #060606;
}

.footer__mark {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.16em;
  display: block;
  margin-bottom: 18px;
}

.footer p {
  color: var(--fg-faint);
  font-size: 0.82rem;
  line-height: 1.7;
}

.footer__meta {
  margin-top: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .design {
    grid-template-columns: 1fr;
  }
  .design__media img { aspect-ratio: 16/10; }

  .community__grid {
    columns: 2 240px;
    max-width: 620px;
  }
}

@media (max-width: 560px) {
  .community__grid {
    columns: 1;
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .rail { display: none; }

  .nav { padding: 0 18px; height: 64px; }
  .nav__collection { display: none; }

  .scene {
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
  }

  .scene__frame {
    padding: 0 20px 20px;
    max-width: 100%;
  }

  .detail-card {
    position: static;
    transform: none;
    width: 128px;
    margin: 0 20px 24px auto;
  }

  .design { padding: 80px 20px; gap: 32px; }

  .hero__tagline { font-size: 0.88rem; }
}

@media (max-width: 420px) {
  .scene__name { font-size: clamp(2.4rem, 12vw, 3.4rem); }
}
