/* ==========================================================================
   Bona Fide — Brand Building Scroll Section
   All classes prefixed with .bf- to avoid conflicts
   ========================================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

/* --- Custom Properties --- */
.bf-brand-section {
  --bf-midnight: #0B0F1A;
  --bf-ivory: #F5F0EB;
  --bf-terracotta: #C4654A;
  --bf-stone: #A8A093;
  --bf-sage: #7A8B6F;
  --bf-grid: rgba(168, 160, 147, 0.12);
  --bf-grid-active: rgba(168, 160, 147, 0.28);
  --bf-font-display: 'Instrument Serif', Georgia, serif;
  --bf-font-body: 'DM Sans', Helvetica, sans-serif;
  --bf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Section Root --- */
.bf-brand-section {
  position: relative;
  background-color: var(--bf-midnight);
  color: var(--bf-ivory);
  overflow: hidden;
  font-family: var(--bf-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Scenes (shared) --- */
.bf-scene {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  box-sizing: border-box;
}

.bf-scene__inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.bf-scene__label {
  position: absolute;
  bottom: -40px;
  left: 0;
  font-family: var(--bf-font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bf-stone);
  opacity: 0;
}

/* ==========================================================================
   Scene 1 — Design Grid
   ========================================================================== */
.bf-scene--grid {
  min-height: 100vh;
}

.bf-grid-overlay {
  position: relative;
  width: 100%;
  height: 70vh;
  max-height: 640px;
}

.bf-grid-overlay__line {
  position: absolute;
  background-color: var(--bf-grid);
  opacity: 0;
}

.bf-grid-overlay__line--v {
  width: 1px;
  top: 0;
  bottom: 0;
}

.bf-grid-overlay__line--h {
  height: 1px;
  left: 0;
  right: 0;
}

/* Scattered brand words */
.bf-grid-word {
  position: absolute;
  font-family: var(--bf-font-display);
  text-transform: uppercase;
  color: var(--bf-ivory);
  pointer-events: none;
  opacity: 0;
  line-height: 1;
}

.bf-grid-word--1 {
  font-size: clamp(48px, 7vw, 96px);
  top: 8%;
  left: 10%;
  transform: rotate(-6deg);
}

.bf-grid-word--2 {
  font-size: clamp(48px, 7vw, 96px);
  top: 28%;
  right: 8%;
  transform: rotate(4deg);
  color: var(--bf-terracotta);
}

.bf-grid-word--3 {
  font-size: clamp(36px, 5vw, 72px);
  bottom: 18%;
  left: 35%;
  transform: rotate(-3deg);
  color: var(--bf-stone);
}

.bf-grid-word--4 {
  font-size: clamp(16px, 2vw, 28px);
  font-family: var(--bf-font-body);
  font-weight: 500;
  letter-spacing: 0.2em;
  top: 55%;
  left: 6%;
  transform: rotate(8deg);
  color: var(--bf-sage);
}

.bf-grid-word--5 {
  font-size: clamp(16px, 2vw, 28px);
  font-family: var(--bf-font-body);
  font-weight: 500;
  letter-spacing: 0.2em;
  top: 14%;
  right: 15%;
  transform: rotate(-10deg);
  color: var(--bf-stone);
}

.bf-grid-word--6 {
  font-size: clamp(16px, 2vw, 28px);
  font-family: var(--bf-font-body);
  font-weight: 500;
  letter-spacing: 0.2em;
  bottom: 35%;
  right: 12%;
  transform: rotate(5deg);
  color: var(--bf-sage);
}

.bf-grid-word--7 {
  font-size: clamp(16px, 2vw, 28px);
  font-family: var(--bf-font-body);
  font-weight: 500;
  letter-spacing: 0.2em;
  bottom: 8%;
  left: 12%;
  transform: rotate(-4deg);
  color: var(--bf-terracotta);
}

/* ==========================================================================
   Scene 2 — Scattered Brand Elements
   ========================================================================== */
.bf-elements {
  position: relative;
  width: 100%;
  height: 70vh;
  max-height: 640px;
}

.bf-element {
  position: absolute;
  opacity: 0;
}

.bf-element--circle {
  width: 140px;
  height: 140px;
  border: 2px solid var(--bf-terracotta);
  border-radius: 50%;
  top: 10%;
  left: 15%;
}

.bf-element--square {
  width: 80px;
  height: 80px;
  border: 2px solid var(--bf-stone);
  top: 55%;
  right: 18%;
  transform: rotate(15deg);
}

.bf-element--line-1 {
  width: 120px;
  height: 2px;
  background-color: var(--bf-sage);
  top: 30%;
  right: 25%;
  transform: rotate(-20deg);
}

.bf-element--line-2 {
  width: 80px;
  height: 2px;
  background-color: var(--bf-ivory);
  bottom: 30%;
  left: 30%;
  transform: rotate(40deg);
}

.bf-element--dot-1 {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--bf-terracotta);
  top: 20%;
  right: 35%;
}

.bf-element--dot-2 {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--bf-sage);
  bottom: 25%;
  right: 40%;
}

.bf-element--dot-3 {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--bf-stone);
  top: 45%;
  left: 10%;
}

