/* ==========================================================================
   Biba — brand character page
   --------------------------------------------------------------------------
   Scope: everything is nested under `.biba`, so this file cannot affect any
   other page. Colours, type weights and transitions come from the custom
   properties defined in main.css, which already flip between the light and
   dark themes (see [color-scheme=light] / [color-scheme=dark]).
   Only the brand accent is declared locally, under `.biba`, so no new global
   variable is introduced.
   ========================================================================== */

.biba {
  --biba-accent: #4ea8ff;
  --biba-accent-soft: rgba(78, 168, 255, 0.18);
  --biba-accent-line: rgba(78, 168, 255, 0.45);
  --biba-radius: 1.6rem;
  --biba-radius-lg: 2.4rem;
  --biba-transition: 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.biba-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 5rem;
  align-items: center;
  margin-bottom: 7rem;
}

.biba-hero__media {
  margin: 0;
}

.biba-hero__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--stroke-controls);
  border-radius: var(--biba-radius-lg);
  background-color: var(--base-tint);
  box-shadow: 0 2.4rem 6rem var(--biba-accent-soft);
}

.biba-hero__frame img {
  display: block;
  width: 100%;
  height: auto;
}

.biba-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  font-size: 1.3rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t-muted);
}

.biba-hero__eyebrow::before {
  content: '';
  width: 3rem;
  height: 1px;
  background-color: var(--biba-accent);
}

.biba-hero__title {
  margin-bottom: 2rem;
  color: var(--t-bright);
  font-weight: var(--font-weight-medium);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.biba-hero__lede {
  margin-bottom: 3rem;
  font-size: 1.7rem;
  line-height: 1.7;
  color: var(--t-medium);
}

.biba-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

/* --------------------------------------------------------------------------
   Buttons (scoped — modelled on .btn-default)
   -------------------------------------------------------------------------- */

.biba-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 5.4rem;
  padding: 0 3rem;
  border: 1px solid var(--stroke-controls);
  border-radius: 5rem;
  background-color: transparent;
  font: normal var(--font-weight-medium) 1.6rem/1 var(--_font-default);
  color: var(--t-bright);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--biba-transition),
    color var(--biba-transition), border-color var(--biba-transition),
    transform var(--biba-transition);
}

.biba-btn i {
  font-size: 2rem;
}

.biba-btn:hover {
  transform: translateY(-0.2rem);
  border-color: var(--biba-accent);
  color: var(--t-bright);
}

.biba-btn--primary {
  border-color: var(--neutral-bright);
  background-color: var(--neutral-bright);
  color: var(--t-opp-bright);
}

.biba-btn--primary:hover {
  border-color: var(--biba-accent);
  background-color: var(--biba-accent);
  color: var(--neutral-white);
}

/* --------------------------------------------------------------------------
   Generic section rhythm
   -------------------------------------------------------------------------- */

.biba-section {
  margin-bottom: 7rem;
}

.biba-section__head {
  max-width: 68rem;
  margin-bottom: 3.4rem;
}

.biba-section__title {
  margin-bottom: 1.4rem;
  color: var(--t-bright);
  font-weight: var(--font-weight-medium);
  line-height: 1.15;
}

.biba-section__text {
  font-size: 1.7rem;
  line-height: 1.75;
  color: var(--t-medium);
}

.biba-section__text + .biba-section__text {
  margin-top: 1.6rem;
}

.biba-section__text a {
  color: var(--t-bright);
  text-decoration: underline;
  text-decoration-color: var(--biba-accent-line);
  text-underline-offset: 0.3rem;
  transition: text-decoration-color var(--biba-transition);
}

.biba-section__text a:hover {
  text-decoration-color: var(--biba-accent);
}

/* --------------------------------------------------------------------------
   The story of Biba
   -------------------------------------------------------------------------- */

.biba-story {
  max-width: 68rem;
}

.biba-story__chapter + .biba-story__chapter {
  margin-top: 4.4rem;
}

.biba-story__number {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 1.2rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--biba-accent);
}

.biba-story__title {
  margin-bottom: 1.6rem;
  font-size: 1.9rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
  color: var(--t-bright);
}

