/* ==========================================================================
   Homepage sections (layout modelled on the approved reference template)
   ========================================================================== */

/* ---------- Hero: copy on the left, enquiry form card on the right ---------- */
/* Brand gradient background (owner request, 2026-12-02: the plain background felt flat).
   Soft yellow on the left blending into a light red on the right, with blurred red / yellow
   glows behind the form. Kept light so the dark heading and body text stay easy to read. */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 45% 55% at 88% 18%, rgba(200, 32, 38, 0.2) 0%, rgba(200, 32, 38, 0) 70%),
    radial-gradient(ellipse 40% 45% at 72% 95%, rgba(255, 212, 0, 0.32) 0%, rgba(255, 212, 0, 0) 70%),
    radial-gradient(ellipse 38% 50% at 0% 0%, rgba(255, 212, 0, 0.26) 0%, rgba(255, 212, 0, 0) 70%),
    radial-gradient(ellipse 30% 40% at 30% 100%, rgba(200, 32, 38, 0.08) 0%, rgba(200, 32, 38, 0) 70%),
    linear-gradient(115deg, #fff9ea 0%, #fffaf4 40%, #fff1ef 72%, #fde4e4 100%);
}

/* Faint dot grid over the gradient, fading out towards the text side */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(200, 32, 38, 0.16) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 75%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 75%);
  pointer-events: none;
}

/* Logo-inspired peaks behind the form, very faint */
.hero::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -30px;
  width: min(560px, 90vw);
  height: 300px;
  z-index: -1;
  background: var(--red);
  opacity: 0.07;
  clip-path: polygon(0 100%, 25% 15%, 40% 65%, 50% 30%, 60% 65%, 75% 15%, 100% 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: 2.5rem;
  padding-block: 2.5rem 3rem;
}

.hero__copy {
  max-width: 36rem;
}

/* Lighter and smaller than the shared .display style (owner request, 2026-12-02):
   was 800 weight, up to 3.9rem (62px); now 700, up to 3.25rem (52px). */
.hero__title {
  font-weight: 700;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero__title .accent {
  display: block;
}

.hero__text {
  margin-top: 1.25rem;
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 32rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (max-width: 479px) {
  .hero__actions .btn {
    width: 100%;
  }
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin-top: 2rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* Row of five stars above the avatars (owner request, 2026-12-02) */
.hero__stars {
  display: flex;
  flex: 0 0 100%;
  gap: 3px;
  color: var(--yellow-deep);
}

.hero__stars .icon {
  width: 18px;
  height: 18px;
}

.hero__proof strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.avatar-stack {
  display: flex;
  flex: none;
}

.avatar-stack li + li {
  margin-left: -12px;
}

.avatar-stack img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--paper-2);
}

/* Enquiry form card ("Need More Information") */
.hero__form {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--white);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -24px rgba(23, 23, 23, 0.35);
  scroll-margin-top: calc(var(--header-h) + 1rem);
  /* Slides up from below into place when the page opens (owner request, 2026-12-02) */
  animation: hero-form-rise 0.9s var(--ease) 0.2s both;
}

/* The fields follow the card up, one after another */
.hero__form .form > * {
  animation: hero-field-rise 0.7s var(--ease) both;
}

.hero__form .form > :nth-child(1) { animation-delay: 0.45s; }
.hero__form .form > :nth-child(2) { animation-delay: 0.52s; }
.hero__form .form > :nth-child(3) { animation-delay: 0.59s; }
.hero__form .form > :nth-child(4) { animation-delay: 0.66s; }
.hero__form .form > :nth-child(5) { animation-delay: 0.73s; }
.hero__form .form > :nth-child(n + 6) { animation-delay: 0.8s; }

@keyframes hero-form-rise {
  from {
    opacity: 0;
    transform: translateY(80px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-field-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Visitors who ask for reduced motion get the form straight away */
@media (prefers-reduced-motion: reduce) {
  .hero__form,
  .hero__form .form > * {
    animation: none;
  }
}

.hero__form-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.hero__form-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: var(--yellow);
}

.hero__form-badge .icon {
  width: 24px;
  height: 24px;
}

.hero__form-title {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 700; /* was 800 (owner request, 2026-12-02) */
  line-height: 1.2;
  color: var(--ink);
}

.hero__form .field textarea {
  min-height: 96px;
}

.hero__form :focus-visible {
  outline-color: var(--ink);
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    align-items: center;
    gap: clamp(2.5rem, 1rem + 4vw, 5rem);
    padding-block: 4rem;
  }

  /* The form is beside the copy, so the "Need More Information" jump button is not needed */
  .hero__info-link {
    display: none;
  }
}

/* ---------- Stats bar ---------- */
.stats {
  background: var(--red);
  color: var(--white);
}

.stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
  .stats__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stats__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.5rem 0.75rem;
}

