/* ==========================================================================
   WEBSITES page — page-specific layout only. Everything else (hero, rows,
   steps, chapters, case-study, CTA) comes from secondary.css / cards.css /
   cta-footer.css. This file just tunes the front-facing laptop composition
   and a couple of local grids that don't belong in the shared toolkit.
   ========================================================================== */

/* Front-facing laptop presentation block */
.laptop-showcase {
  display: flex;
  justify-content: center;
  margin-top: clamp(48px, 6vw, 88px);
}
.laptop-showcase__frame {
  position: relative;
  width: min(760px, 100%);
}
.laptop-showcase__frame img.laptop-showcase__device {
  width: 100%;
  height: auto;
  display: block;
}
/* Screen inset % measured against Labtop.svg's own screen rectangle (not
   eyeballed) — shows the live Friseur hero (hero-fragments/friseur.html)
   inside the laptop screen, same iframe technique as the homepage hero
   timeline, never touching the Hero's own markup/CSS/JS. */
.laptop-showcase__screen {
  position: absolute;
  left: 11.45%;
  right: 11.45%;
  top: 4.68%;
  bottom: 15.68%;
  overflow: hidden;
  border-radius: 3px;
  background: #050606;
}
/* The iframe is always rendered at a fixed desktop width (see js below)
   so the Hero's own @media(max-width:900px) mobile breakpoint never
   triggers just because this preview box happens to be small — then
   scaled down visually with a CSS transform to fit the laptop screen. */
.laptop-showcase__iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  overflow: hidden;
  pointer-events: none;
  transform-origin: top left;
}


/* The mockup image IS the card — the card's own box is sized to the
   image's exact aspect ratio (2143:941), so the photo fills the card edge
   to edge with no letterboxing gap, then the chapter text sits directly on
   top of it, right-aligned. dh-card--media's built-in ::after gradient
   (tokens.css) adds the bottom-up darkening that keeps text legible. */
.websites-story-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  aspect-ratio: 2143 / 941;
  padding: 60px;
  margin-top: clamp(40px, 5vw, 64px);
}

.websites-story-card .websites-story-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.websites-story-card__text {
  position: relative;
  z-index: 1;
  max-width: 40%;
}

/* Text sits on the LEFT here — unlike the other overlay cards, this
   mockup's actual negative space (plain brushed-metal background) is on
   the left, with the laptop/tablet/phone cluster on the right. Only a
   light touch is needed against the soft spotlight highlight up there. */
.websites-story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,6,6,.45) 0%, rgba(5,6,6,.22) 24%, transparent 48%);
  pointer-events: none;
}

.websites-story-card__text .chapter {
  padding: 16px 0;
}

.websites-story-card__text .chapter:first-child {
  border-top: none;
  padding-top: 0;
}

/* Mobile: drop the photo entirely (doesn't fit a narrow column readably)
   and fall back to a plain dark-titanium surface (same noise+gradient
   recipe as .dh-card--surface in cards.css) with just the text — same
   rule the other horizontal media cards site-wide follow (#work-example,
   .bms-foundation-card/.bms-growth-card, .case-study--bg). */
@media (max-width: 900px) {
  .websites-story-card {
    aspect-ratio: auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    padding: 28px;
    background-color: var(--dh-card-bg-mid);
    background-image:
      url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.12'/%3E%3C/svg%3E"),
      linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 24%),
      radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.02) 0%, transparent 40%),
      linear-gradient(145deg, var(--dh-card-bg-start) 0%, var(--dh-card-bg-mid) 47%, var(--dh-card-bg-end) 100%);
  }

  .websites-story-card .websites-story-card__img {
    display: none;
  }

  .websites-story-card__text {
    max-width: none;
    width: 100%;
  }
}