/* --------------------------------------------------------------------------
   Character profile
   -------------------------------------------------------------------------- */

.biba-facts {
  border-top: 1px solid var(--stroke-controls);
}

.biba-facts__item {
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  gap: 2.4rem;
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid var(--stroke-controls);
}

.biba-facts__label {
  font-size: 1.3rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-muted);
}

.biba-facts__value {
  font-size: 1.7rem;
  line-height: 1.6;
  color: var(--t-bright);
}

/* --------------------------------------------------------------------------
   Expression gallery (PhotoSwipe — see js/gallery-init.js)
   -------------------------------------------------------------------------- */

.biba-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.4rem;
}

.biba-gallery__item {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin: 0;
}

.biba-gallery__item a {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--stroke-controls);
  border-radius: var(--biba-radius);
  background-color: var(--base-tint);
  cursor: zoom-in;
  transition: transform var(--biba-transition),
    box-shadow var(--biba-transition), border-color var(--biba-transition);
}

.biba-gallery__item a:hover {
  transform: translateY(-0.5rem);
  border-color: var(--biba-accent);
  box-shadow: 0 1.6rem 3.4rem var(--biba-accent-soft);
}

.biba-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  /* `contain` keeps every pose whole — no pose is cropped to fit the tile. */
  object-fit: contain;
}

/* js/gallery-init.js reads `figure > children[1]` as the lightbox caption, and
   the bundled PhotoSwipe 4.1.3 UI paints that caption one slide ahead of the
   slide it is actually showing (verified: counter "1 / 8" displayed pose 2's
   text). Rather than mislabel the poses, each figure carries this empty element
   in the caption slot so the lightbox renders no caption; the real label
   follows it and stays visible on the page. */
.biba-gallery__pswp-guard {
  display: none;
}

.biba-gallery__item figcaption {
  font-size: 1.5rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
  color: var(--t-bright);
}

.biba-gallery__note {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.3rem;
  font-weight: var(--font-weight-base);
  line-height: 1.5;
  color: var(--t-medium);
}

/* --------------------------------------------------------------------------
   Usage cards
   -------------------------------------------------------------------------- */

.biba-uses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4rem;
}

.biba-uses__card {
  padding: 2.8rem;
  border: 1px solid var(--stroke-controls);
  border-radius: var(--biba-radius);
  background-color: var(--base-tint);
  transition: border-color var(--biba-transition),
    transform var(--biba-transition);
}

.biba-uses__card:hover {
  transform: translateY(-0.4rem);
  border-color: var(--biba-accent-line);
}

.biba-uses__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin-bottom: 2rem;
  border-radius: 50%;
  background-color: var(--biba-accent-soft);
  color: var(--biba-accent);
  font-size: 2.4rem;
}

.biba-uses__title {
  margin-bottom: 1rem;
  font-size: 1.9rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
  color: var(--t-bright);
}

.biba-uses__text {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--t-medium);
}

/* --------------------------------------------------------------------------
   Closing call to action
   -------------------------------------------------------------------------- */

.biba-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
  align-items: center;
  justify-content: space-between;
  padding: 3.6rem;
  border: 1px solid var(--stroke-controls);
  border-radius: var(--biba-radius-lg);
  background-color: var(--base-tint);
}

.biba-cta__body {
  flex: 1 1 34rem;
  min-width: 0;
}

.biba-cta__title {
  margin-bottom: 1rem;
  font-size: 2.2rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
  color: var(--t-bright);
}

.biba-cta__text {
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--t-medium);
}

.biba-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 1399.98px) {
  .biba-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 1199.98px) {
  .biba-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.4rem;
    margin-bottom: 5rem;
  }

  .biba-hero__media {
    max-width: 48rem;
  }

  .biba-uses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 991.98px) {
  .biba-section {
    margin-bottom: 5rem;
  }

  .biba-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .biba-facts__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }
}

@media only screen and (max-width: 767.98px) {
  .biba-uses {
    grid-template-columns: minmax(0, 1fr);
  }

  .biba-cta {
    padding: 2.6rem;
  }

  .biba-btn {
    width: 100%;
  }
}

@media only screen and (max-width: 575.98px) {
  .biba-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}
