/* Custom overrides - kept separate from Bootstrap Studio's generated styles.min.css
   so this survives even if that file gets regenerated.

   The .phone/.screen mockup component (from bootstrap.min.css) draws two extra
   layers on top of whatever image you put in it: a glossy white-to-transparent
   highlight, and a fake notch/speaker pill at the top. Both were designed for
   blank device mockups - since every screenshot we use already has the real
   phone status bar baked in, we turn both off here. */
.screen:before,
.screen:after {
  content: none;
}

/* Tour page "ghost" graphic - a large, faded, slightly tilted echo of that row's own
   phone screen (pre-rendered to a small jpg per image, see assets/img/projects/glow/),
   sitting in the TEXT column below the paragraph to fill the blank space next to the
   phone - not behind the phone itself, which already fills its own column. Image is
   set per-row via the --glow-bg custom property. It's a normal block in the document
   flow (not absolutely positioned), so it never overlaps the heading/paragraph above
   it or bleeds into neighbouring rows. */
.tour-ghost {
  width: min(75%, 380px);
  aspect-ratio: 900 / 1400;
  margin-top: 1.75rem;
  background-image: var(--glow-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
  transform: rotate(-6deg);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0) 78%);
  mask-image: radial-gradient(circle, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0) 78%);
  pointer-events: none;
}
@media (max-width: 767.98px) {
  .tour-ghost {
    display: none; /* keep the mobile layout clean - phones stack under text there anyway */
  }
}

/* Real bezel/frame around the phone mockup. With --phone-rotate-x/y left at
   0deg (used everywhere on this site for a flat, non-3D look) the
   component's built-in 3D .side panels collapse edge-on and are invisible -
   so without this, .screen (which is the same size as .phone) just showed
   the bare screenshot with rounded corners and no device frame at all.
   Fix: recolour the existing .back layer to a dark chassis colour and inset
   .screen inside it, so .back shows through as a bezel margin. The notch
   and home-indicator live only in that margin, so they never overlap the
   screenshot's own status bar. */
.phone-wrapper {
  /* Two earlier attempts at responsive sizing both used the aspect-ratio
     property - once directly on .phone (a flex item: broke on real
     Safari, frame overflowed its column instead of shrinking), then
     moved to .phone-wrapper (still broke: a real, long-standing WebKit
     bug - aspect-ratio on a flex item's sizing can come out wrong,
     webkit.org bug 265243, only patched May 2026, so plenty of iPhones
     won't have the fix yet). Dropping aspect-ratio entirely this time
     for the old padding-percent trick below: percentage padding is
     always resolved against the containing block's WIDTH, even for
     top/bottom padding, which is what turns "padding-top: 205%" into
     "make this box 205% as tall as it is wide". It's decades-old and
     has never had a cross-browser inconsistency.
     display:block overrides bootstrap.min.css's own flex/align-items on
     .phone-wrapper - not needed any more since .phone is positioned to
     fill this element directly rather than being flex-centred inside it.
     --phone-width/--phone-height are duplicated onto this element's
     inline style (see index.html/tour.html) so max-width below can read
     the right value per instance. */
  display: block;
  position: relative;
  width: 100%;
  max-width: var(--phone-width);
  margin: 0 auto;
}
.phone-wrapper:before {
  content: "";
  display: block;
  padding-top: 205.34%; /* 1 / 0.487 - see aspect-ratio comment above for
                            where 0.487 comes from */
}
.phone {
  --phone-side-bg-light: #202327;
  --phone-side-bg-dark: #0a0b0d;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.phone .screen {
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  width: auto;
  height: auto;
  border-radius: calc(var(--phone-border-radius) - 8px);
}
/* .back (the chassis colour showing through as the bezel) sizes itself
   from the literal --phone-width/--phone-height px values, same as
   .screen used to before the override above - but .phone itself now
   renders smaller than that on a narrow column, so .back kept rendering
   at the old full literal size and stuck out from behind the frame as a
   visible grey box. Same fix as .screen: match .phone's actual size
   instead of the unshrunk design size. */
.phone .back {
  width: 100%;
  height: 100%;
}
.phone:before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  max-width: 70px;
  height: 6px;
  background: #000;
  border-radius: 4px;
  z-index: 2;
}
.phone:after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  max-width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  z-index: 2;
}

/* Self-hosted preview video, shown inside the same phone mockup component.
   Fills the (now inset) screen exactly like a screenshot <img> does. */
.screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.js-autoplay-video-wrapper {
  cursor: pointer;
}
.video-play-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 3;
}
.js-autoplay-video-wrapper.is-playing .video-play-hint {
  opacity: 0;
}

/* Auto-rotating promo banner (homepage only) - a single landscape slot that
   cycles between clickable images every few seconds. Each slide is a full
   background-image link stacked on top of the others; custom.js toggles
   which one has the .active class, and this transition just fades between
   them so it never jumps. */
.promo-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 360;
  border-radius: var(--bs-border-radius, 1.15rem);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}
.promo-banner-slide {
  position: absolute;
  inset: 0;
  display: block;
  background-size: cover;
  background-position: center;
  opacity: 0;
  /* Only the visible (.active) slide should be clickable/hoverable - without this,
     whichever slide sits later in the HTML always catches the mouse, no matter which
     one is actually faded in, since they're stacked exactly on top of each other. */
  pointer-events: none;
  transition: opacity 1s ease;
}
.promo-banner-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.promo-banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.promo-banner-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.3s ease;
}
.promo-banner-dots span.active {
  background: #fff;
}
