/* Hero (Figma: home / Container 6755:3535 — 1100 x 537, 40px inset).
   Two equal flexible halves (Figma flex:1 0 0) 40px apart, so the 530px
   columns are a result of the 1100px width rather than a hardcoded size and
   the whole block rescales with viewport / browser zoom. */
.fl-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 40px;
  width: calc(100% - 80px);
  min-height: 537px;
  margin: 0 40px;
  font-family: var(--fl-font-sans);
}

/* Left column: 530 x 463 — copy block (394) + 17 gap + actions (52). */
.fl-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-width: 0;
}

.fl-hero__content {
  display: flex;
  flex-direction: column;
}

.fl-hero__title {
  margin: 0;
  color: var(--fl-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 64px;
  font-weight: 400;
  letter-spacing: -1.8px;
  line-height: 70.56px;
}

/* Figma offsets inside the copy block: heading -> body 18px, body -> trusted 35px. */
.fl-hero__description {
  max-width: 485px;
  margin: 18px 0 0;
  color: var(--fl-text-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
}

.fl-hero__accent {
  position: relative;
  white-space: nowrap;
}

.fl-hero__accent::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 4.53px;
  background: url("/redesign/assets/hero-underline.svg") center / 100% 100% no-repeat;
  content: "";
}

.fl-hero__trusted {
  margin-top: 35px;
}

.fl-hero__trusted-label {
  margin: 0;
  color: #828690;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.62px;
  line-height: 13.5px;
  text-transform: uppercase;
}

.fl-hero__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 12px;
  min-height: 28px;
}

.fl-hero__logos img {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.fl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

/* 106 x 44: 16px pad + 2px border around a 70x24 label. */
.fl-hero__demo {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  padding: 8px 16px;
  border: 2px solid var(--fl-ink);
  border-radius: var(--fl-radius-pill);
  background: var(--fl-white);
  box-shadow: var(--fl-shadow-md);
  color: var(--fl-ink);
  font-family: var(--fl-font-script);
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fl-hero__demo:hover {
  background: var(--fl-cta-hover);
  transform: translate(1px, 1px);
  box-shadow: var(--fl-shadow-sm);
}

.fl-hero__works {
  position: relative;
  padding-bottom: 6px;
  color: var(--fl-ink);
  font-family: var(--fl-font-script);
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
}

.fl-hero__works::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4.53px;
  background: url("/redesign/assets/works-underline.svg") left bottom / 100% 100% no-repeat;
  content: "";
}

/* Copy fade-up — the headline, paragraph, proof block and buttons each start
   18px low at zero opacity and rise into place, one shortly after the last.
   hero.js arms the column and adds --play once it scrolls into view.

   The four blocks are spaced 90ms apart and take 520ms each, so they overlap
   heavily and read as a single sweep up the column, finishing at ~790ms —
   just before the card's steps finish building on the right. */
.fl-hero__copy--armed [data-fl-reveal] {
  opacity: 0;
}

.fl-hero__copy--play [data-fl-reveal] {
  animation: fl-copy-rise 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fl-hero__copy--play [data-fl-reveal="1"] {
  animation-delay: 90ms;
}

.fl-hero__copy--play [data-fl-reveal="2"] {
  animation-delay: 180ms;
}

.fl-hero__copy--play [data-fl-reveal="3"] {
  animation-delay: 270ms;
}

/* Travels further than the card's steps (10px) because these blocks are much
   larger — the same 10px would barely register on the 64px headline. */
@keyframes fl-copy-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Right column: card (487) + 24 gap + product selector (26). */
.fl-showcase {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.fl-showcase__card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 24px;
  overflow: visible;
  border: 2px solid var(--fl-ink);
  border-radius: 12px;
  background: var(--fl-white);
  box-shadow: 8px 8px 0 var(--fl-ink);
}

.fl-showcase__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px dashed rgba(21, 26, 38, 0.3);
}

.fl-showcase__dots {
  display: flex;
  gap: 8px;
}

.fl-showcase__dot {
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(21, 26, 38, 0.4);
  border-radius: 50%;
}

.fl-showcase__dot:first-child {
  border: 0;
  background: #3f9b65;
}

.fl-showcase__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 16px;
  line-height: 16px;
}

/* 9.362% of the card's 478px content box is Figma's 44.75px inset, expressed
   as a ratio so the canvas keeps its proportions as the card narrows. */
