/*
 * Community landing (/community). Class prefix fc- = free community landing.
 * Palette of the coaching portal
 * (apps/coaching `.portal`: #f8f9fb ground, brand blue #0066ff) + its dark band.
 * Layout: 1200px container; hero is one centered column with the Whop checkout under the copy.
 * Sections, in page order: base, shared bits, hero, join card, features, reviews, band, footer.
 */
:root {
  --bg: #f8f9fb;
  --card: #ffffff;
  --fg: hsl(222 40% 11%);
  --muted: hsl(220 12% 44%);
  --subtle: hsl(220 12% 58%);
  --border: hsl(220 20% 91%);
  --blue: #0066ff;
  --blue-hover: #0052cc;
  --blue-soft: hsl(216 100% 96%);
  --on-blue: #ffffff;
  --tp: #00b67a;
  --band: #0b0b10;
  --band-fg: #f8fafc;
  --band-muted: #a3b0c2;
  --band-ring: rgba(248, 250, 252, 0.12);
  --skeleton: hsl(220 20% 94%);
  --skeleton-hi: hsl(220 20% 97%);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 40px 80px -24px rgba(16, 24, 40, 0.22);
  --shadow-blue: 0 10px 32px -6px rgba(0, 102, 255, 0.45);
  --shadow-blue-strong: 0 10px 32px -6px rgba(0, 102, 255, 0.55);
  --radius: 16px;
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 7.5rem);
}

/* ─── Base ─── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

p {
  margin: 0;
}

/* ─── Shared bits ─── */
.fc-wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.fc-blue {
  color: var(--blue);
}

.fc-section {
  margin-top: var(--section);
}

.fc-h2 {
  margin: 0 0 2.5rem;
  text-align: center;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  border-radius: 14px;
  background: var(--blue);
  color: var(--on-blue);
  font-size: 1.0625rem;
  font-weight: 700;
  transition: background 0.2s;
}

.fc-btn:hover {
  background: var(--blue-hover);
}

.fc-btn svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-btn--block {
  width: 100%;
}

.fc-btn--wide {
  min-width: 13rem;
  padding: 1.1rem 2.25rem;
  border-radius: 18px;
}

/* Trustpilot rating badge: "4.8 ★★★★★ Trustpilot" (hero and reviews head). */
.fc-tp {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg);
}

