/* FreeBuiltWebs — "Make a good first impression" corridor showcase.
 * Two rails of example-site cards fly from the vanishing point toward the
 * viewer (vanilla port of the 21st.dev image-stream-hero). Cards are built
 * by /showcase.js. Every card length is in cqw so the corridor keeps its
 * proportions at any width. */

.fx {
  position: relative;
  overflow: hidden;
  background: var(--tint);
  height: clamp(660px, 62vw, 880px);
  --fx-stage-bottom: 90px;
  /* keep the flying cards inside the section: some mobile browsers do not clip
   * 3D-transformed children with overflow alone, which widens the page */
  contain: paint;
}

/* the corridor layer (a container, so cards size off its width) */
.fx__stage {
  position: absolute;
  top: 0;
  bottom: var(--fx-stage-bottom, 0px);
  left: 50%;
  width: var(--fx-stage, 100%);
  transform: translateX(-50%);
  container-type: inline-size;
  pointer-events: none;
}
.fx__persp { position: absolute; inset: 0; }
.fx__rail { position: absolute; inset: 0; transform-style: preserve-3d; }

/* soft wash so the copy always reads over the moving cards */
.fx__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(44% 30% at 50% 13%, var(--tint) 32%, rgba(238, 241, 250, 0) 100%),
    radial-gradient(42% 24% at 50% 91%, var(--tint) 38%, rgba(238, 241, 250, 0) 100%),
    linear-gradient(180deg, var(--tint) 0%, rgba(238, 241, 250, 0) 11%, rgba(238, 241, 250, 0) 85%, var(--tint) 100%);
}

