/* ============================================================
   Ferrum Apps — homepage redesign
   Loaded only on index. Everything is namespaced `fh-` so it
   cannot collide with global.css (hero, app pages, privacy).
   ============================================================ */

:root {
  --fh-ink: #101415;
  --fh-ink-soft: rgba(16, 20, 21, 0.72);
  --fh-ink-faint: rgba(16, 20, 21, 0.5);
  --fh-paper: #f4f3ef;
  --fh-card: #ffffff;
  --fh-dark: #101415;
  --fh-dark-deep: #0b0e0f;
  --fh-cream: #f7f6f2;
  --fh-accent: #ff5a1f;
  --fh-line-dark: rgba(247, 247, 247, 0.14);
  --fh-line-light: rgba(16, 20, 21, 0.1);
  --fh-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --fh-radius-sheet: clamp(1.75rem, 4vw, 3.25rem);
  --fh-radius-panel: clamp(1.4rem, 2.4vw, 2.25rem);
}

::selection {
  background: var(--fh-accent);
  color: #ffffff;
}

/* ------------------------------------------------------------
   Film grain overlay
   ------------------------------------------------------------ */

.fh-grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ------------------------------------------------------------
   Marquee bridge (dark, sits right under the hero)
   ------------------------------------------------------------ */

.fh-marquee {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 2.6vw, 2.2rem) 0 clamp(4.4rem, 9vw, 8rem);
  background: var(--fh-dark);
  color: #f7f7f7;
}

.fh-marquee-track {
  display: flex;
  width: max-content;
  animation: fh-marquee-scroll 30s linear infinite;
}

.fh-marquee-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.fh-marquee-item {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  padding-right: clamp(1.4rem, 3vw, 2.6rem);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  white-space: nowrap;
}

.fh-marquee-item:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 247, 247, 0.56);
}

.fh-marquee-item::after {
  content: "✦";
  color: var(--fh-accent);
  -webkit-text-stroke: 0;
  font-size: 0.5em;
  transform: translateY(0.08em);
}

@keyframes fh-marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------
   Sheets — light body sliding over the dark canvas
   ------------------------------------------------------------ */

.fh-sheet {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--fh-radius-sheet));
  border-radius: var(--fh-radius-sheet) var(--fh-radius-sheet) 0 0;
  background: var(--fh-paper);
  color: var(--fh-ink);
  padding-bottom: clamp(8rem, 14vw, 13rem);
}

/* lineup band: matches the app screenshots' own backdrop so they sit on it
   without a visible edge. Mirrors the sheet's rounded top since it's the
   sheet's first child and would otherwise square off those corners. */
.fh-lineup-band {
  border-radius: var(--fh-radius-sheet) var(--fh-radius-sheet) 0 0;
  background: #f7f7f4;
  padding-bottom: clamp(5rem, 9vw, 8rem);
}

.fh-dark-sheet {
  position: relative;
  z-index: 3;
  margin-top: calc(-1 * var(--fh-radius-sheet));
  border-radius: var(--fh-radius-sheet) var(--fh-radius-sheet) 0 0;
  background: var(--fh-dark);
  color: #f7f7f7;
  overflow: hidden;
}

/* ------------------------------------------------------------
   Section scaffolding
   ------------------------------------------------------------ */

.fh-section {
  padding-top: clamp(5.5rem, 9vw, 8.5rem);
  scroll-margin-top: 2rem;
}

/* gap scales with the title (which clamps up to 5.2rem) — a fixed gap
   reads progressively tighter as the heading grows */
.fh-section-head {
  display: grid;
  gap: clamp(1.5rem, 2.4vw, 2.3rem);
  max-width: 62rem;
  margin-bottom: clamp(4rem, 7.5vw, 7rem);
}

.fh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fh-ink-faint);
}

.fh-eyebrow-index {
  color: var(--fh-accent);
}

.fh-eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.fh-dark-sheet .fh-eyebrow,
.fh-stack-card .fh-eyebrow {
  color: rgba(247, 247, 247, 0.55);
}

.fh-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.6vw, 5.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.fh-title em {
  font-style: normal;
  color: var(--fh-accent);
}

.fh-lede {
  max-width: 44rem;
  margin: 0;
  color: var(--fh-ink-soft);
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.75;
}