.bf-element--arc {
  width: 100px;
  height: 50px;
  border-top: 2px solid var(--bf-terracotta);
  border-radius: 100px 100px 0 0;
  bottom: 15%;
  left: 50%;
}

.bf-element--cross {
  width: 40px;
  height: 40px;
  top: 70%;
  left: 22%;
}

.bf-element--cross::before,
.bf-element--cross::after {
  content: '';
  position: absolute;
  background-color: var(--bf-ivory);
}

.bf-element--cross::before {
  width: 100%;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.bf-element--cross::after {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.bf-element--triangle {
  width: 0;
  height: 0;
  border-left: 35px solid transparent;
  border-right: 35px solid transparent;
  border-bottom: 60px solid transparent;
  border-bottom-color: var(--bf-sage);
  opacity: 0.5;
  top: 15%;
  right: 10%;
}

/* ==========================================================================
   Scene 3 — Logo Assembly
   ========================================================================== */
.bf-logo-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 50vh;
}

.bf-logo-piece {
  opacity: 0;
}

.bf-logo-piece__img {
  display: block;
  max-width: 100%;
  height: auto;
}

.bf-logo-piece--mark .bf-logo-piece__img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.bf-logo-piece--wordmark .bf-logo-piece__img {
  width: 280px;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   Scene 4 — Typography
   ========================================================================== */
.bf-type-showcase {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.bf-type-row {
  opacity: 0;
  border-bottom: 1px solid rgba(168, 160, 147, 0.15);
  padding-bottom: 40px;
}

.bf-type-row__label {
  display: block;
  font-family: var(--bf-font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bf-stone);
  margin-bottom: 16px;
}

.bf-type-row--display .bf-type-row__sample {
  font-family: var(--bf-font-display);
  font-size: clamp(48px, 8vw, 112px);
  line-height: 1;
  color: var(--bf-ivory);
}

.bf-type-row--heading .bf-type-row__sample {
  font-family: var(--bf-font-display);
  font-size: clamp(28px, 4vw, 56px);
  font-style: italic;
  line-height: 1.15;
  color: var(--bf-ivory);
}

.bf-type-row--body .bf-type-row__sample {
  font-family: var(--bf-font-body);
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--bf-stone);
}

.bf-type-row--numbers .bf-type-row__sample {
  font-family: var(--bf-font-body);
  font-size: clamp(20px, 2.5vw, 36px);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--bf-terracotta);
}

/* ==========================================================================
   Scene 5 — Color Palette
   ========================================================================== */
.bf-palette {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.bf-palette__card {
  width: 160px;
  background: rgba(245, 240, 235, 0.04);
  border: 1px solid rgba(245, 240, 235, 0.08);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  backdrop-filter: blur(4px);
}

.bf-palette__swatch {
  width: 100%;
  height: 120px;
}

.bf-palette__card--1 .bf-palette__swatch { background-color: var(--bf-midnight); border-bottom: 1px solid rgba(245,240,235,0.08); }
.bf-palette__card--2 .bf-palette__swatch { background-color: var(--bf-ivory); }
.bf-palette__card--3 .bf-palette__swatch { background-color: var(--bf-terracotta); }
.bf-palette__card--4 .bf-palette__swatch { background-color: var(--bf-stone); }
.bf-palette__card--5 .bf-palette__swatch { background-color: var(--bf-sage); }

.bf-palette__info {
  padding: 14px 16px;
}

.bf-palette__name {
  display: block;
  font-family: var(--bf-font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--bf-ivory);
  margin-bottom: 4px;
}

.bf-palette__hex {
  display: block;
  font-family: var(--bf-font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--bf-stone);
}

/* ==========================================================================
   Scene 6 — Mockups
   ========================================================================== */
.bf-mockups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.bf-mockup {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  background: rgba(245, 240, 235, 0.03);
  border: 1px solid rgba(245, 240, 235, 0.06);
}

.bf-mockup__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background-color: rgba(168, 160, 147, 0.08);
}

.bf-mockup__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  font-family: var(--bf-font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bf-ivory);
  background: linear-gradient(to top, rgba(11,15,26,0.8) 0%, transparent 100%);
}