.fl-showcase__canvas {
  position: relative;
  box-sizing: border-box;
  padding: 32px 9.362%;
  border: 1px dashed rgba(21, 26, 38, 0.25);
  border-radius: 8px;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Flow is left-aligned in the canvas and capped at 360px, per Figma. */
.fl-showcase__flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
}

.fl-showcase__step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--fl-ink);
  border-radius: 8px;
  background: var(--fl-surface);
  box-shadow: var(--fl-shadow-md);
}

.fl-showcase__step--coverage {
  background: rgba(116, 195, 101, 0.3);
}

.fl-showcase__step--quote {
  background: var(--fl-green);
  color: var(--fl-surface);
}

.fl-showcase__step-meta {
  display: block;
  color: #828690;
  font-size: 10px;
  letter-spacing: 0.5px;
  line-height: 15px;
  text-transform: uppercase;
}

.fl-showcase__step--coverage .fl-showcase__step-meta {
  color: #000000;
}

.fl-showcase__step--quote .fl-showcase__step-meta {
  color: rgba(242, 243, 245, 0.7);
}

.fl-showcase__step-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.fl-showcase__value {
  padding-left: 12px;
  font-family: var(--fl-font-script);
  font-size: 18px;
  line-height: 28px;
  white-space: nowrap;
}

.fl-showcase__step--coverage .fl-showcase__value {
  color: #000000;
}

/* 12px above / 8px below the connector, matching the 79px step blocks. */
.fl-showcase__divider {
  height: 12px;
  margin: 4px 0 8px;
  border-left: 1px dashed rgba(21, 26, 38, 0.4);
}

/* Step reveal — the card holds still while its four steps rise in turn.
   hero.js arms the flow (which hides the steps) and adds --play when the
   card scrolls into view. Each step and the connector above it share a
   --fl-reveal index, so they appear together.

   The keyframes are bound to descendants of --play, so re-rendering the flow
   for another product replays the sequence on the new steps for free. */
.fl-showcase__flow--armed [data-fl-reveal] {
  opacity: 0;
}

.fl-showcase__flow--play [data-fl-reveal] {
  animation-name: fl-step-fade;
  animation-duration: 340ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}

.fl-showcase__flow--play .fl-showcase__step {
  animation-name: fl-step-rise;
}

/* 260ms apart, so the whole card is built in ~1.06s. The gap is shorter than
   a step's 340ms duration on purpose: each step starts while the one above is
   still settling, which is what keeps the run continuous rather than stepped.
   --fl-reveal-stagger offsets the whole run; it is unset (0ms) for the single
   card here, and exists so a second card sharing the viewport can start late. */
.fl-showcase__flow--play [data-fl-reveal="0"] {
  animation-delay: calc(var(--fl-reveal-stagger, 0ms) + 0ms);
}

.fl-showcase__flow--play [data-fl-reveal="1"] {
  animation-delay: calc(var(--fl-reveal-stagger, 0ms) + 260ms);
}

.fl-showcase__flow--play [data-fl-reveal="2"] {
  animation-delay: calc(var(--fl-reveal-stagger, 0ms) + 520ms);
}

.fl-showcase__flow--play [data-fl-reveal="3"] {
  animation-delay: calc(var(--fl-reveal-stagger, 0ms) + 780ms);
}

@keyframes fl-step-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fl-step-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion gets the finished hero with no build-up. */
@media (prefers-reduced-motion: reduce) {
  .fl-showcase__flow--armed [data-fl-reveal],
  .fl-showcase__flow--play [data-fl-reveal],
  .fl-hero__copy--armed [data-fl-reveal],
  .fl-hero__copy--play [data-fl-reveal] {
    opacity: 1;
    outline-color: transparent;
    animation: none;
  }
}

.fl-showcase__tool {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 2px solid var(--fl-ink);
  border-radius: 6px;
  background: var(--fl-surface);
  box-shadow: var(--fl-shadow-md);
}

/* Rotated chips: 113x57 and 130x85 unrotated, offsets from Figma. */
.fl-showcase__elements {
  top: -21px;
  left: -7px;
  gap: 4.29px;
  padding: 6px 10px;
  transform: rotate(-4deg);
}

.fl-showcase__tool-title {
  color: #828690;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.2px;
  letter-spacing: 1.68px;
  line-height: 16.8px;
  text-transform: uppercase;
}