@media (max-width: 899px) {
  .stats__item:nth-child(odd) {
    padding-left: 0;
  }

  .stats__item:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
}

@media (min-width: 900px) {
  .stats__item {
    justify-content: center;
    padding: 1.75rem 1rem;
  }

  .stats__item + .stats__item {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
  }
}

.stats__icon {
  width: 40px;
  height: 40px;
  color: var(--yellow);
}

.stats__item strong {
  display: block;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  font-weight: 800;
  line-height: 1.1;
}

.stats__item span {
  display: block;
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  max-width: 16rem;
}

/* ---------- About / Why MACSA ---------- */
.about__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .about__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 2rem + 3vw, 5rem);
  }
}

.about__body {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

.about__body .eyebrow {
  margin-bottom: 0;
}

.about__text {
  color: var(--ink-2);
}

.about__subhead {
  margin-top: 0.5rem;
  font-size: var(--fs-md);
  font-weight: 800;
}

.checklist {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
  }
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-2);
}

.checklist__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 0.05em;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
}

.checklist__mark .icon {
  width: 13px;
  height: 13px;
}

/* ---------- Events ---------- */
.event-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .event-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.event-grid > li {
  display: flex;
}

.event-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.event-card__media {
  display: block;
  overflow: hidden;
  background: var(--paper-2);
}

.event-card__media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.event-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem 1.3rem;
}

.event-card__date {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
}

.event-card__date .icon {
  width: 15px;
  height: 15px;
  color: var(--red);
}

.event-card__title {
  flex: 1;
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.35;
}

.event-card__title a {
  text-decoration: none;
}

.event-card__title a:hover {
  color: var(--red);
}

/* ---------- Enquiry banner ---------- */
.enquiry {
  padding-block: var(--section);
}

.enquiry__banner {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2.5rem;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  background: var(--red);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.92);
}

/* Logo-inspired yellow peaks, very faint */
.enquiry__banner::before {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 340px;
  height: 200px;
  background: var(--yellow);
  opacity: 0.1;
  clip-path: polygon(0 100%, 25% 15%, 40% 65%, 50% 30%, 60% 65%, 75% 15%, 100% 100%);
  pointer-events: none;
}

@media (min-width: 960px) {
  .enquiry__banner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 3.5rem;
  }
}

.enquiry__intro {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 1.25rem;
}

.enquiry__badge {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
  color: var(--yellow);
}

.enquiry__badge .icon {
  width: 28px;
  height: 28px;
}

.enquiry h2 {
  color: var(--white);
}

.enquiry__contact {
  display: grid;
  gap: 0.75rem;
}

.enquiry__contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 600;
}

.enquiry__contact .icon {
  margin-top: 0.2em;
  color: var(--yellow);
}

.enquiry__contact a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.enquiry__contact a:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.enquiry :focus-visible {
  outline-color: var(--yellow);
}

.enquiry__card {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--white);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: 0 24px 48px -24px rgba(23, 23, 23, 0.45);
}

.enquiry__card :focus-visible {
  outline-color: var(--ink);
}

.enquiry .field textarea {
  min-height: 110px;
}

/* ==========================================================================
   "Why Macsa?" highlight panel (owner request, 2026-12-02)
   Styled after the "Why LeadIAS?" panel on leadiasacademy.com: rounded red panel with a faint
   contour-line pattern (drawn for MACSA), white icon circles with a floating illustration and a
   slowly turning dotted ring, heading then points fading up in turn.
   ========================================================================== */
/* No bottom padding: the testimonials section below already adds its own top space,
   so the two paddings together left too big a gap (owner request, 2026-12-02) */
.why-macsa.section {
  padding-bottom: 0;
}