/* ------------------------------------------------------------
   Buttons and inline links
   ------------------------------------------------------------ */

.fh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.4rem;
  padding: 0 1.9rem;
  border: 1px solid var(--fh-ink);
  border-radius: 999px;
  background: var(--fh-ink);
  color: #f7f7f7;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 420ms var(--fh-ease-out),
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.fh-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 420ms var(--fh-ease-out);
}

.fh-btn:hover {
  transform: translateY(-2px);
}

.fh-btn:hover svg {
  transform: translate(2px, -2px);
}

.fh-btn:focus-visible {
  outline: 2px solid var(--fh-accent);
  outline-offset: 3px;
}

.fh-btn-light {
  background: #f7f7f7;
  border-color: #f7f7f7;
  color: var(--fh-ink);
}

.fh-btn-big {
  min-height: 4rem;
  padding: 0 2.6rem;
  font-size: 1.12rem;
}

.fh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--fh-ink-soft);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  padding-bottom: 0.28rem;
  background:
    linear-gradient(currentColor, currentColor) no-repeat left bottom / 0% 1px;
  transition: background-size 380ms var(--fh-ease-out), color 200ms ease;
}

.fh-link svg {
  width: 0.95rem;
  height: 0.95rem;
}

.fh-link:hover {
  color: var(--fh-ink);
  background-size: 100% 1px;
}

.fh-magnetic {
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

/* word-split reveal (spans injected by JS; no-JS stays fully visible) */

.fh-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.fh-word-inner {
  display: inline-block;
  will-change: transform;
}

/* ------------------------------------------------------------
   App lineup rows
   ------------------------------------------------------------ */

.fh-app-list {
  display: grid;
  gap: clamp(5.5rem, 11vw, 10.5rem);
}

.fh-app-row {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2.4rem, 5vw, 5.5rem);
  align-items: center;
}

.fh-app-row-flip {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.fh-app-row-flip .fh-app-copy {
  order: 2;
}

.fh-app-row-flip .fh-app-visual {
  order: 1;
}

.fh-app-index {
  display: block;
  margin-bottom: 1.1rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--fh-ink-faint);
}

.fh-app-index em {
  font-style: normal;
  color: var(--fh-accent);
}

.fh-app-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.fh-app-icon {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.85rem;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(16, 20, 21, 0.14);
}

.fh-app-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--fh-ink);
}

.fh-app-tagline {
  margin: 0.65rem 0 0;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fh-ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fh-app-summary {
  max-width: 32rem;
  margin: 1.3rem 0 0;
  color: var(--fh-ink-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}

.fh-app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.fh-app-chips li {
  padding: 0.52rem 0.95rem;
  border: 1px solid var(--fh-line-light);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--fh-ink-soft);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.fh-app-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem 1.6rem;
  margin-top: 2.1rem;
}

/* Visual panel */

.fh-app-visual {
  position: relative;
  border-radius: var(--fh-radius-panel);
  background: var(--fh-app-bg, linear-gradient(135deg, #e8e6e0, #d9d6cd));
  min-height: clamp(21rem, 34vw, 31rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.fh-app-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(16, 20, 21, 0.06);
  pointer-events: none;
}

.fh-app-frame-wrap {
  display: block;
  width: min(78%, 34rem);
  will-change: transform;
}

.fh-app-frame {
  display: block;
  width: 100%;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow:
    0 34px 74px rgba(16, 20, 21, 0.22),
    0 6px 18px rgba(16, 20, 21, 0.1);
  overflow: hidden;
}

/* homepage app screenshots: pulled out of the green panel + card frame
   and shown directly with a 1px gray border. Scoped to the #apps section
   so the app-detail hero panel (which keeps its tag/panel) is unaffected. */
#apps .fh-app-visual {
  background: none;
  min-height: 0;
  overflow: visible;
}

#apps .fh-app-visual::after {
  display: none;
}

#apps .fh-app-visual-tag {
  display: none;
}

#apps .fh-app-frame-bar {
  display: none;
}

#apps .fh-app-frame-wrap {
  width: 100%;
}

#apps .fh-app-frame {
  background: none;
  box-shadow: none;
}

