/* ----------------------------------------
   COMPONENT LIBRARY WRAPPER
---------------------------------------- */

.componentsBody {
  padding: 0px 40px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ----------------------------------------
   BENTO GRID (12-COL)
---------------------------------------- */

/* 3-column bento block inside the 12-col project grid */
.project-bento {
  grid-column: span 12;

  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px; /* matches your main grid gap */
  row-gap: 24px;
}

/* ----------------------------------------
   GRID SPANS / LAYOUT ITEMS
---------------------------------------- */

/* Large left card: spans 6 columns */
.bento-card--large {
  grid-column: span 6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.bento-card--large .phone-mockup {
  flex: 0 0 auto; /* Stops the phone from aggressively expanding horizontally */
  width: auto; /* Clears your base min() width constraints */
  height: 100%; /* Forces the phone to fill the vertical space instead */
  max-height: 95%; /* Optional: Add this if you want a tiny bit of breathing room top and bottom */
}

#problemBlock > .bento-column {
  grid-column: span 3;
}

/* Right side columns: each spans 3 columns and stacks 2 cards */
.bento-column {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 2-up column variant */
.bento-column--half {
  grid-column: span 6;
}

/* ----------------------------------------
   BASE CARD (SURFACE ONLY)
   - No geometry here. Geometry is opt-in via modifiers below.
---------------------------------------- */

.bento-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--frame-bg);
}

/* ----------------------------------------
   CARD GEOMETRY (OPT-IN)
---------------------------------------- */

/* Square tile (replaces old default on .bento-card) */
.bento-card--square {
  aspect-ratio: 1 / 1;
}

/* Portrait tile */
.bento-portrait {
  aspect-ratio: 2 / 3;
  grid-column: span 4;
}

.bento-portrait-about {
  padding: 72px 56px !important;
  grid-column: span 6;
  min-height: 580px;
  background-color: #111111 !important;
}

.bento-portrait-about-image {
  height: 100%;
  grid-column: span 3;
}

.bento-portrait-about-image-wide {
  grid-column: span 6;
  height: 580px;
}

/* Full width tile */
.bento-full {
  grid-column: span 12;
  aspect-ratio: 16 / 9;
  aspect-ratio: auto; /* kept exactly as you had it */
}

/* Wide tile */
.bento-wide {
  grid-column: span 9;
  aspect-ratio: auto;
}

/* Content-driven card (fluid height) */
.bento-card--content {
  padding: 56px 40px 48px 40px;
  aspect-ratio: auto;
  height: auto;
  gap: 32px;
}

/* ----------------------------------------
   TEXT CARD VARIANTS
---------------------------------------- */

.bento-card--text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 24px;
}

.bento-card--text-quote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.bento-portrait--text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 32px 48px 32px 32px;
}

.bento-portrait--textimage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 56px 40px 48px 40px;
  aspect-ratio: auto;
  height: auto;
}

.bento-portrait--textimage > img {
  border-radius: 16px;
}

/* Inner text layout */
.bento-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Optional title + body */
.bento-title {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: #000;
}

.bento-body {
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* If you leave title or body blank, hide the empty element */
.bento-title:empty,
.bento-body:empty {
  display: none;
}

/* ----------------------------------------
   IMAGE BEHAVIOUR INSIDE CARDS
---------------------------------------- */

.bento-card > img:not(.phone-frame):not(.phone-screen) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ----------------------------------------
   CENTERED FULL-WIDTH BLOCK
---------------------------------------- */

.bento-block {
  grid-column: 1 / -1;
  background: var(--frame-bg);
  border-radius: 24px;

  /* min-height: 60vh; */
  padding: 64px;

  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Centered variant */
.bento-block--centered {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.bento-block--centered-horizontal {
  display: flex;
  flex-direction: row;
  padding: 0px 80px 0px 80px;
}

/* Demo items (replace later) */
.bento-block-item {
  display: flex;
  align-items: center; /* vertical center */
  justify-content: center; /* horizontal center */
  gap: 40px;
  width: 100%;

  /* flex-wrap: wrap; */
}

/* ----------------------------------------
   PHONE MOCKUP (BASE)
---------------------------------------- */

.phone-mockup {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  aspect-ratio: 9 / 19.5;
  width: min(40vw, 240px);
  max-width: 100%;
  display: block; /* Changed from flex */
}

/* Small */
.phone-mockup--s {
  width: min(16vw, 180px);
}

/* Small-medium (your most used one) */
.phone-mockup--sm {
  width: 100%;
}

/* Medium */
.phone-mockup--m {
  width: min(20vw, 240px);
}

/* Screen image (behind frame) */
.phone-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 95%;
  height: auto;

  aspect-ratio: 9 / 19.5;
  object-fit: cover;

  border-radius: 12%;
  z-index: 1;

  transition: opacity 0.35s ease;
}

.phone-screen--before,
.phone-screen--after {
  opacity: 0;
}

.phone-screen--after.is-visible,
.phone-screen--before.is-visible {
  opacity: 1;
}

.phone-screen.is-visible {
  opacity: 1;
}

/* Phone frame overlay */
.phone-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keeps frame proportional */
  z-index: 2;
  pointer-events: none;
}

/* ----------------------------------------
   BEFORE / AFTER TOGGLE
---------------------------------------- */

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

#hidden-toggle {
  opacity: 0;
}

