/*
 * Falepay public layout architecture.
 *
 * This file owns section geometry only. Component styling stays in
 * homepage.css and theme colors stay in appearance-theme.css. Every public
 * section uses a full-width surface with one centered inner shell; the hero
 * remains the only visual entry point with its own sizing rules.
 */

body.public-home #home {
  --public-shell-width: 1184px;
  --public-shell-gutter: 48px;
  --public-section-y: clamp(72px, 8svh, 104px);
}

body.public-home #home > main {
  display: block;
}

body.public-home #home > main > .section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-block: var(--public-section-y);
}

body.public-home #home > main > .section > .public-section-inner {
  width: min(var(--public-shell-width), calc(100% - (var(--public-shell-gutter) * 2)));
  margin-inline: auto;
}

/* Content-led sections share one vertical rhythm instead of mixing viewport
   sizing, shell sizing and component padding on the same element. */
body.public-home #home > main > #product,
body.public-home #home > main > #start,
body.public-home #home > main > #pricing,
body.public-home #home > main > #developers,
body.public-home #home > main > #contact {
  min-height: auto;
  display: block;
  justify-content: initial;
}

body.public-home #home > main > #product .section-top,
body.public-home #home > main > #start .section-top {
  margin-bottom: clamp(36px, 4.5svh, 58px);
}

body.public-home #home > main > #product .product-panel {
  min-height: 366px;
}

body.public-home #home > main > #pricing .center-heading,
body.public-home #home > main > #contact .faq-layout {
  width: 100%;
}

body.public-home #home > main > #pricing .pricing-grid {
  margin-top: clamp(36px, 4.5svh, 52px);
}

body.public-home #home > main > #developers .developer-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
}

body.public-home #home > main > #developers .developer-copy {
  max-width: 510px;
}

body.public-home #home > main > #developers .code-window {
  min-width: 0;
}

body.public-home #home > main > #contact .closing {
  margin-top: clamp(64px, 8svh, 96px);
}

@media (max-width: 1100px) {
  body.public-home #home {
    --public-shell-gutter: 32px;
  }

  body.public-home #home > main > #developers .developer-layout {
    gap: 48px;
  }
}

@media (max-width: 800px) {
  body.public-home #home {
    --public-shell-gutter: 20px;
    --public-section-y: 72px;
  }

  body.public-home #home > main > #developers .developer-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  body.public-home #home > main > #developers .developer-copy {
    max-width: none;
  }
}

@media (max-width: 600px) {
  body.public-home #home {
    --public-shell-gutter: 20px;
    --public-section-y: 60px;
  }

  body.public-home #home > main > #product .section-top,
  body.public-home #home > main > #start .section-top {
    margin-bottom: 32px;
  }

  body.public-home #home > main > #contact .closing {
    margin-top: 60px;
  }
}

/* Scenario-led homepage architecture: clear choices, calm surfaces, and
   restrained motion that makes the next action easier to spot. */
body.public-home #home {
  --scene-ink: #13242a;
  --scene-muted: #52636a;
  --scene-surface: #ffffff;
  --scene-soft: #f5f8f8;
  --scene-line: #dce6e8;
  --scene-accent: #167d70;
  --scene-accent-soft: #e7f7f1;
  --scene-shadow: 0 22px 55px -34px rgba(22, 59, 64, .34);
}
body.public-home #home .scenario-section,
body.public-home #home .methods-section,
body.public-home #home .funds-section { position: relative; overflow: hidden; }
body.public-home #home .scenario-section { background: linear-gradient(180deg, #fbfdfd 0%, #f5f8f8 100%); border-block: 1px solid var(--scene-line); }
body.public-home #home .scenario-section::before,
body.public-home #home .funds-section::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -220px;
  top: -250px;
  border: 1px solid rgba(22, 125, 112, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 72px rgba(22, 125, 112, .035), 0 0 0 144px rgba(22, 125, 112, .018);
  pointer-events: none;
}
body.public-home #home .scenario-heading { margin-bottom: 34px; }
body.public-home #home .scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 1; }
body.public-home #home .scenario-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--scene-line);
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--scene-shadow);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease, border-color .3s ease;
}
body.public-home #home .scenario-card:hover,
body.public-home #home .scenario-card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(22, 125, 112, .42);
  box-shadow: 0 30px 64px -36px rgba(22, 125, 112, .42);
}
body.public-home #home .scenario-meta { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 0; color: var(--scene-muted); }
body.public-home #home .scene-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border: 1px solid rgba(22, 125, 112, .22); border-radius: 10px; color: var(--scene-accent); background: var(--scene-accent-soft); }
body.public-home #home .scene-icon .icon { width: 17px; height: 17px; }
body.public-home #home .scene-index,
body.public-home #home .method-number { font: 700 11px/1 "DM Mono", monospace; letter-spacing: .08em; color: var(--scene-accent); }
body.public-home #home .scenario-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 420;
  object-fit: cover;
  margin-top: 10px;
  background: var(--scene-surface);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