.fh-app-frame-bar {
  display: flex;
  gap: 0.34rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(16, 20, 21, 0.06);
  background: #fbfbfa;
}

.fh-app-frame-bar span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(16, 20, 21, 0.14);
}

.fh-app-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* poster frames: artwork fills the card, CSS-cropped to its right side
   (the laptop region of the listing composite) instead of a browser bar.
   Declared after .fh-app-frame img so height: 100% wins the cascade. */
.fh-app-frame-poster {
  aspect-ratio: 5 / 4;
}

.fh-app-frame-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
}

.fh-app-visual-tag {
  position: absolute;
  left: 1.4rem;
  top: 1.3rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(16, 20, 21, 0.82);
  color: #f7f7f7;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fh-app-visual-tag::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #7ce76b;
}

/* Mini cards (used for related-app teasers) */

.fh-mini-card {
  position: relative;
  min-height: clamp(15rem, 22vw, 19rem);
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  border-radius: var(--fh-radius-panel);
  background: var(--fh-app-bg, #e9e7e1);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.7rem;
  transition: transform 600ms var(--fh-ease-out);
}

.fh-mini-card:hover {
  transform: translateY(-4px);
}

.fh-mini-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(16, 20, 21, 0.06);
  pointer-events: none;
}

.fh-mini-card-ghost {
  position: absolute;
  right: -6%;
  top: -14%;
  width: 58%;
  opacity: 0.5;
  filter: blur(6px) saturate(0.9);
  border-radius: 1rem;
  z-index: -1;
  transform: rotate(6deg);
}

.fh-mini-card-ghost-icon {
  filter: none;
  opacity: 0.9;
  width: 30%;
  right: 6%;
  top: 12%;
  transform: rotate(8deg);
  border-radius: 1.4rem;
  box-shadow: 0 24px 48px rgba(16, 20, 21, 0.18);
}

.fh-mini-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 20, 21, 0.16);
  background: rgba(255, 255, 255, 0.5);
  color: var(--fh-ink-soft);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.fh-mini-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fh-ink);
}

.fh-mini-card p {
  max-width: 26rem;
  margin: 0;
  color: var(--fh-ink-soft);
  font-size: 0.99rem;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   Why Ferrum — sticky stacking cards
   ------------------------------------------------------------ */

/* block flow (not grid): each card's sticky containing block must be
   the whole stack, so earlier cards can pin while later ones ride over */
.fh-stack {
  display: block;
}

.fh-stack-card + .fh-stack-card {
  margin-top: clamp(1.4rem, 2.6vw, 2.2rem);
}

.fh-stack-card {
  --stack-offset: calc(4.6rem + var(--stack-i, 0) * 2.4rem);
  --fh-stack-dim: 0;
  position: sticky;
  top: var(--stack-offset);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3.8rem);
  border-radius: var(--fh-radius-panel);
  background:
    radial-gradient(120% 130% at 84% -8%, var(--fh-stack-accent, rgba(255, 90, 31, 0.2)), transparent 46%),
    linear-gradient(180deg, #14181a 0%, var(--fh-dark) 100%);
  color: #f7f7f7;
  box-shadow:
    0 -12px 42px rgba(11, 14, 15, 0.24),
    inset 0 1px 0 rgba(247, 247, 247, 0.08);
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}

/* dim overlay for covered cards — an opacity-driven veil instead of a
   brightness() filter: filters on a card with backdrop-filter children
   can composite to a black box, and opacity scrubs without flicker */
.fh-stack-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #050708;
  opacity: var(--fh-stack-dim, 0);
  pointer-events: none;
  z-index: 3;
}

.fh-stack-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 3.1rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 15ch;
}

.fh-stack-copy > p {
  max-width: 30rem;
  margin: 1.25rem 0 0;
  color: rgba(247, 247, 247, 0.76);
  font-size: 1.04rem;
  line-height: 1.72;
}

.fh-stack-copy .fh-eyebrow {
  margin-bottom: 1.3rem;
}

.fh-stack-points {
  display: grid;
  gap: 0.85rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.fh-stack-points li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(247, 247, 247, 0.85);
  font-size: 0.98rem;
}

.fh-stack-points svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  color: var(--fh-stack-dot, var(--fh-accent));
}