.segmented-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 4px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.seg-btn.is-active {
  background: white;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* logging video */
.logging-video-wrapper {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logging-video {
  width: 100%;
  border-radius: 24px;
}

.acu-browser-media {
  display: flex;
  flex-direction: column;
  gap: -1px;

  width: 90%;
  margin: 80px auto;

  border-radius: 8px;
  overflow: hidden;

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

.acu-browser-bar {
  width: 100%;
  display: block;
}

.acu-browser-video {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ----------------------------------------
   2-UP PHONE FEATURE HELPERS
---------------------------------------- */

/* Phone row inside text card */
.bento-phone-row {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Ensure they align at the top */
  gap: 32px;
  width: 100%;
  height: auto;
  min-height: min-content; /* Critical: forces the row to respect the phone's height */
}

/* Alignment helpers inside text cards */
.bento-text-center {
  text-align: center;
}

.bento-text-left {
  text-align: left;
}

.bento-text-full {
  width: 100%;
}

/* ----------------------------------------
   WIDE PHONE STRIP (replaces .bento-wide image)
---------------------------------------- */

.bento-wide--phones {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}

.bento-wide--phones .bento-phone-row {
  justify-content: center;
}

/* If you want phones to shrink instead of overflow on smaller widths */
.bento-wide--phones .phone-mockup {
  flex: 0 1 auto;
}

/* =========================
   Bento carousel
========================= */

.bento-carousel {
  position: relative;
  overflow: hidden;
}

/* Wide carousel should be a wide media tile */
.bento-card.bento-wide.bento-carousel {
  aspect-ratio: 5 / 3.29;
  align-self: start; /* don’t stretch to match a taller column */
}

.bento-card.bento-full.bento-carousel {
  aspect-ratio: 5 / 3.29;
}

/* Track/slides fill the card */
.bento-card.bento-carousel .bento-carousel-track,
.bento-card.bento-carousel .bento-carousel-slide {
  height: 100%;
}

.bento-carousel.is-left {
  cursor:
    url("/assets/icons/cursor-arrow-left.svg") 12 12,
    auto;
}

.bento-carousel.is-right {
  cursor:
    url("/assets/icons/cursor-arrow-right.svg") 12 12,
    auto;
}

.bento-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
}

.bento-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
}

.bento-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*
/* Pagination container */
.bento-carousel-pagination {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);

  display: flex;
  gap: 8px;

  padding: 4px 8px;
  border-radius: 999px;
  background: var(--page-bg);
}

.phone-compare {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.phone-label {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.marley-star {
  width: 48px !important;
  height: 48px !important;
}

/* Dots */
.bento-carousel-pagination .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text);
  opacity: 0.2;
  transition: opacity 0.4s ease;
  border: none;
  padding: 0;
  cursor: pointer;
}

.bento-carousel-pagination .dot.is-active {
  opacity: 1;
}

.bento-card--fill {
  height: 100%;
}

.bento-brand-showcase {
  grid-column: 1 / -1;
  background: var(--frame-bg);
  border-radius: 24px;
  padding: 64px 40px 88px 40px;

  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.brand-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand-phones {
  display: flex;
  gap: 24px;
  width: 100%;
}

.brand-phones .phone-mockup {
  flex: 1;
  max-width: 180px; /* caps size on large screens */
  width: 100%;
}

.bento-centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------------------------
   RESPONSIVE: COLLAPSE NICELY ON SMALLER SCREENS
---------------------------------------- */

@media (max-width: 900px) {
  .project-one-liner .h1 {
    font-size: 28px;
  }

  .project-bento {
    grid-template-columns: 1fr;
  }

  .project-bento > *,
  .bento-card--large,
  .bento-column,
  .bento-column--half {
    grid-column: 1 / -1 !important;
  }

  .bento-card--square {
    aspect-ratio: auto;
    height: auto;
  }

  .bento-column {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .bento-column .bento-card {
    flex: 1 1 100%;
  }

  .bento-block-item {
    flex-wrap: wrap;
  }
  .bento-portrait-about {
    padding: 40px 32px !important;
    min-height: auto;
    background-color: #111111 !important;
    gap: 16px;
  }
}