.fx__copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding-top: 96px;
  padding-bottom: 64px;
}
.fx__copy .eyebrow { margin-bottom: 16px; }
.fx__title span { color: var(--blue); }
.fx__bottom { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.fx .checks {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
/* (no backdrop-filter here: the pills sit over the moving cards, so a live
 * blur would have to be redrawn every frame, and Safari paints it unreliably
 * over 3D-transformed content; a near-solid white reads the same) */
.fx .checks li {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px 8px 12px;
  font-size: 14.5px;
  box-shadow: 0 1px 2px rgba(21, 32, 59, 0.05);
}
.fx__lede { font-size: 16px; max-width: 46ch; }
.fx__note { font-size: 12px; color: var(--muted); }

/* ══════════════════════════════════════════════════════════════════════
 * Cards. Each card is a fictional example website shown in a browser
 * window. 1em = 1/60 of the card width, so everything inside scales with
 * it. Five layouts (cinematic, split, bold, editorial, local), each site
 * sets its own palette through custom properties:
 *   --bg page  --ink text  --mut muted text  --ac accent  --on text on accent
 *   --soft accent tint  --hf headline font  --hls headline tracking
 * ════════════════════════════════════════════════════════════════════ */
.fx-card {
  position: absolute;
  left: 50%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.3em;
  box-shadow: 0 1px 2px rgba(21, 32, 59, 0.06), 0 2.4em 5em -2.2em rgba(21, 32, 59, 0.45);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}
.fx.is-paused .fx-card { animation-play-state: paused; }
.fx-card p { margin: 0; }
.fx-card svg { display: block; flex: none; }

.fx-card__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5em;
  height: 2.6em;
  padding: 0 1.1em;
  background: #f7f8fc;
  border-bottom: 1px solid var(--line-2);
  flex: none;
}
.fx-card__bar i { width: 0.72em; height: 0.72em; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
/* window controls, as on a desktop browser: close, minimize, full screen */
.fx-card__bar i:nth-child(1) { background: #ff5f57; }
.fx-card__bar i:nth-child(2) { background: #febc2e; }
.fx-card__bar i:nth-child(3) { background: #28c840; }
/* address bar: a Safari-style pill with a lock and the business name */
.fx-card__url {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-width: 42%;
  height: 1.75em;
  padding: 0 1.2em;
  border-radius: 0.55em;
  background: #eaedf3;
  color: #4a5468;
  font: 500 0.84em/1 var(--body);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.fx-card__url svg { width: 1em; height: 1em; color: #8a93a6; }

.fx-site {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg, #fff);
  color: var(--ink, #15203b);
  font-family: var(--body);
  line-height: 1.3;
}
.fx-img { position: relative; overflow: hidden; background: var(--soft, #e8ebf2); }
.fx-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* logos */
.fx-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font: 800 1.45em/1 "Manrope", var(--body);
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.fx-logo svg { width: 1.05em; height: 1.05em; color: var(--ac); }
.fx-logo--tile svg { width: 1.45em; height: 1.45em; padding: 0.24em; border-radius: 0.34em; background: var(--ac); color: var(--on); }
.fx-logo--caps { font: 600 1.3em/1 "Oswald", var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.fx-logo--serif { font: 500 1.7em/1 "Fraunces", var(--serif); letter-spacing: -0.02em; }
.fx-logo--news { font: 500 1.75em/1 var(--serif); letter-spacing: -0.02em; }
.fx-logo--light { font: 600 1.55em/1 var(--body); letter-spacing: -0.03em; }

/* shared bits */
.fx-links { display: flex; gap: 1.9em; font-size: 0.8em; font-weight: 600; color: var(--mut); white-space: nowrap; }
.fx-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--ac);
  color: var(--on);
  font: 700 0.82em/1 var(--body);
  padding: 1em 1.45em;
  border-radius: 0.55em;
  white-space: nowrap;
}
.fx-btn--pill { border-radius: 99em; padding: 0.8em 1.25em; font-size: 0.78em; }
.fx-btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.fx-stars { color: #f5a524; letter-spacing: 0.06em; }
.fx-eyebrow { font: 700 0.7em/1.2 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ac); }

/* ── 1. Cinematic: full-bleed photo, dark overlay, serif (Evergreen) ── */
.l-cin { background: #fff; color: var(--ink); }
.l-cin .cin-nav { display: flex; justify-content: space-between; align-items: center; padding: 1.35em 1.8em; flex: none; }
.l-cin .cin-tag { font-size: 0.95em; white-space: nowrap; }
.l-cin .cin-hero { flex: 1; }
.l-cin .cin-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 7%;
  color: #fff;
  background: linear-gradient(90deg, rgba(10, 16, 22, 0.58), rgba(10, 16, 22, 0.12) 62%, rgba(10, 16, 22, 0));
}
.l-cin .cin-eyebrow { font-size: 0.78em; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.92; }
.l-cin .cin-title { font: 400 3.5em/1.02 var(--serif); letter-spacing: -0.02em; margin: 0.34em 0 0.4em; }
.l-cin .cin-sub { font-size: 1.05em; max-width: 26ch; opacity: 0.92; }
.l-cin .cin-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25em 1.8em;
  font: 400 1.45em/1.2 var(--serif);
  flex: none;
}
.l-cin .cin-foot small { font: 500 0.62em/1 var(--body); }

/* ── 2. Split: white page, headline left, framed photo right ── */
.l-split .sp-nav {
  display: flex;
  align-items: center;
  gap: 2em;
  padding: 1.35em 2.4em;
  border-bottom: 1px solid rgba(21, 32, 59, 0.07);
  flex: none;
}
.l-split .sp-nav .fx-links { margin-left: auto; }
.l-split .sp-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2.6em;
  padding: 2.4em 2.4em 2.4em 2.6em;
}
.l-split .sp-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.l-split .sp-title {
  font: 800 3.05em/1.04 var(--hf, "Manrope"), var(--body);
  letter-spacing: var(--hls, -0.035em);
  margin: 0.42em 0 0.5em;
}
.l-split .sp-sub { font-size: 0.98em; line-height: 1.5; color: var(--mut); max-width: 34ch; }
.l-split .sp-ctas { display: flex; align-items: center; gap: 1.4em; margin-top: 1.5em; }
.l-split .sp-link { font: 700 0.82em/1 var(--body); color: var(--ink); white-space: nowrap; }
.l-split .sp-trust {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-top: 1.8em;
  padding-top: 1.3em;
  border-top: 1px solid rgba(21, 32, 59, 0.08);
  font-size: 0.78em;
  color: var(--mut);
}
.l-split .sp-trust b { color: var(--ink); }
.l-split .sp-media { border-radius: 1.1em; }
.l-split .sp-badge {
  position: absolute;
  left: 1.1em;
  bottom: 1.1em;
  display: flex;
  align-items: center;
  gap: 0.6em;
  background: #fff;
  color: var(--ink);
  border-radius: 0.75em;
  padding: 0.8em 1em;
  font: 700 0.76em/1.2 var(--body);
  box-shadow: 0 0.6em 1.6em -0.6em rgba(10, 20, 40, 0.35);
}
.l-split .sp-badge svg { width: 1.6em; height: 1.6em; padding: 0.3em; border-radius: 50%; background: var(--soft); color: var(--ac); }
.l-split.is-serif .sp-title { font-size: 3.4em; font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; }

/* ── 3. Bold: solid brand color, condensed headline, stats band ── */
.l-bold { background: var(--bg); color: var(--ink); }
.l-bold .bd-nav { display: flex; align-items: center; gap: 2em; padding: 1.4em 2.4em; flex: none; }
.l-bold .bd-nav .fx-links { margin-left: auto; color: var(--mut); }
.l-bold .bd-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font: 700 0.8em/1 var(--body);
  padding: 0.75em 1.1em;
  border-radius: 99em;
  box-shadow: inset 0 0 0 1px var(--line-on, rgba(255, 255, 255, 0.28));
  white-space: nowrap;
}
.l-bold .bd-phone svg { width: 1.1em; height: 1.1em; color: var(--ac); }
.l-bold .bd-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.8em;
  padding: 0.6em 3.4em 2.4em 2.4em;
  align-items: center;
}
.l-bold .bd-copy { min-width: 0; }
.l-bold .bd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font: 700 0.68em/1 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ac);
  background: var(--soft);
  padding: 0.7em 1em;
  border-radius: 99em;
}
.l-bold .bd-badge svg { width: 1.35em; height: 1.35em; }
.l-bold .bd-title {
  font: 600 4.2em/0.98 var(--hf, "Oswald"), var(--display);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin: 0.36em 0 0.34em;
}
.l-bold .bd-title span { color: var(--hl, var(--ac)); }
.l-bold.is-sans .bd-title { font-weight: 800; text-transform: none; letter-spacing: var(--hls, -0.04em); line-height: 1; font-size: 3.5em; }
.l-bold .bd-sub { font-size: 0.98em; line-height: 1.5; color: var(--mut); max-width: 32ch; }
.l-bold .bd-ctas { display: flex; align-items: center; gap: 1em; margin-top: 1.5em; }
.l-bold .bd-media { position: relative; height: 100%; max-height: 24em; }
.l-bold .bd-media::before {
  content: "";
  position: absolute;
  inset: 1.1em -1.1em -1.1em 1.1em;
  border-radius: 1em;
  background: var(--ac);
}
.l-bold .bd-media .fx-img { position: absolute; inset: 0; border-radius: 1em; }
.l-bold .bd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 1.25em 2.4em;
  background: var(--band, rgba(0, 0, 0, 0.22));
  flex: none;
}
.l-bold .bd-stats div { display: flex; align-items: baseline; gap: 0.55em; }
.l-bold .bd-stats div + div { padding-left: 1.6em; border-left: 1px solid var(--line-on, rgba(255, 255, 255, 0.16)); }
.l-bold .bd-stats b { font: 600 1.75em/1 var(--hf, "Oswald"), var(--display); color: var(--ac); }
.l-bold.is-sans .bd-stats b { font-weight: 800; letter-spacing: -0.03em; }
.l-bold .bd-stats span { font-size: 0.72em; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); white-space: nowrap; }

/* ── 4. Editorial: warm paper, big serif, wide photo, service columns ── */
.l-edit .ed-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.35em 2.6em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  flex: none;
}
.l-edit .ed-nav .fx-links { font-size: 0.74em; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; gap: 1.8em; }
.l-edit .ed-cta { justify-self: end; font: 600 0.78em/1 var(--body); color: var(--ac); white-space: nowrap; }
.l-edit .ed-head {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 2.4em;
  align-items: end;
  padding: 2.1em 2.6em 1.7em;
  flex: none;
}
.l-edit .ed-title { font: 400 3.5em/1 var(--hf, "Fraunces"), var(--serif); letter-spacing: -0.025em; }
.l-edit .ed-title em { font-style: italic; color: var(--ac); }
.l-edit .ed-sub { font-size: 0.86em; line-height: 1.55; color: var(--mut); padding-bottom: 0.3em; }
.l-edit .ed-photo { flex: 1; min-height: 0; margin: 0 2.6em; border-radius: 0.5em; }
.l-edit .ed-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2em;
  padding: 1.4em 2.6em 1.9em;
  flex: none;
}
.l-edit .ed-cols div { border-top: 1px solid rgba(0, 0, 0, 0.16); padding-top: 0.85em; }
.l-edit .ed-cols b { display: block; font: 500 1.12em/1.2 var(--hf, "Fraunces"), var(--serif); }
.l-edit .ed-cols span { display: block; margin-top: 0.3em; font-size: 0.72em; color: var(--mut); }