.why-panel {
  position: relative;
  overflow: hidden;
  /* Top padding reduced so the heading sits higher (owner request, 2026-12-02) */
  padding: clamp(2rem, 1.25rem + 2.5vw, 3.25rem) clamp(1.25rem, 0.5rem + 3vw, 3.5rem) clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  border-radius: 20px;
  background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='420' viewBox='0 0 640 420' fill='none' stroke='white' stroke-opacity='0.09' stroke-width='1.4'%3E%3Cpath d='M-20 40C90 0 170 90 290 50S500-10 660 60'/%3E%3Cpath d='M-20 80C90 40 170 130 290 90S500 30 660 100'/%3E%3Cpath d='M-20 120C90 80 170 170 290 130S500 70 660 140'/%3E%3Cpath d='M-20 160C90 120 170 210 290 170S500 110 660 180'/%3E%3Cpath d='M-20 200C80 240 200 150 320 200S520 260 660 210'/%3E%3Cpath d='M-20 240C80 280 200 190 320 240S520 300 660 250'/%3E%3Cpath d='M-20 280C80 320 200 230 320 280S520 340 660 290'/%3E%3Cpath d='M-20 320C90 280 170 370 290 330S500 270 660 340'/%3E%3Cpath d='M-20 360C90 320 170 410 290 370S500 310 660 380'/%3E%3Cpath d='M-20 400C90 360 170 450 290 410S500 350 660 420'/%3E%3C/svg%3E");
  background-size: 640px 420px;
  color: var(--white);
  text-align: center;
}

/* Brand peaks, very faint, bottom corners */
.why-panel::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: 300px;
  height: 160px;
  background: var(--yellow);
  opacity: 0.12;
  clip-path: polygon(0 100%, 25% 15%, 40% 65%, 50% 30%, 60% 65%, 75% 15%, 100% 100%);
  pointer-events: none;
}

.why-panel__title {
  color: var(--white);
}

/* Flex (not grid) so a part-filled last row is centred */
.why-points {
  --cols: 1;
  --gap-x: 1.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.75rem var(--gap-x);
}

/* Room so the dotted rings (19 px outside each circle) stay clear of the heading.
   Scoped to .why-panel so it outranks the global ul[role="list"] { margin: 0 } reset. */
.why-panel .why-points {
  margin-top: clamp(3.5rem, 2.75rem + 2.5vw, 4.75rem);
}

@media (min-width: 480px) {
  .why-points { --cols: 2; }
}

@media (min-width: 900px) {
  .why-points { --cols: 3; }
}

@media (min-width: 1180px) {
  .why-points { --cols: 5; }
}

.why-point {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap-x)) / var(--cols));
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1.5rem;
}

/* White circle with the illustration */
.why-point__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45);
  transition: transform var(--dur) var(--ease);
}

.why-point__icon img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  animation: why-float 4s ease-in-out infinite;
}

/* Dotted ring that slowly turns around the circle */
.why-point__icon::after {
  content: "";
  position: absolute;
  inset: -19px;
  border: 1.5px dashed rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  animation: why-spin 9s linear infinite;
  pointer-events: none;
}

/* Offset each point so they do not float in step */
.why-point:nth-child(2) .why-point__icon img { animation-delay: -0.8s; }
.why-point:nth-child(3) .why-point__icon img { animation-delay: -1.6s; }
.why-point:nth-child(4) .why-point__icon img { animation-delay: -2.4s; }
.why-point:nth-child(5) .why-point__icon img { animation-delay: -3.2s; }
.why-point:nth-child(even) .why-point__icon::after { animation-direction: reverse; }

/* Highlight badge for the concession figures (30%, 50%) */
.why-point__badge {
  position: absolute;
  top: -8px;
  right: -14px;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.45);
}

.why-point:hover .why-point__icon {
  transform: translateY(-4px) scale(1.04);
}

.why-point__title {
  max-width: 15rem;
  color: var(--white);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  font-weight: 700;
  line-height: 1.35;
}

@keyframes why-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes why-spin {
  to { transform: rotate(360deg); }
}

/* Heading fades in first, then the points one after another (slower, like the reference) */
.js .why-panel .reveal {
  transition-duration: 1s;
}

.js .why-points .why-point.reveal {
  transform: translateY(40px);
}

.js .why-points .why-point.reveal.is-visible {
  transform: none;
}

.why-panel :focus-visible {
  outline-color: var(--yellow);
}

@media (prefers-reduced-motion: reduce) {
  .why-point__icon img,
  .why-point__icon::after {
    animation: none;
  }
}