.fc-tp__score {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Star strip SVGs fill with currentColor. */
.fc-tp__stars {
  display: block;
  width: 7.5rem;
  height: auto;
  color: var(--tp);
}

.fc-tp__stars--sm {
  width: 6rem;
}

.fc-tp__brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Overlapping closer faces + count (hero and band). */
.fc-people {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.fc-people b {
  color: var(--fg);
}

.fc-faces {
  display: flex;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fc-faces li + li {
  margin-left: -0.6rem;
}

.fc-faces img {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 3px solid var(--bg);
  object-fit: cover;
}

/* ─── Hero ─── */
.fc-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.fc-title {
  margin: 1.5rem 0 0;
  font-size: clamp(2.4rem, 5.4vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

/* Two lines on wide screens: "… high ticket sales" / "più grande d'Italia". */
@media (min-width: 900px) {
  .fc-title .fc-blue {
    display: block;
  }
}

.fc-lead {
  max-width: 46rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* Hero: faces on one line, the count under them. */
.fc-people--stack {
  flex-direction: column;
  gap: 0.6rem;
}

/* ─── Join card (the Whop form: the main element of the page) ─── */
.fc-join {
  width: 100%;
  max-width: 760px;
  margin-top: clamp(2.25rem, 5vw, 3rem);
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.25rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  text-align: left;
  scroll-margin-top: 1.5rem;
}

/* Card header: Academy chip (left) | "Entra gratis su Whop" (right). Stacked on phones. */
.fc-join__head {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.fc-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  padding-right: clamp(1.25rem, 3vw, 2rem);
  border-right: 1px solid var(--border);
  text-align: center;
}

.fc-chip__img {
  width: 6.5rem;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  object-fit: cover;
}

.fc-chip__name {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

/* Whop and Discord marks in a soft grey, separated by a dot. */
.fc-chip__on {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--subtle);
  font-weight: 700;
}

.fc-chip__whop {
  width: 1.05rem;
  height: auto;
}

.fc-chip__discord {
  width: 0.95rem;
  height: auto;
}

.fc-join__cta {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.fc-join__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.fc-whop {
  width: auto;
  height: 1.3em;
  margin-top: 0.15em;
  color: var(--fg);
}

.fc-join__meta {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .fc-join__head {
    flex-direction: column;
  }

  .fc-chip {
    padding-right: 0;
    border-right: 0;
  }
}

/* While loading, the frame holds the form's usual height (335px) under a skeleton; once Whop's
   form is in (.is-ready, set by the page script), it wraps the iframe exactly so the rounded
   corners clip it on all four sides. */
.fc-join__frame {
  position: relative;
  min-height: 335px;
  overflow: hidden;
  border-radius: 14px;
}

.fc-join.is-ready .fc-join__frame {
  min-height: 0;
}

#whop-checkout-embed {
  opacity: 0;
  transition: opacity 0.35s ease;
}

#whop-checkout-embed iframe {
  display: block;
}

/* Whop's iframe starts taller than the form (480px) and shrinks once loaded: keep it out of the
   layout until then, so the card holds the skeleton's height. */
.fc-join:not(.is-ready) #whop-checkout-embed {
  position: absolute;
  inset: 0 0 auto;
}

.fc-join.is-ready #whop-checkout-embed {
  opacity: 1;
}

.fc-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: opacity 0.35s ease;
}

.fc-skeleton span {
  display: block;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-hi) 50%, var(--skeleton) 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.4s ease-in-out infinite;
}

.fc-skeleton__label {
  width: 7rem;
  height: 0.9rem;
  margin-top: 0.6rem;
}

.fc-skeleton__field {
  height: 2.9rem;
}

.fc-skeleton__button {
  height: 3.4rem;
  margin-top: 1.4rem;
  border-radius: 12px;
}

/* Faded out and no longer animating once the form is in. */
.fc-join.is-ready .fc-skeleton {
  opacity: 0;
  pointer-events: none;
}

.fc-join.is-ready .fc-skeleton span {
  animation: none;
}

@keyframes fc-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* Plain checkout link, shown only without JS (<noscript> style in the head) or when Whop's
   script never mounted the form (.is-failed). */
.fc-join__fallback {
  display: none;
}

.fc-join.is-failed .fc-join__fallback {
  display: flex;
}

/* After the join (.is-done): a one-line status replaces the form while the page leaves for
   Whop's sign-in. */
.fc-join.is-done .fc-join__frame {
  display: none;
}

.fc-join__done {
  margin: 0;
  padding: 1.25rem 0 0.25rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.fc-join__done b {
  color: var(--fg);
}

.fc-join__done a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Reads as the first line of Whop's form below it: its label size and grey, its left inset. */
.fc-join__hint {
  margin: 0 0 0.25rem;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #60646c;
}

.fc-join__hint svg {
  flex: none;
  width: 1.15rem;
  height: auto;
  color: #8b8d98;
}

.fc-join.is-done .fc-join__hint,
.fc-join.is-failed .fc-join__hint {
  display: none;
}

/* Same text as Whop's own notice just above it (13px, tight leading, its neutral grey, plain
   links), right under it, so the two read as one block. */
.fc-join__legal {
  margin: 0.3rem 0 0;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.09px;
  color: #838383;
  text-align: center;
}

.fc-join__legal a {
  color: inherit;
}

.fc-join.is-done .fc-join__legal {
  display: none;
}

/* ─── Cosa trovi dentro ─── */
.fc-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.fc-feature {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fc-feature__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--blue-soft);
}

.fc-feature__icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-feature h3 {
  margin: 1.4rem 0 0.4rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fc-feature p {
  font-size: 0.975rem;
  color: var(--muted);
}

/* Scroll reveal (classes set by the page script): one card after the other. */
.fc-features.is-hidden .fc-feature {
  opacity: 0;
  transform: translateY(20px);
}

.fc-features.is-shown .fc-feature {
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fc-features.is-shown .fc-feature:nth-child(2) {
  transition-delay: 0.25s;
}

.fc-features.is-shown .fc-feature:nth-child(3) {
  transition-delay: 0.5s;
}

.fc-features.is-shown .fc-feature:nth-child(4) {
  transition-delay: 0.75s;
}

.fc-section-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.fc-section-cta .fc-btn {
  box-shadow: var(--shadow-blue);
}

@media (max-width: 1100px) {
  .fc-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .fc-features {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ─── Reviews ─── */
.fc-section__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}

.fc-section__head .fc-h2 {
  margin: 0;
}

/* Full-bleed marquee; the track holds the cards twice (copy added by the page script) and
   slides by half its width, so the loop is seamless. */
.fc-marquee {
  margin-top: 2.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.fc-marquee__track {
  --marquee-gap: 1.25rem;
  display: flex;
  gap: var(--marquee-gap);
  width: max-content;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  animation: fc-scroll 135s linear infinite;
}

.fc-marquee:hover .fc-marquee__track,
.fc-marquee:focus-within .fc-marquee__track {
  animation-play-state: paused;
}

@keyframes fc-scroll {
  to {
    transform: translateX(calc(-50% - var(--marquee-gap) / 2));
  }
}

.fc-review {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 23rem;
  padding: 1.6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fc-review p {
  flex: 1;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.fc-review__who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.fc-review__avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* Small Trustpilot links; the vertical padding brings the tap target to ~28px. */
.fc-review__verify,
.fc-seeall a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-block: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}

.fc-review__verify:hover,
.fc-seeall a:hover {
  color: var(--tp);
}

.fc-review__verify svg,
.fc-seeall svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-seeall {
  margin-top: 1.5rem;
  text-align: center;
}

.fc-seeall a {
  font-size: 0.9375rem;
}

@media (max-width: 600px) {
  .fc-review {
    width: 18.5rem;
  }

  .fc-marquee__track {
    animation-duration: 95s;
  }
}

/* ─── Closing band: photo (left) | title, text, faces, CTA ─── */
.fc-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.75rem, 5vw, 4rem);
  padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.75rem, 5vw, 4rem);
  background: var(--band);
  color: var(--band-fg);
  border-radius: 28px;
}

.fc-band__photo {
  display: block;
  width: clamp(8rem, 16vw, 12rem);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 999px;
  border: 4px solid var(--band-ring);
}

/* Zoomed on head and shoulders (the source is a full-length portrait). */
.fc-band__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  transform: scale(1.35);
  transform-origin: 50% 16%;
}

.fc-band__body {
  min-width: 0;
}

.fc-band__title {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.fc-band__body > p {
  max-width: 36rem;
  margin-top: 0.75rem;
  font-size: clamp(1.0625rem, 1.8vw, 1.2rem);
  color: var(--band-muted);
}

/* One row: faces centred in the free space, "Entra gratis" right-aligned. */
.fc-band__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 1.5rem;
}

.fc-band__actions .fc-people {
  justify-self: center;
}

.fc-people--band {
  margin-top: 0;
  white-space: nowrap;
  font-size: 1rem;
  color: var(--band-muted);
}

.fc-people--band .fc-faces img {
  width: 2.5rem;
  height: 2.5rem;
  border-color: var(--band);
}

.fc-band .fc-btn {
  margin-top: 2rem;
  box-shadow: var(--shadow-blue-strong);
}

@media (max-width: 760px) {
  .fc-band {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .fc-band__body {
    width: 100%;
  }

  .fc-band__body > p {
    margin-inline: auto;
  }

  .fc-band__actions {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .fc-band__actions .fc-btn {
    justify-self: stretch;
    width: 100%;
  }

  /* Phones: faces on one line, "e altri 600+" under them. */
  .fc-people--band {
    flex-direction: column;
    gap: 0.5rem;
  }

  .fc-people--band .fc-faces img {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* ─── Footer ─── */
.fc-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  padding-block: 1.5rem 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.fc-footer nav {
  display: flex;
  gap: 1.5rem;
}

/* Vertical padding for a ~28px tap target (footer padding trimmed by the same amount). */
.fc-footer a {
  display: inline-block;
  padding-block: 0.25rem;
}

.fc-footer a:hover {
  color: var(--fg);
}

/* ─── Reduced motion: no marquee (the row scrolls by hand instead), no shimmer, no smooth
   scroll. The reveal is skipped by the page script. ─── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fc-marquee__track,
  .fc-skeleton span {
    animation: none;
  }

  .fc-marquee {
    overflow-x: auto;
  }
}