body.public-home #home .scenario-card:hover > img { transform: scale(1.035) translateY(-2px); }
body.public-home #home .scenario-content { padding: 0 20px 22px; }
body.public-home #home .scenario-kicker { margin-bottom: 8px; color: var(--scene-accent); font: 700 10px/1.3 "DM Mono", monospace; letter-spacing: .08em; }
body.public-home #home .scenario-content h3 { font-size: 20px; letter-spacing: -.04em; }
body.public-home #home .scenario-content > p:not(.scenario-kicker) { margin-top: 10px; min-height: 48px; color: var(--scene-muted); font-size: 13px; line-height: 1.75; }
body.public-home #home .scenario-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
body.public-home #home .scenario-tags span { padding: 5px 8px; border-radius: 999px; background: var(--scene-soft); color: var(--scene-muted); font-size: 10px; line-height: 1.2; }
body.public-home #home .scenario-footnote { display: flex; align-items: center; gap: 9px; margin-top: 24px; color: var(--scene-muted); font-size: 11px; position: relative; z-index: 1; }
body.public-home #home .scenario-footnote > .icon { width: 15px; height: 15px; color: var(--scene-accent); }
body.public-home #home .scenario-footnote .text-link { margin-left: auto; color: var(--scene-accent); font-size: 12px; white-space: nowrap; }
body.public-home #home .methods-section { background: var(--scene-surface); }
body.public-home #home .method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.public-home #home .method-card {
  min-width: 0;
  padding: 25px 24px 22px;
  border: 1px solid var(--scene-line);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255,255,255,.98), var(--scene-soft));
  transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .4s ease;
}
body.public-home #home .method-card:hover,
body.public-home #home .method-card:focus-within { transform: translateY(-5px); border-color: rgba(22, 125, 112, .36); box-shadow: var(--scene-shadow); }
body.public-home #home .method-heading { display: flex; align-items: center; gap: 11px; margin-top: 18px; }
body.public-home #home .method-heading h3 { font-size: 22px; }
body.public-home #home .method-card > p { min-height: 71px; margin-top: 16px; color: var(--scene-muted); font-size: 13px; line-height: 1.75; }
body.public-home #home .method-card dl { margin: 20px 0 18px; padding-top: 15px; border-top: 1px solid var(--scene-line); display: grid; gap: 10px; }
body.public-home #home .method-card dl div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
body.public-home #home .method-card dt { color: var(--scene-muted); font-size: 11px; }
body.public-home #home .method-card dd { margin: 0; color: var(--scene-ink); font-size: 12px; font-weight: 650; text-align: right; }
body.public-home #home .method-card .text-link { color: var(--scene-accent); font-size: 12px; }
body.public-home #home .funds-section { background: linear-gradient(180deg, #f7fbfa 0%, #ffffff 100%); border-block: 1px solid var(--scene-line); }
body.public-home #home .funds-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(42px, 7vw, 102px); align-items: center; position: relative; z-index: 1; }
body.public-home #home .funds-copy h2 span { color: var(--scene-accent); }
body.public-home #home .funds-copy > p:not(.eyebrow) { margin-top: 22px; max-width: 460px; color: var(--scene-muted); font-size: 14px; line-height: 1.9; }
body.public-home #home .funds-points { display: grid; gap: 14px; margin: 28px 0 26px; }
body.public-home #home .funds-points > div { display: flex; gap: 11px; align-items: flex-start; }
body.public-home #home .funds-points strong { display: block; font-size: 13px; }
body.public-home #home .funds-points small { display: block; margin-top: 4px; color: var(--scene-muted); font-size: 11px; line-height: 1.55; }
body.public-home #home .funds-points .scene-icon { width: 28px; height: 28px; border-radius: 8px; }
body.public-home #home .funds-points .scene-icon .icon { width: 14px; height: 14px; }
body.public-home #home .funds-copy > .text-link { color: var(--scene-accent); font-size: 12px; }
body.public-home #home .funds-visual { position: relative; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
body.public-home #home .funds-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 420;
  object-fit: cover;
  background: transparent;
  -webkit-mask-image: none;
  mask-image: none;
  filter: drop-shadow(0 22px 34px rgba(14, 54, 62, .16));
  transition: transform .75s cubic-bezier(.2,.7,.2,1), filter .75s ease;
}
body.public-home #home .funds-visual:hover img { transform: scale(1.02); }
body.public-home #home .visual-badge { position: absolute; left: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(16, 29, 33, .78); color: #eefbf7; font-size: 10px; backdrop-filter: blur(10px); }
body.public-home #home .visual-badge .status-dot { width: 5px; height: 5px; background: #75dec2; }
body.public-home #home .reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1); }
body.public-home #home .reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
body.public-home #home .scenario-card:nth-child(2),
body.public-home #home .method-card:nth-child(2) { transition-delay: 70ms; }
body.public-home #home .scenario-card:nth-child(3),
body.public-home #home .method-card:nth-child(3) { transition-delay: 140ms; }
body.public-home #home .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
body.public-home #home .steps li { min-width: 0; }
body.public-home #home .steps li:not(:last-child)::after { content: ""; position: absolute; top: 9px; right: -22px; width: 22px; height: 1px; background: var(--scene-line); }
body.public-home #home .steps li .step-number { position: relative; z-index: 1; display: inline-flex; align-items: center; min-width: 25px; min-height: 18px; background: var(--scene-soft); }
@media (max-width: 980px) {
  body.public-home #home .scenario-grid,
  body.public-home #home .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.public-home #home .scenario-card:last-child,
  body.public-home #home .method-card:last-child { grid-column: 1 / -1; }
  body.public-home #home .funds-layout { grid-template-columns: 1fr; gap: 42px; }
  body.public-home #home .funds-copy { max-width: 620px; }
  body.public-home #home .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
  body.public-home #home .steps li:nth-child(3)::after { display: none; }
}
@media (max-width: 700px) {
  body.public-home #home .scenario-grid,
  body.public-home #home .method-grid { grid-template-columns: 1fr; }
  body.public-home #home .scenario-card:last-child,
  body.public-home #home .method-card:last-child { grid-column: auto; }
  body.public-home #home .scenario-content > p:not(.scenario-kicker),
  body.public-home #home .method-card > p { min-height: 0; }
  body.public-home #home .scenario-footnote { align-items: flex-start; flex-wrap: wrap; }
  body.public-home #home .scenario-footnote .text-link { width: 100%; margin-left: 24px; }
  body.public-home #home .steps { grid-template-columns: 1fr; gap: 0; }
  body.public-home #home .steps li { padding: 0 0 25px 40px; border-top: 0; border-left: 1px solid var(--scene-line); }
  body.public-home #home .steps li:last-child { padding-bottom: 0; border-left-color: transparent; }
  body.public-home #home .steps li:not(:last-child)::after { top: 20px; right: auto; left: -1px; width: 1px; height: calc(100% - 20px); }
  body.public-home #home .steps li .step-number { position: absolute; left: -13px; top: 0; padding: 4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.public-home #home .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  body.public-home #home .scenario-card,
  body.public-home #home .method-card,
  body.public-home #home .scenario-card > img,
  body.public-home #home .funds-visual img { transition: none; }
}

