
/* ============================================================
   BUILT WITH SECTION
   ============================================================ */

.bw-section {
  padding: 72px 40px;
}

.bw-section-title {
  margin-bottom: 40px;
  text-align: left;
}

.bw-two-col {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.bw-item {
  display: flex;
  flex-direction: column;
  gap: 16px;

  padding: 26px 28px;
  border-radius: 18px;

  position: relative;
  overflow: hidden;
  background-color: var(--dm-surface-container-low);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--dm-shadow-card);

  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Glossy 1px top-edge highlight — same treatment as the detail cards */
.bw-item::before {
  content: '';
  position: absolute;
  inset: 0;
  bottom: auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.90);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

.bw-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--dm-shadow-elevated);
}

.bw-item .my-body-large {
  text-align: left;
}

@media (prefers-color-scheme: dark) {
  .bw-item {
    border-color: rgba(255, 255, 255, 0.08);
  }

  .bw-item::before {
    background: rgba(255, 255, 255, 0.14);
  }
}

.bw-item__header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.bw-item__logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.30),
    0 4px 10px rgba(0,0,0,0.20),
    0 10px 24px rgba(0,0,0,0.16);
}

.bw-item__logo--rn       { background: #20232a; }
.bw-item__logo--expo     { background: #000020; }
.bw-item__logo--firebase { background: #1c2b4a; }
.bw-item__logo--libs {
  background: var(--dm-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bw-logo-icon {
  font-size: 44px !important;
  color: var(--dm-on-primary-container);
}

.bw-item__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
}

.bw-libs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bw-lib {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--dm-surface-container);
  color: var(--dm-on-surface-variant);
  border: 1px solid var(--dm-outline-variant);
  white-space: nowrap;
}

.bw-item__name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--dm-on-surface);
  margin: 0;
}

@media (max-width: 620px) {
  .bw-section {
    padding: 60px 24px;
  }

  .bw-two-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ── Built With animations ──────────────────────────────────────────────── */

.bw-section-title { opacity: 0; translate: 0 18px; }
.bw-item          { opacity: 0; translate: 0 18px; }
.bw-lib           { opacity: 0; translate: 0 10px; }

.bw-section.is-visible .bw-section-title {
  animation: dm-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1)   0ms both;
}
.bw-section.is-visible .bw-item:nth-child(1) {
  animation: dm-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 100ms both;
}
.bw-section.is-visible .bw-item:nth-child(2) {
  animation: dm-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
}
.bw-section.is-visible .bw-item:nth-child(3) {
  animation: dm-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}
.bw-section.is-visible .bw-item:nth-child(4) {
  animation: dm-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 400ms both;
}

.bw-section.is-visible .bw-lib:nth-child(1) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 480ms both;
}
.bw-section.is-visible .bw-lib:nth-child(2) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 530ms both;
}
.bw-section.is-visible .bw-lib:nth-child(3) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 580ms both;
}
.bw-section.is-visible .bw-lib:nth-child(4) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 630ms both;
}
.bw-section.is-visible .bw-lib:nth-child(5) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 680ms both;
}
.bw-section.is-visible .bw-lib:nth-child(6) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 730ms both;
}
.bw-section.is-visible .bw-lib:nth-child(7) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 780ms both;
}
.bw-section.is-visible .bw-lib:nth-child(8) {
  animation: dm-fade-up-sm 0.45s cubic-bezier(0.22, 1, 0.36, 1) 830ms both;
}


/* ================================================================
   PRESENTATION SECTION
   ================================================================ */

.pres-section {
  width: 100%;
  padding: 80px 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
}

.pres-title {
  text-align: center;
  margin-bottom: 0;
}

.pres-subtitle {
  text-align: center;
  max-width: 640px;
  margin-bottom: 24px;
}

.pres-embed-wrap {
  width: 90%;
  max-width: 990px;
  aspect-ratio: 16 / 9.8;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--dm-outline-variant);
  box-shadow: var(--dm-shadow-elevated), 0 30px 60px -20px rgba(0, 0, 0, 0.35);
  background: var(--dm-surface);
}

.pres-embed-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .pres-embed-wrap {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }
}

/* ================================================================
   SCREENSHOTS SECTION
   ================================================================ */

.sc-section {
  padding: 80px 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.sc-title {
  text-align: center;
  margin-bottom: 0;
}

/* ── Platform logo (swaps with a blur-replace effect) ────────── */

.sc-platform-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(96px, 12vw, 160px);
  height: clamp(96px, 12vw, 160px);
}