/* stack visuals */

.fh-stack-visual {
  position: relative;
  min-height: clamp(17rem, 26vw, 24rem);
  display: grid;
  place-items: center;
}

.fh-stack-photo {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.fh-stack-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fh-stack-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(247, 247, 247, 0.14);
}

/* pricing visual — native composition: central plan card + floating benefit chips */

/* no outer box or backdrop — just the orange highlight over the card itself.
   The glow is tuned to fade out inside the bounds so it has no hard edge. */
.fh-plan-visual {
  place-self: stretch;
  position: relative;
  container-type: inline-size;
  min-height: 21rem;
  background: radial-gradient(62% 52% at 42% 64%, rgba(255, 122, 40, 0.28), transparent 68%);
}

/* central plan card */
.fh-plan-card {
  position: absolute;
  top: 7%;
  bottom: 8%;
  left: 36.5%;
  right: 12%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.5rem, 2cqi, 0.85rem);
  padding: clamp(0.9rem, 3.4cqi, 1.5rem);
  border-radius: 1.1rem;
  border: 1px solid rgba(247, 247, 247, 0.16);
  background: linear-gradient(180deg, rgba(247, 247, 247, 0.12), rgba(247, 247, 247, 0.03));
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.fh-plan-badge {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 138, 76, 0.5);
  background: rgba(255, 122, 40, 0.14);
  color: #ff9d5c;
  font-family: var(--font-display);
  font-size: clamp(0.68rem, 2.4cqi, 0.82rem);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.fh-plan-badge svg {
  width: 1em;
  height: 1em;
}

.fh-plan-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5.4cqi, 2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: center;
  color: #f7f7f7;
}

.fh-plan-list {
  display: grid;
  gap: clamp(0.8rem, 3cqi, 1.5rem);
  margin: clamp(0.3rem, 1.4cqi, 0.7rem) 0 0;
  padding: 0;
  list-style: none;
}

.fh-plan-list li,
.fh-plan-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
}

.fh-plan-list li > span:last-child,
.fh-plan-chip > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.fh-plan-list strong,
.fh-plan-chip strong {
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 2.6cqi, 1rem);
  font-weight: 500;
  line-height: 1.15;
  color: #f7f7f7;
}

.fh-plan-list small,
.fh-plan-chip small {
  font-size: clamp(0.7rem, 2.2cqi, 0.85rem);
  line-height: 1.25;
  color: rgba(247, 247, 247, 0.58);
}

.fh-plan-ic {
  display: grid;
  place-items: center;
  width: clamp(1.7rem, 5.4cqi, 2.15rem);
  height: clamp(1.7rem, 5.4cqi, 2.15rem);
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 138, 76, 0.4);
  background: rgba(255, 122, 40, 0.12);
  color: #ff9d5c;
}

.fh-plan-ic svg {
  width: 54%;
  height: 54%;
}

/* floating benefit chips */
.fh-plan-chip {
  position: absolute;
  z-index: 3;
  width: 33%;
  min-width: 7.5rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(247, 247, 247, 0.1);
  background: rgba(17, 21, 23, 0.88);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.42);
}

.fh-plan-chip .fh-plan-ic {
  border-color: rgba(247, 247, 247, 0.12);
  background: rgba(247, 247, 247, 0.06);
}

.fh-plan-chip-a {
  top: 12%;
  left: 2%;
}

.fh-plan-chip-b {
  bottom: 15%;
  left: 0.5%;
}

.fh-plan-chip-c {
  bottom: 3%;
  right: 1.5%;
  z-index: 4;
}

/* stacked layout once the card collapses to a single column */
@media (max-width: 980px) {
  /* keep place-self: stretch so the container-query element still fills
     the (now single-column) card width, then stack card + chips */
  .fh-plan-visual {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: clamp(1rem, 3vw, 1.5rem);
  }

  .fh-plan-card,
  .fh-plan-chip {
    position: static;
    inset: auto;
    width: 100%;
  }
}

/* feedback visual */

.fh-chat {
  width: min(100%, 24rem);
  display: grid;
  gap: 0.9rem;
}

.fh-chat-bubble {
  max-width: 88%;
  padding: 1rem 1.2rem;
  border-radius: 1.15rem;
  font-size: 0.98rem;
  line-height: 1.5;
}

