/* Feature rows: alternating copy + product visual, spread down an app page.
   Each image sits beside the copy it proves. Reuses the shared screenshot frame,
   hover tilt, glint and lightbox from css/shots.css + js/shots.js (load both).
   Usage and markup: docs/feature-rows.md.

   .fr-section            one row (or a few) as its own page section
   .fr                    the two-column row
   .fr--image-right       copy left, image right
   .fr--image-left        image left, copy right
   .fr-copy / .fr-media   the two columns (.fr-media is also .shot[data-shot])
   .fr-hero-shot          compact real product visual for the first screen
   .fr-hero-band          wrapper that places .fr-hero-shot directly under a hero

   Selectors are two classes deep on purpose: the Atlas build re-injects
   shots.css just before </head>, so this file must win without load order. */

/* ------------------------------------------------------------------ section */
.fr-section { padding: clamp(56px, 8vw, 112px) 0; overflow-x: clip; }
.fr-section.fr-section--tight { padding: clamp(40px, 5.5vw, 72px) 0; }
.fr-section + .fr-section { padding-top: 0; }

/* --------------------------------------------------------------------- row */
.fr {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "copy media";
  align-items: center;
  gap: clamp(32px, 5vw, 88px);
  min-width: 0;
}
.fr.fr--image-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "media copy"; }
.fr + .fr { margin-top: clamp(72px, 10vw, 144px); }

.fr .fr-copy { grid-area: copy; min-width: 0; max-width: 520px; }
.fr.fr--image-left .fr-copy { justify-self: end; }
.fr .fr-media { grid-area: media; min-width: 0; margin: 0; }