/* Positioning/crossfade lives on the wrapper, using only drop-shadow — Safari
   corrupts alpha PNGs (paints them opaque white) when blur() and drop-shadow()
   sit in the same filter list, so blur is isolated on the <img> below. */
.sc-platform-logo__item {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition:
    opacity 0.3s ease-out,
    transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  will-change: opacity, transform;
}

.sc-platform-logo__item--active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.sc-platform-logo__item--android {
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.18));
}

.sc-platform-logo__item--ios {
  filter:
    drop-shadow(0 8px 24px rgba(255, 255, 255, 0.20))
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

@media (prefers-color-scheme: light) {
  .sc-platform-logo__item--ios {
    filter:
      drop-shadow(0 0 1px rgba(100, 100, 120, 0.55))
      drop-shadow(0 0 1px rgba(100, 100, 120, 0.55))
      drop-shadow(0 0 1px rgba(100, 100, 120, 0.55))
      drop-shadow(0 6px 20px rgba(160, 120, 210, 0.30))
      drop-shadow(0 18px 44px rgba(120, 180, 220, 0.22));
  }
}

.sc-platform-logo__img {
  display: block;
  height: auto;
  filter: blur(16px);
  transition: filter 0.32s ease-out;
}

.sc-platform-logo__item--active .sc-platform-logo__img {
  filter: blur(0);
}

.sc-platform-logo__img--android {
  width: clamp(72px, 9vw, 120px);
}

.sc-platform-logo__img--ios {
  width: clamp(96px, 12vw, 160px);
}

@media (prefers-reduced-motion: reduce) {
  .sc-platform-logo__item {
    transition: opacity 0.2s ease-out;
    transform: translate(-50%, -50%) scale(1);
  }

  .sc-platform-logo__img {
    transition: none;
    filter: none;
  }
}

/* ── Selectors ─────────────────────────────────────────────── */

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

/* Icon font is loaded with variable axes (FILL etc.); keep every icon at its
   default axes even inside text that sets font-variation-settings, so nothing
   else on the page changes appearance. */
.material-symbols-outlined {
  font-variation-settings: normal;
}

.sc-selector-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--dm-surface-container-low);
  border: 1px solid var(--dm-outline-variant);
  box-shadow: var(--dm-shadow-card);
}

/* Sliding selection pill — positioned via JS (translateX + width) */
.sc-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--dm-primary-container);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.3, 1.25, 0.45, 1),
    width 0.5s cubic-bezier(0.3, 1.25, 0.45, 1),
    opacity 0.25s ease;
  will-change: transform, width;
}

.sc-selector-row--form .sc-indicator {
  background: var(--dm-secondary-container);
}

.sc-selector-row.sc-indicator-ready .sc-indicator {
  opacity: 1;
}

.sc-pill {
  position: relative;
  z-index: 1;
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--dm-on-surface-variant);
  font-family: 'Roboto Flex', 'Roboto', system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 500;
  font-variation-settings: 'wght' 500, 'opsz' 14;
  letter-spacing: 0.006rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s ease, background-color 0.25s ease, transform 0.2s ease;
}