/* Motion layer: calm, pointer-aware polish for the public homepage. The
   motion is presentation-only and is disabled for reduced-motion users. */
body.public-home #home .site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--page-progress, 0));
  transform-origin: left center;
  opacity: .78;
  pointer-events: none;
}
body.public-home #home .header-inner nav a {
  position: relative;
  transition: color .22s ease;
}
body.public-home #home .header-inner nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .32s cubic-bezier(.2,.7,.2,1);
}
body.public-home #home .header-inner nav a.is-active,
body.public-home #home .header-inner nav a[aria-current="page"] { color: var(--accent); }
body.public-home #home .header-inner nav a.is-active::after,
body.public-home #home .header-inner nav a[aria-current="page"]::after { transform: scaleX(1); }

body.public-home #home.motion-enabled .hero-copy > * {
  animation: falepay-home-enter .72s cubic-bezier(.2,.7,.2,1) both;
}
body.public-home #home.motion-enabled .hero-copy > :nth-child(1) { animation-delay: 40ms; }
body.public-home #home.motion-enabled .hero-copy > :nth-child(2) { animation-delay: 110ms; }
body.public-home #home.motion-enabled .hero-copy > :nth-child(3) { animation-delay: 180ms; }
body.public-home #home.motion-enabled .hero-copy > :nth-child(4) { animation-delay: 250ms; }
body.public-home #home.motion-enabled .hero-copy > :nth-child(5) { animation-delay: 320ms; }
body.public-home #home.motion-enabled .hero-copy > :nth-child(6) { animation-delay: 390ms; }
body.public-home #home.motion-enabled .hero-visual {
  animation: falepay-home-visual-in .72s cubic-bezier(.2,.7,.2,1) 180ms both;
}
@keyframes falepay-home-enter {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes falepay-home-visual-in {
  from { opacity: 0; filter: blur(2px); }
  to { opacity: 1; filter: blur(0); }
}

body.public-home #home .hero-copy,
body.public-home #home .growth-visual,
body.public-home #home .funds-visual { will-change: transform; }
body.public-home #home .hero-copy { transform: translate3d(0, var(--hero-copy-shift, 0px), 0); }
body.public-home #home .growth-visual { transform: translate3d(0, var(--hero-visual-shift, 0px), 0); }
body.public-home #home .funds-visual img { transform: translate3d(0, var(--funds-image-shift, 0px), 0); }
body.public-home #home .funds-visual:hover img { transform: translate3d(0, var(--funds-image-shift, 0px), 0) scale(1.02); }

@media (hover: hover) and (pointer: fine) {
  body.public-home #home .scenario-card,
  body.public-home #home .method-card { transform-style: preserve-3d; }
  body.public-home #home .scenario-card:hover,
  body.public-home #home .scenario-card:focus-visible { transform: translate3d(0, -7px, 0) rotateX(var(--pointer-rotate-x, 0deg)) rotateY(var(--pointer-rotate-y, 0deg)); }
  body.public-home #home .method-card:hover,
  body.public-home #home .method-card:focus-within { transform: translate3d(0, -5px, 0) rotateX(var(--pointer-rotate-x, 0deg)) rotateY(var(--pointer-rotate-y, 0deg)); }
}

@media (prefers-reduced-motion: reduce) {
  body.public-home #home .site-header::after,
  body.public-home #home .header-inner nav a::after { transition: none; }
  body.public-home #home.motion-enabled .hero-copy > *,
  body.public-home #home.motion-enabled .hero-visual { animation: none; filter: none; }
  body.public-home #home .hero-copy,
  body.public-home #home .growth-visual,
  body.public-home #home .funds-visual,
  body.public-home #home .funds-visual img { transform: none; }
}
