/* namu.style - Magazine-spread luxury design */
/* Colors: #C4CCD8, #8C92AC, #0B1D3A, #B8A99A, #050D1A, #4A5568, #F2EDE4 */

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

html {
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background-color: #050D1A;
  color: #C4CCD8;
  overflow-x: hidden;
}

/* ================================
   BINDING LINE (Magazine Spine)
   ================================ */
.binding-line {
  position: fixed;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #4A5568 10%,
    #4A5568 90%,
    transparent 100%
  );
  z-index: 100;
  pointer-events: none;
  opacity: 0.5;
}

/* ================================
   RUNNING HEADS
   ================================ */
.running-head {
  position: fixed;
  top: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4A5568;
  z-index: 99;
  pointer-events: none;
}

.running-head--left {
  left: 24px;
}

.running-head--right {
  right: 24px;
}

/* ================================
   FOLIO NUMBERS
   ================================ */
.folio {
  position: fixed;
  bottom: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #4A5568;
  z-index: 99;
  pointer-events: none;
}

.folio--left {
  left: 24px;
}

.folio--right {
  right: 24px;
}

/* ================================
   SPREAD LAYOUT
   ================================ */
.spread {
  width: 100vw;
  height: 100vh;
  display: flex;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

.spread__left,
.spread__right {
  width: 50%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spread__content {
  max-width: 380px;
}

.spread__content--padded {
  padding: 40px;
}

.spread__title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(24px, 4vw, 64px);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #F2EDE4;
  line-height: 1.05;
  margin-bottom: 20px;
}

.spread__title--korean {
  text-transform: none;
}

.spread__rule {
  width: 48px;
  height: 1px;
  background-color: #8C92AC;
  margin-bottom: 24px;
}

.spread__body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 300;
  line-height: 1.7;
  color: #C4CCD8;
  margin-bottom: 16px;
}

.spread__overline {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8C92AC;
  display: block;
  margin-bottom: 16px;
}

.spread__caption {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #4A5568;
  position: absolute;
  bottom: 48px;
  text-align: center;
}

.spread__pullquote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(18px, 1.5vw, 24px);
  font-style: italic;
  font-weight: 300;
  color: #B8A99A;
  line-height: 1.6;
  margin-top: 24px;
  padding-left: 20px;
  border-left: 2px solid #B8A99A;
}

/* ================================
   SPREAD 1: COVER
   ================================ */
.spread--cover {
  background-color: #050D1A;
}

.spread--cover .spread__left {
  justify-content: center;
  align-items: flex-end;
  padding-right: 8px;
}

.spread--cover .spread__right {
  justify-content: center;
  align-items: flex-start;
  padding-left: 8px;
}

.cover__domain-left,
.cover__domain-right {
  position: relative;
  z-index: 2;
}

.cover__namu {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(48px, 12vw, 200px);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #F2EDE4;
  line-height: 1;
}

.cover__dot {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(48px, 12vw, 200px);
  font-weight: 400;
  color: #B8A99A;
  line-height: 1;
}

.cover__style {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(48px, 12vw, 200px);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #F2EDE4;
  line-height: 1;
}

.cover__mountain {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40%;
  z-index: 1;
}