.sc-pill .material-symbols-outlined {
  font-size: 16px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  transition: font-variation-settings 0.4s ease, transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.sc-pill ion-icon {
  display: inline-block;
  align-self: center;
  width: 16px;
  height: 16px;
  font-size: 16px;
  transition: transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.sc-pill--active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  transform: scale(1.08);
}

.sc-pill--active ion-icon {
  transform: scale(1.08);
}

.sc-pill--platform.sc-pill--active {
  color: var(--dm-on-primary-container);
}

.sc-pill--form.sc-pill--active {
  color: var(--dm-on-secondary-container);
}

.sc-pill:hover:not(.sc-pill--active) {
  background-color: var(--dm-surface-container);
  color: var(--dm-on-surface);
}

.sc-pill:active:not(.sc-pill--active) {
  transform: scale(0.95);
}

.sc-pill:focus-visible {
  outline: 2px solid var(--dm-primary);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .sc-pill {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    gap: 0.3rem;
  }
}

@media (max-width: 400px) {
  .sc-pill {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  .sc-pill .material-symbols-outlined {
    font-size: 14px;
  }

  .sc-pill ion-icon {
    width: 14px;
    height: 14px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-indicator,
  .sc-pill,
  .sc-pill .material-symbols-outlined,
  .sc-pill ion-icon {
    transition: none;
  }
}

/* ── Carousel ──────────────────────────────────────────────── */

.sc-carousel {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  justify-content: center;
}

.sc-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.2s ease-out,
    filter 0.2s ease-out,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sc-stage--swapping {
  opacity: 0;
  filter: blur(14px);
  transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
  .sc-stage {
    transition: opacity 0.15s ease-out;
  }

  .sc-stage--swapping {
    filter: none;
    transform: none;
  }
}

.sc-device {
  position: relative;
  width: min(280px, 38vw);
  overflow: visible;
  flex-shrink: 0;
}

.sc-device[data-platform="android"][data-form="phone"] {
  aspect-ratio: 771 / 1628;
}

.sc-device[data-platform="ios"][data-form="phone"] {
  aspect-ratio: 1470 / 3000;
}

.sc-slides {
  position: absolute;
  overflow: hidden;
}

.sc-device[data-platform="android"][data-form="phone"] .sc-slides {
  top: 1.61%;
  bottom: 2.07%;
  left: 4.05%;
  right: 4.51%;
  width: auto;
  height: auto;
  border-radius: 12.77% / 5.74%;
}

.sc-device[data-platform="ios"][data-form="phone"] .sc-slides {
  top: 2.2%;
  bottom: 2.2%;
  left: 5.1%;
  right: 5.1%;
  width: auto;
  height: auto;
  border-radius: 9%;
}

.sc-device[data-platform="android"][data-form="foldable"] {
  aspect-ratio: 1506 / 1552;
  width: min(555px, calc(100vw - 140px));
}

.sc-device[data-platform="android"][data-form="foldable"] .sc-slides {
  top: 2.74%;
  bottom: 2.74%;
  left: 2.99%;
  right: 2.92%;
  width: auto;
  height: auto;
  border-radius: 6% / 5.79%;
}

.sc-device[data-platform="android"][data-form="tablet"] {
  aspect-ratio: 1427 / 935;
  width: min(745px, calc(100vw - 140px));
}

.sc-device[data-platform="android"][data-form="tablet"] .sc-slides {
  top: 5.35%;
  bottom: 5.45%;
  left: 3.51%;
  right: 3.51%;
  width: auto;
  height: auto;
  border-radius: 1.43% / 2.28%;
}

.sc-device[data-platform="ios"][data-form="tablet"],
.sc-device[data-platform="ios"][data-form="windowed"] {
  aspect-ratio: 1500 / 1150;
  width: min(745px, calc(100vw - 140px));
}

.sc-device[data-platform="ios"][data-form="tablet"] .sc-slides,
.sc-device[data-platform="ios"][data-form="windowed"] .sc-slides {
  top: 5.13%;
  bottom: 5.17%;
  left: 4.13%;
  right: 4.17%;
  width: auto;
  height: auto;
  border-radius: 1.96% / 2.62%;
}

.sc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.35s ease;
}

.sc-slide--active {
  opacity: 1;
  z-index: 1;
}

.sc-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.sc-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
}

/* Placeholder */
.sc-placeholder {
  width: min(280px, 38vw);
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 2px dashed var(--dm-outline-variant);
  border-radius: 24px;
  color: var(--dm-on-surface-variant);
  background: var(--dm-surface-container-lowest);
}

.sc-placeholder .material-symbols-outlined {
  font-size: 2.5rem;
  opacity: 0.5;
}

.sc-placeholder__text {
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Roboto Flex', 'Roboto', system-ui, sans-serif;
  opacity: 0.6;
  text-align: center;
}

/* Arrow buttons */
.sc-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--dm-outline-variant);
  background: transparent;
  color: var(--dm-on-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.sc-arrow:hover:not(:disabled) {
  background-color: var(--dm-surface-container);
}

.sc-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.sc-arrow .material-symbols-outlined {
  font-size: 1.25rem;
}

/* Dot indicators */
.sc-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 16px;
}

.sc-dot {
  height: 8px;
  width: 8px;
  border-radius: 4px;
  border: none;
  padding: 0;
  background: var(--dm-outline-variant);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.sc-dot--active {
  width: 22px;
  background: var(--dm-primary);
}

@media (max-width: 480px) {
  .sc-carousel { gap: 12px; }

  .sc-arrow {
    width: 36px;
    height: 36px;
  }

  .sc-device,
  .sc-placeholder {
    width: min(220px, calc(100vw - 120px));
  }
}