/* ── 5. Local pro: utility bar, photo hero with quote form, service chips ── */
.l-local .lc-util {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7em 2.4em;
  background: var(--deep, var(--ink));
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.7em;
  font-weight: 600;
  flex: none;
}
.l-local .lc-util span { display: inline-flex; align-items: center; gap: 0.5em; }
.l-local .lc-util svg { width: 1.15em; height: 1.15em; color: var(--ac-light, var(--ac)); }
.l-local .lc-nav { display: flex; align-items: center; gap: 2em; padding: 1.2em 2.4em; flex: none; }
.l-local .lc-nav .fx-links { margin-left: auto; }
.l-local .lc-hero { flex: 1; min-height: 0; }
.l-local .lc-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 14, 20, 0.7) 0%, rgba(8, 14, 20, 0.42) 48%, rgba(8, 14, 20, 0.06) 78%); }
.l-local .lc-copy {
  position: absolute;
  left: 2.4em;
  top: 50%;
  transform: translateY(-50%);
  width: 28em;
  color: #fff;
}
.l-local .lc-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: rgba(10, 16, 22, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  border-radius: 99em;
  padding: 0.55em 0.95em;
  font: 700 0.7em/1 var(--body);
}
/* (no backdrop-filter inside the 3D cards: Safari renders it unreliably there) */
.l-local .lc-title { font: 800 2.7em/1.04 var(--hf, "Manrope"), var(--body); letter-spacing: var(--hls, -0.035em); margin: 0.42em 0 0.4em; }
.l-local .lc-sub { font-size: 0.92em; line-height: 1.5; opacity: 0.9; max-width: 28ch; }
.l-local .lc-form {
  position: absolute;
  right: 2.4em;
  top: 50%;
  transform: translateY(-50%);
  width: 18.5em;
  background: #fff;
  color: var(--ink);
  border-radius: 0.95em;
  padding: 1.45em 1.4em 1.4em;
  box-shadow: 0 1.4em 3em -1em rgba(0, 0, 0, 0.45);
}
.l-local .lc-form-title { font: 800 1.12em/1.2 var(--hf, "Manrope"), var(--body); letter-spacing: -0.02em; }
.l-local .lc-form-sub { font-size: 0.72em; color: var(--mut); margin-top: 0.35em; }
.l-local .lc-field {
  display: flex;
  align-items: center;
  height: 2.5em;
  margin-top: 0.7em;
  padding: 0 0.95em;
  border-radius: 0.5em;
  border: 1px solid #dfe3ea;
  background: #f8f9fb;
  font-size: 0.74em;
  color: #8a93a3;
}
.l-local .lc-field:first-of-type { margin-top: 1em; }
.l-local .lc-form .fx-btn { display: flex; justify-content: center; margin-top: 0.85em; padding: 1.05em; }
.l-local .lc-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8em; padding: 1.15em 2.4em 1.3em; flex: none; }
.l-local .lc-chip {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.65em 0.8em;
  border: 1px solid #e6e9ef;
  border-radius: 0.65em;
  font: 700 0.76em/1.1 var(--body);
  white-space: nowrap;
}
.l-local .lc-chip svg { width: 1.9em; height: 1.9em; padding: 0.42em; border-radius: 50%; background: var(--soft); color: var(--ac); }