.cover__mountain--left {
  background:
    linear-gradient(135deg, transparent 30%, #0B1D3A 30%, #0B1D3A 32%, transparent 32%),
    linear-gradient(160deg, transparent 25%, #0B1D3A 25%, #0B1D3A 28%, transparent 28%),
    linear-gradient(145deg, transparent 40%, #4A5568 40%, #4A5568 45%, transparent 45%);
  clip-path: polygon(0% 100%, 20% 40%, 35% 60%, 55% 20%, 80% 50%, 100% 30%, 100% 100%);
  background-color: #0B1D3A;
  opacity: 0.4;
}

.cover__mountain--right {
  background-color: #0B1D3A;
  clip-path: polygon(0% 40%, 25% 55%, 45% 25%, 65% 50%, 85% 30%, 100% 45%, 100% 100%, 0% 100%);
  opacity: 0.3;
}

.cover__issue {
  position: absolute;
  bottom: 48px;
  left: 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.cover__issue-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4A5568;
}

.cover__issue-number {
  font-family: 'Archivo Black', sans-serif;
  font-size: 32px;
  color: #8C92AC;
  letter-spacing: 0.04em;
}

.cover__issue-season {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4A5568;
}

/* ================================
   SPREAD 2: PHILOSOPHY
   ================================ */
.spread--philosophy {
  background-color: #050D1A;
}

.philosophy__visual {
  position: relative;
  width: 280px;
  height: 280px;
}

.tree-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid #4A5568;
}

.tree-ring--1 {
  width: 260px;
  height: 260px;
  border-color: #4A5568;
  opacity: 0.3;
}

.tree-ring--2 {
  width: 200px;
  height: 200px;
  border-color: #4A5568;
  opacity: 0.4;
}

.tree-ring--3 {
  width: 150px;
  height: 150px;
  border-color: #8C92AC;
  opacity: 0.5;
}

.tree-ring--4 {
  width: 100px;
  height: 100px;
  border-color: #8C92AC;
  opacity: 0.6;
}

.tree-ring--5 {
  width: 60px;
  height: 60px;
  border-color: #C4CCD8;
  opacity: 0.7;
}

.tree-ring--center {
  width: 16px;
  height: 16px;
  background-color: #B8A99A;
  border: none;
  opacity: 0.8;
}

/* ================================
   SPREAD 3: EDITORIAL
   ================================ */
.spread--editorial {
  background-color: #050D1A;
}

.editorial__landscape {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.mountain-layer {
  position: absolute;
  bottom: 0;
  width: 100%;
}

.mountain-layer--1 {
  height: 60%;
  background-color: #0B1D3A;
  clip-path: polygon(0% 50%, 15% 30%, 30% 45%, 50% 15%, 70% 35%, 85% 20%, 100% 40%, 100% 100%, 0% 100%);
  opacity: 0.9;
}

.mountain-layer--2 {
  height: 50%;
  background-color: #4A5568;
  clip-path: polygon(0% 55%, 20% 35%, 40% 50%, 60% 25%, 80% 45%, 100% 30%, 100% 100%, 0% 100%);
  opacity: 0.4;
}

.mountain-layer--3 {
  height: 40%;
  background-color: #8C92AC;
  clip-path: polygon(0% 60%, 25% 45%, 50% 55%, 75% 40%, 100% 50%, 100% 100%, 0% 100%);
  opacity: 0.25;
}

.mountain-layer--4 {
  height: 25%;
  background-color: #C4CCD8;
  clip-path: polygon(0% 70%, 30% 55%, 60% 65%, 100% 50%, 100% 100%, 0% 100%);
  opacity: 0.15;
}

/* ================================
   SPREAD 4: COLLECTION
   ================================ */
.spread--collection {
  background-color: #050D1A;
}

.collection__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.collection__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.collection__swatch {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(140, 146, 172, 0.2);
}

.collection__label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #C4CCD8;
}

.collection__code {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: #4A5568;
}

.collection__typography {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px;
}

.type-specimen {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-specimen--display .type-specimen__sample {
  font-family: 'Archivo Black', sans-serif;
  font-size: 72px;
  color: #F2EDE4;
  letter-spacing: 0.04em;
  line-height: 1;
}

.type-specimen--body .type-specimen__sample {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 72px;
  font-weight: 300;
  color: #F2EDE4;
  line-height: 1;
}

.type-specimen--mono .type-specimen__sample {
  font-family: 'Space Mono', monospace;
  font-size: 56px;
  color: #F2EDE4;
  line-height: 1;
}

.type-specimen__name {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #8C92AC;
}

.type-specimen__usage {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #4A5568;
}

/* ================================
   SPREAD 5: COLOPHON
   ================================ */
.spread--colophon {
  background-color: #050D1A;
}

.colophon__tree {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.colophon__tree-svg {
  width: 180px;
  height: auto;
  opacity: 0.6;
}

.colophon__content {
  justify-content: center;
}

.colophon__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(74, 85, 104, 0.3);
}

.colophon__detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.colophon__detail-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4A5568;
}

.colophon__detail-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: #C4CCD8;
}

.colophon__domain {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(18px, 2vw, 32px);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #8C92AC;
  margin-top: 40px;
  opacity: 0.6;
}

/* ================================
   ANIMATIONS
   ================================ */
.spread__title,
.spread__body,
.spread__overline,
.spread__rule,
.spread__pullquote,
.spread__caption,
.collection__grid,
.collection__typography,
.colophon__details,
.colophon__domain {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.spread.is-visible .spread__overline {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.spread.is-visible .spread__title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.spread.is-visible .spread__rule {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.spread.is-visible .spread__body {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.spread.is-visible .spread__pullquote {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.6s;
}

.spread.is-visible .spread__caption {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.spread.is-visible .collection__grid {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.spread.is-visible .collection__typography {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.spread.is-visible .colophon__details {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.spread.is-visible .colophon__domain {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

/* Cover animations - always visible */
.cover__namu,
.cover__dot,
.cover__style {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.spread--cover.is-visible .cover__namu {
  opacity: 1;
  transition-delay: 0.3s;
}

.spread--cover.is-visible .cover__dot {
  opacity: 1;
  transition-delay: 0.6s;
}

.spread--cover.is-visible .cover__style {
  opacity: 1;
  transition-delay: 0.9s;
}

.cover__issue {
  opacity: 0;
  transition: opacity 0.8s ease 1.2s;
}

.spread--cover.is-visible .cover__issue {
  opacity: 1;
}

/* Tree rings animation */
.tree-ring {
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.spread--philosophy.is-visible .tree-ring--1 {
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0.2s;
}

.spread--philosophy.is-visible .tree-ring--2 {
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0.35s;
}

.spread--philosophy.is-visible .tree-ring--3 {
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0.5s;
}

.spread--philosophy.is-visible .tree-ring--4 {
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0.65s;
}

.spread--philosophy.is-visible .tree-ring--5 {
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0.8s;
}

.spread--philosophy.is-visible .tree-ring--center {
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0.95s;
}

/* Mountain layers animation */
.mountain-layer {
  transform: translateY(100%);
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.spread--editorial.is-visible .mountain-layer--4 {
  transform: translateY(0);
  transition-delay: 0.1s;
}

.spread--editorial.is-visible .mountain-layer--3 {
  transform: translateY(0);
  transition-delay: 0.25s;
}

.spread--editorial.is-visible .mountain-layer--2 {
  transform: translateY(0);
  transition-delay: 0.4s;
}

.spread--editorial.is-visible .mountain-layer--1 {
  transform: translateY(0);
  transition-delay: 0.55s;
}

/* Colophon tree animation */
.colophon__tree-svg {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.spread--colophon.is-visible .colophon__tree-svg {
  opacity: 0.6;
  transform: translateY(0);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
  .spread {
    flex-direction: column;
  }

  .spread__left,
  .spread__right {
    width: 100%;
    height: 50%;
  }

  .binding-line {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent 0%,
      #4A5568 10%,
      #4A5568 90%,
      transparent 100%
    );
  }

  .cover__namu,
  .cover__dot,
  .cover__style {
    font-size: clamp(36px, 15vw, 100px);
  }

  .spread__content {
    max-width: 100%;
    padding: 24px;
  }

  .philosophy__visual {
    width: 180px;
    height: 180px;
  }

  .tree-ring--1 { width: 160px; height: 160px; }
  .tree-ring--2 { width: 130px; height: 130px; }
  .tree-ring--3 { width: 100px; height: 100px; }
  .tree-ring--4 { width: 70px; height: 70px; }
  .tree-ring--5 { width: 40px; height: 40px; }

  .collection__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .type-specimen--display .type-specimen__sample,
  .type-specimen--body .type-specimen__sample {
    font-size: 48px;
  }

  .type-specimen--mono .type-specimen__sample {
    font-size: 36px;
  }
}