.fh-chat-bubble small {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.fh-chat-merchant {
  justify-self: start;
  border-bottom-left-radius: 0.3rem;
  background: rgba(247, 247, 247, 0.94);
  color: var(--fh-ink);
}

.fh-chat-ferrum {
  justify-self: end;
  border-bottom-right-radius: 0.3rem;
  background: rgba(151, 213, 66, 0.16);
  border: 1px solid rgba(151, 213, 66, 0.34);
  color: #e8f6d2;
}

.fh-chat-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(247, 247, 247, 0.62);
  font-family: var(--font-display);
  font-size: 0.83rem;
  font-weight: 500;
}

.fh-chat-status svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #97d542;
}

/* ------------------------------------------------------------
   CTA + footer (dark sheet)
   ------------------------------------------------------------ */

.fh-cta {
  position: relative;
  padding: clamp(7rem, 12vw, 11rem) 0 clamp(5rem, 9vw, 8rem);
  text-align: center;
}

.fh-cta::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: min(60rem, 90vw);
  aspect-ratio: 1.6;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 90, 31, 0.28), transparent 72%);
  filter: blur(30px);
  pointer-events: none;
}

.fh-cta .fh-eyebrow {
  justify-content: center;
  margin: 0 auto 1.6rem;
}

.fh-cta .fh-eyebrow::before {
  display: none;
}

.fh-cta-title {
  margin: 0 auto;
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 8rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #f7f7f7;
  text-wrap: balance;
}

.fh-cta-title em {
  font-style: normal;
  color: var(--fh-accent);
}

.fh-cta-copy {
  max-width: 36rem;
  margin: 1.8rem auto 0;
  color: rgba(247, 247, 247, 0.72);
  font-size: 1.1rem;
  line-height: 1.75;
}

.fh-cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  margin-top: 2.8rem;
  position: relative;
  z-index: 1;
}

.fh-cta .fh-link {
  color: rgba(247, 247, 247, 0.72);
}

.fh-cta .fh-link:hover {
  color: #f7f7f7;
}

/* footer */

.fh-footer {
  position: relative;
  padding-top: clamp(3rem, 6vw, 5rem);
}

.fh-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.4rem 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--fh-line-dark);
}

.fh-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.fh-footer-brand img {
  height: 2.4rem;
  width: auto;
  display: block;
}

.fh-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.9rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
}

.fh-footer-links a {
  color: rgba(247, 247, 247, 0.72);
  transition: color 180ms ease;
}

.fh-footer-links a:hover {
  color: #f7f7f7;
}

.fh-footer-meta {
  margin: 0;
  color: rgba(247, 247, 247, 0.48);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.fh-footer-word {
  display: block;
  margin: 0 auto -0.36em;
  padding: clamp(1.4rem, 3vw, 2.8rem) 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 12.4vw, 12.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.86;
  color: #f7f7f7;
  white-space: nowrap;
  user-select: none;
}

.fh-footer-word em {
  font-style: normal;
  color: var(--fh-accent);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 980px) {
  .fh-app-row,
  .fh-app-row-flip {
    grid-template-columns: 1fr;
    gap: 1.9rem;
  }

  .fh-app-row .fh-app-visual,
  .fh-app-row-flip .fh-app-visual {
    order: -1;
  }

  .fh-app-summary {
    max-width: 40rem;
  }

  .fh-stack-card {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    --stack-offset: 3.4rem;
  }

  .fh-stack-copy h3 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .fh-marquee {
    padding-bottom: 3.6rem;
  }

  .fh-app-frame-wrap {
    width: 84%;
  }

  .fh-app-visual {
    min-height: 17rem;
  }

  .fh-stack-card {
    position: static;
    padding: 1.6rem 1.4rem;
  }

  .fh-stack-visual {
    min-height: 15rem;
  }

  .fh-stack-photo {
    position: relative;
    min-height: 15rem;
  }

  .fh-btn {
    width: auto;
  }

  .fh-footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .fh-marquee-track {
    animation: none;
  }

  .fh-app-frame,
  .fh-mini-card,
  .fh-btn,
  .fh-btn svg,
  .fh-link {
    transition: none;
  }
}