/* ── Left rail: nearer cards overlap the outer (left) side of the cards
 * behind them, so the main content swaps to the visible (right) side. ── */
.fx-card--flip .l-cin .cin-nav,
.fx-card--flip .l-cin .cin-foot { flex-direction: row-reverse; }
.fx-card--flip .l-cin .cin-hero img { transform: scaleX(-1); }
.fx-card--flip .l-cin .cin-over {
  align-items: flex-end;
  text-align: right;
  background: linear-gradient(270deg, rgba(10, 16, 22, 0.58), rgba(10, 16, 22, 0.12) 62%, rgba(10, 16, 22, 0));
}
.fx-card--flip .l-split .sp-main { grid-template-columns: 0.92fr 1.08fr; padding: 2.4em 2.6em 2.4em 2.4em; }
.fx-card--flip .l-split .sp-media { order: -1; }
.fx-card--flip .l-split .sp-badge { left: auto; right: 1.1em; }
.fx-card--flip .l-bold .bd-main { grid-template-columns: 0.9fr 1.1fr; padding: 0.6em 2.4em 2.4em 3.4em; }
.fx-card--flip .l-bold .bd-media { order: -1; }
.fx-card--flip .l-bold .bd-media::before { inset: 1.1em 1.1em -1.1em -1.1em; }
.fx-card--flip .l-edit .ed-head { grid-template-columns: 0.65fr 1.35fr; }
.fx-card--flip .l-edit .ed-title { order: 2; text-align: right; }
.fx-card--flip .l-local .lc-copy { left: auto; right: 2.4em; text-align: right; }
.fx-card--flip .l-local .lc-sub { margin-left: auto; }
.fx-card--flip .l-local .lc-form { right: auto; left: 2.4em; }
.fx-card--flip .l-local .lc-shade { background: linear-gradient(270deg, rgba(8, 14, 20, 0.7) 0%, rgba(8, 14, 20, 0.42) 48%, rgba(8, 14, 20, 0.06) 78%); }

@media (max-width: 1200px) {
  .fx { --fx-stage-bottom: 0px; }
  .fx__lede { display: none; }
}
@media (max-width: 980px) {
  .fx { height: 740px; --fx-stage: 150%; --fx-stage-bottom: 80px; }
  .fx__copy { padding-top: 80px; padding-bottom: 52px; }
}
@media (max-width: 640px) {
  /* phones use their own card path (see showcase.js), laid out on the real
   * screen width, with a taller band between the heading and the copy */
  .fx { height: 720px; --fx-stage: 100%; --fx-stage-bottom: 78px; }
  .fx__copy { padding-top: 64px; padding-bottom: 40px; }
  .fx .checks { gap: 6px; max-width: 360px; }
  .fx .checks li { font-size: 12.5px; padding: 6px 11px 6px 9px; }
  .fx .checks svg { width: 15px; height: 15px; }
  .fx__bottom { gap: 14px; }
}
/* Reduced motion: showcase.js places each card as a still (no animation). */