/* Copy. Page stylesheets style bare h2/h3/p, so every rule here is scoped. */
.fr .fr-copy .eyebrow { margin-bottom: 16px; }
.fr .fr-title {
  max-width: 18ch;
  margin: 0 0 18px;
  color: var(--ink, #050505);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}
.fr .fr-text {
  max-width: 46ch;
  margin: 0;
  color: var(--muted, #64645f);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  text-wrap: pretty;
}
.fr .fr-text + .fr-text { margin-top: 12px; }
.fr .fr-points { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.fr .fr-points li {
  position: relative;
  padding-left: 22px;
  color: var(--ink, #050505);
  font-size: 16px;
  line-height: 1.5;
}
.fr .fr-points li::before {
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--coral, #ff6f61);
}
.fr .fr-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  color: var(--ink, #050505);
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: border-color 160ms ease;
}
.fr .fr-link:hover { border-bottom-color: transparent; }
.fr .fr-link:focus-visible { outline: 3px solid var(--explore-lilac-border, #6f4bd8); outline-offset: 4px; border-radius: 2px; }

/* Visual. The frame, chrome, tilt and glint come from shots.css; this adds the
   larger stage, a soft tinted plate behind the frame, and a deeper shadow. */
.fr .fr-media { position: relative; isolation: isolate; }
.fr .fr-media::before {
  position: absolute;
  z-index: -1;
  inset: 9% -4% -7% 6%;
  content: "";
  border-radius: 28px;
  background: var(--fr-plate, var(--lilac, #c5b0f4));
  opacity: 0.42;
  transform: rotate(-1.4deg);
}
.fr.fr--image-left .fr-media::before { inset: 9% 6% -7% -4%; transform: rotate(1.4deg); }
.fr .fr-media .shot-frame {
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(31, 29, 61, 0.06), 0 30px 64px -30px rgba(31, 29, 61, 0.42);
}

/* Plate colour helpers (optional): add to .fr or .fr-hero-shot. */
.fr-plate-lilac { --fr-plate: var(--lilac, #c5b0f4); }
.fr-plate-mint { --fr-plate: var(--mint, #c8e6cd); }
.fr-plate-peach { --fr-plate: var(--peach, #f3c9b6); }
.fr-plate-lime { --fr-plate: var(--lime, #dceeb1); }
.fr-plate-cream { --fr-plate: var(--cream, #f4ecd6); }
.fr-plate-none { --fr-plate: transparent; }

/* ------------------------------------------------------------- hero visual */
/* A. Inside an existing two-column hero: replace the illustrative right-hand
      element with figure.fr-hero-shot. Neutralises the hero grid's visual offset. */
.fr-hero-shot.shot { position: relative; isolation: isolate; width: 100%; max-width: 760px; margin: 0; align-self: center; justify-self: end; }
:is([class*="hero-grid"], [class*="hero-inner"]) > .fr-hero-shot.shot { margin-top: 0; min-height: 0; }
.fr-hero-shot.shot::before {
  position: absolute;
  z-index: -1;
  inset: 28px -12px calc(-18px + var(--fr-label-space, 0px)) 28px;
  content: "";
  border-radius: 28px;
  background: var(--fr-plate, var(--lilac, #c5b0f4));
  opacity: 0.5;
  transform: rotate(-1.6deg);
}
.fr-hero-shot.shot .shot-frame {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(31, 29, 61, 0.06), 0 34px 72px -30px rgba(31, 29, 61, 0.46);
}
/* Keep the plate behind the frame, not behind the optional label. */
.fr-hero-shot.shot:has(.fr-hero-label) { --fr-label-space: 30px; }
.fr-hero-shot .fr-hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted, #64645f);
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  font-weight: 560;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}
.fr-hero-shot .fr-hero-label::before {
  width: 7px; height: 7px; flex: none; content: ""; border-radius: 50%; background: var(--green, #1f9d55);
}

/* B. Directly under a hero, as its own compact band. */
.fr-hero-band { position: relative; z-index: 1; padding: clamp(28px, 4vw, 48px) 0 clamp(40px, 6vw, 80px); overflow-x: clip; }
.fr-hero-band .fr-hero-shot.shot { max-width: 1120px; margin-inline: auto; justify-self: center; }
.fr-hero-band .fr-hero-shot.shot::before { inset: 40px -20px calc(-22px + var(--fr-label-space, 0px)) 36px; transform: rotate(-0.8deg); }
.fr-hero-band .fr-hero-label { justify-content: center; }
/* Pull the band up into the hero's bottom padding so it reads as part of the first screen. */
.fr-hero-band.fr-hero-band--overlap { margin-top: calc(-1 * clamp(24px, 4vw, 64px)); padding-top: 0; }

/* C. Image collection directly below a hero video (docs/video-cards.md,
      "Hero video"). One large main shot plus two supporting shots, all in one
      lightbox group. Markup: section.fr-collection-section > .fr-collection-head
      + .fr-collection > figure.shot.fr-collection-main + 2 × figure.shot. */
.fr-collection-section { padding: clamp(56px, 7vw, 104px) 0; border-bottom: 1px solid var(--line, #e7e7e2); background: var(--soft, #f7f7f3); overflow-x: clip; }
.fr-collection-head { max-width: 720px; margin: 0 0 clamp(32px, 4vw, 56px); }
.fr-collection-head .eyebrow { margin-bottom: 16px; }
.fr-collection-head .fr-collection-title {
  max-width: 20ch; margin: 0 0 16px;
  color: var(--ink, #050505); font-size: clamp(30px, 3.5vw, 48px); font-weight: 620;
  letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance;
}
.fr-collection-head .fr-collection-text {
  max-width: 52ch; margin: 0;
  color: var(--muted, #64645f); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; text-wrap: pretty;
}
.fr-collection {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr);
  align-items: start; gap: clamp(20px, 2.4vw, 32px); min-width: 0;
}
.fr-collection::before {
  position: absolute; z-index: -1; inset: 8% -2% -5% 4%; content: "";
  border-radius: 32px; background: var(--fr-plate, var(--lilac, #c5b0f4)); opacity: 0.38; transform: rotate(-0.8deg);
}
.fr-collection > .shot { min-width: 0; margin: 0; }
.fr-collection > .fr-collection-main { grid-row: 1 / span 2; }
.fr-collection .shot-frame {
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(31, 29, 61, 0.06), 0 26px 56px -30px rgba(31, 29, 61, 0.42);
}
.fr-collection .fr-collection-main .shot-frame { border-radius: 20px; box-shadow: 0 1px 2px rgba(31, 29, 61, 0.06), 0 34px 72px -30px rgba(31, 29, 61, 0.46); }
.fr-collection .fr-collection-label {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 0;
  color: var(--muted, #64645f); font-family: "Geist Mono", monospace; font-size: 11.5px; font-weight: 560;
  letter-spacing: 0.12em; line-height: 1.3; text-transform: uppercase;
}
.fr-collection .fr-collection-label a { color: inherit; text-decoration: none; }
.fr-collection .fr-collection-label a:hover, .fr-collection .fr-collection-label a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.fr-collection .fr-collection-label::before { width: 7px; height: 7px; flex: none; content: ""; border-radius: 50%; background: var(--green, #1f9d55); }
/* A former hero visual that is not a screenshot (an illustration or a link panel)
   keeps its place in the collection section, centred below the three shots. */
.fr-collection-aside { max-width: 760px; margin: clamp(40px, 5vw, 64px) auto 0; }

@media (max-width: 767.98px) {
  .fr-collection { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 16px; }
  .fr-collection > .fr-collection-main { grid-row: auto; grid-column: 1 / -1; }
  .fr-collection::before { inset: 16px -8px -12px 8px; border-radius: 18px; transform: none; }
  .fr-collection .shot-frame, .fr-collection .fr-collection-main .shot-frame { border-radius: 12px; }
  .fr-collection .fr-collection-label { font-size: 10.5px; letter-spacing: 0.1em; }
}
@media (max-width: 479.98px) {
  .fr-collection { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ tablet */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .fr, .fr.fr--image-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .fr .fr-title { font-size: clamp(28px, 3.6vw, 36px); }
  .fr .fr-text { font-size: 16.5px; }
}

/* ------------------------------------------------------------------ mobile */
/* Stack image first, then copy, whichever side the image sat on. */
@media (max-width: 767.98px) {
  .fr, .fr.fr--image-left { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "copy"; gap: 26px; }
  .fr + .fr { margin-top: 64px; }
  .fr .fr-copy, .fr.fr--image-left .fr-copy { max-width: none; justify-self: stretch; }
  .fr .fr-title { max-width: none; font-size: clamp(26px, 7.4vw, 34px); }
  .fr .fr-text { font-size: 16.5px; }
  .fr .fr-media::before, .fr.fr--image-left .fr-media::before,
  .fr-hero-shot.shot::before, .fr-hero-band .fr-hero-shot.shot::before { inset: 16px -8px calc(-12px + var(--fr-label-space, 0px)) 8px; border-radius: 18px; transform: none; }
  .fr .fr-media .shot-frame, .fr-hero-shot.shot .shot-frame { border-radius: 14px; }
  .fr-hero-shot.shot { max-width: none; justify-self: stretch; }
  .fr-hero-band.fr-hero-band--overlap { margin-top: 0; padding-top: 8px; }
}

/* --------------------------------------------------------- reduced motion */
/* shots.css already removes tilt, glint and cursor light; keep plates still too. */
@media (prefers-reduced-motion: reduce) {
  .fr .fr-link { transition: none; }
}