/* ==========================================================================
   Scene 7 — Brand Board
   ========================================================================== */
.bf-scene--final {
  min-height: 100vh;
}

.bf-brand-board {
  display: flex;
  flex-direction: column;
  gap: 48px;
  opacity: 0;
}

.bf-brand-board__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(168, 160, 147, 0.15);
}

.bf-brand-board__logo {
  width: 200px;
  height: auto;
  display: block;
  object-fit: contain;
  background-color: rgba(168, 160, 147, 0.06);
}

.bf-brand-board__colors {
  display: flex;
  gap: 12px;
}

.bf-brand-board__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(245, 240, 235, 0.1);
}

.bf-brand-board__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bf-brand-board__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  background-color: rgba(168, 160, 147, 0.08);
}

.bf-brand-board__statement {
  text-align: center;
  padding: 64px 0 32px;
}

.bf-brand-board__headline {
  font-family: var(--bf-font-display);
  font-size: clamp(32px, 5vw, 72px);
  line-height: 1.1;
  color: var(--bf-ivory);
  margin: 0;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */
.bf-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.bf-progress.bf-progress--visible {
  opacity: 1;
}

.bf-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bf-terracotta), var(--bf-sage));
  will-change: width;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .bf-palette {
    gap: 16px;
  }

  .bf-palette__card {
    width: 140px;
  }

  .bf-palette__swatch {
    height: 100px;
  }
}

@media (max-width: 768px) {
  .bf-scene {
    padding: 60px 20px;
  }

  .bf-element--circle {
    width: 90px;
    height: 90px;
  }

  .bf-element--square {
    width: 50px;
    height: 50px;
  }

  .bf-element--line-1 { width: 80px; }

  .bf-logo-piece--mark .bf-logo-piece__img {
    width: 80px;
    height: 80px;
  }

  .bf-logo-piece--wordmark .bf-logo-piece__img {
    width: 200px;
  }

  .bf-palette {
    flex-wrap: wrap;
    justify-content: center;
  }

  .bf-palette__card {
    width: calc(50% - 10px);
    max-width: 160px;
  }

  .bf-mockups {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bf-brand-board__gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bf-brand-board__logo {
    width: 160px;
  }
}

@media (max-width: 480px) {
  .bf-scene {
    padding: 48px 16px;
  }

  .bf-palette__card {
    width: 100%;
    max-width: 200px;
  }

  .bf-type-showcase {
    gap: 32px;
  }

  .bf-type-row {
    padding-bottom: 28px;
  }

  .bf-brand-board__statement {
    padding: 40px 0 16px;
  }
}