.fl-showcase__shape-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fl-showcase__shape {
  display: grid;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--fl-ink);
  border-radius: 4px;
  background: #dcf7e1;
  color: var(--fl-green);
  font-size: 10px;
  line-height: 15px;
}

.fl-showcase__more {
  color: #828690;
  font-size: 9px;
  line-height: 13.5px;
}

.fl-showcase__inspect {
  right: -6px;
  bottom: -1px;
  gap: 6px;
  width: 130px;
  padding: 8px 10px;
  transform: rotate(3deg);
}

.fl-showcase__control {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: stretch;
  color: #828690;
  font-size: 8px;
  letter-spacing: 0.4px;
  line-height: 12px;
  text-transform: uppercase;
}

.fl-showcase__track {
  position: relative;
  height: 4px;
  border-radius: 9px;
  background: rgba(21, 26, 38, 0.15);
}

.fl-showcase__track::after {
  position: absolute;
  top: -2px;
  left: var(--knob, 30%);
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  border: 1px solid var(--fl-ink);
  border-radius: 50%;
  background: var(--fl-green);
  content: "";
}

.fl-showcase__selector {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  min-height: 26px;
}

.fl-showcase__prompt {
  padding: 3px 4px 0 0;
  color: var(--fl-text-muted);
  font-family: var(--fl-font-script);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.fl-showcase__button {
  box-sizing: border-box;
  padding: 4px 10px;
  border: 1px solid var(--fl-ink);
  border-radius: var(--fl-radius-pill);
  background: var(--fl-surface);
  color: var(--fl-text-muted);
  cursor: pointer;
  font: 400 12px/16px var(--fl-font-sans);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

.fl-showcase__button:hover {
  background: var(--fl-mint);
  color: var(--fl-ink);
}

.fl-showcase__button[aria-pressed="true"] {
  background: var(--fl-blue);
  box-shadow: var(--fl-shadow-sm);
  color: var(--fl-white);
}

.fl-showcase__button[aria-pressed="true"]:hover {
  background: var(--fl-blue);
  color: var(--fl-white);
}

.fl-showcase__button:active {
  transform: translate(1px, 1px);
}

/* The 360px flow plus the card and canvas insets need ~504px of column, which
   two columns only get above ~1167px of viewport. Below that (including 110%+
   browser zoom on a 1280 window) stack the halves rather than squeezing the
   card, which is what pushed the Inspect chip over the Quote value. */
@media (max-width: 1180px) {
  /* Stacked, both halves share one 530px column — the same width they have in
     Figma — centred in the page, so the copy and the card keep a common left
     edge instead of the group hugging the left with dead space on the right. */
  .fl-hero {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 530px;
    min-height: 0;
    margin: 0 auto;
  }

  .fl-hero__copy,
  .fl-hero__content {
    align-items: center;
    text-align: center;
  }

  .fl-hero__actions {
    justify-content: center;
  }

  .fl-hero__title {
    font-size: clamp(48px, 8vw, 64px);
    line-height: 1.1025;
  }

  .fl-hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .fl-hero__trusted-label,
  .fl-hero__logos {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .fl-hero__title {
    font-size: 44px;
    line-height: 1.05;
  }

  .fl-hero__description {
    font-size: 15px;
    line-height: 23px;
  }

  .fl-hero__trusted {
    margin-top: 24px;
  }

  .fl-hero__trusted-label {
    font-size: 10px;
    letter-spacing: 0.9px;
    line-height: 12px;
    white-space: nowrap;
  }

  .fl-showcase__card {
    padding: 18px;
  }

  .fl-showcase__canvas {
    padding: 34px 12px 24px;
  }

  .fl-showcase__flow {
    max-width: none;
  }

  /* Below 530px the card is narrower than designed, so pull the decorative
     chips in — at full size they would cover most of a step row. */
  .fl-showcase__elements {
    top: -16px;
    left: -4px;
    padding: 5px 8px;
  }

  .fl-showcase__shape {
    width: 17px;
    height: 17px;
  }

  .fl-showcase__inspect {
    right: -4px;
    width: 104px;
  }

  .fl-showcase__value {
    font-size: 16px;
  }

  .fl-showcase__selector {
    justify-content: center;
    align-items: center;
  }
}
