/* ============================================================
   SDM School - FAQ
   Figma: SDM School Website Final / FAQ DESIGN (1441 x 8294)
   Shared tokens, header and footer live in styles.css.

   --u is one design pixel: 1px on the 1440 frame, scaling down with the
   screen. Positions and the big vertical gaps use it so the layout keeps
   the frame's proportions; text sizes use clamp() so copy stays legible.
   ============================================================ */

.page-faq {
  --nav-ink: #3934c9;                       /* the FAQ frame sets its menu in blue */
  --u: calc(min(100vw, 1440px) / 1440);
}

/* main starts at the top of the page; its padding is the header gap. The
   Figma frame left 118px (8.2vw) there, the site now leaves --hero-gap,
   so the line art (placed in frame coordinates) moves up by the same. */
.page-faq main {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding-top: var(--hero-gap);
  --frame-shift: calc(var(--hero-gap) - clamp(76px, 8.2vw, 118px));
}

.footer-links a[aria-current="page"] { color: var(--pink); }

/* Faint line art that sweeps behind the questions. */
.fq-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.fq-line {
  position: absolute;
  left: calc(50% + (var(--x) - 720) * var(--u));
  top: calc(var(--y) * var(--u) + var(--frame-shift, 0px));
  width: calc(var(--w) * var(--u));
  max-width: none;
  height: auto;
  rotate: var(--r, 0deg);
}

/* ============================================================
   Hero - pale pink band (y 118, 611 tall), cut by a white wave
   ============================================================ */
.fq-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: calc(611 * var(--u));
}
.fq-hero::before {
  content: '';
  position: absolute;
  inset: 0 -30px -40px;
  z-index: -2;
  background: rgba(225, 86, 127, 0.18);
  filter: blur(2px);
}
/* Figma: a 1622 x 1103 white shape 91px left of the frame and 166px
   below the band's top; anchored to the band's foot (445u up) so a
   taller band on phones keeps the curve along its bottom. */
.fq-wave {
  position: absolute;
  z-index: -1;
  left: calc(-91 * var(--u));
  top: calc(100% - 445 * var(--u));
  width: calc(1622 * var(--u));
  max-width: none;
  height: auto;
  pointer-events: none;
}

.fq-hero-inner { height: 100%; }
.fq-hero-inner > * { position: absolute; }
.fq-character { left: calc(529 * var(--u)); top: calc(21 * var(--u)); width: calc(211 * var(--u)); height: auto; }
.fq-shadow    { left: calc(608 * var(--u)); top: calc(293 * var(--u)); width: calc(113 * var(--u)); height: calc(10 * var(--u)); opacity: 0.4; }
.fq-title {
  left: calc(744 * var(--u));
  top: calc(256 * var(--u));
  font-size: var(--fs-title);
  line-height: 1.15;
  color: var(--navy);
}
.fq-title abbr { text-decoration: none; }

/* ============================================================
   The questions - seven groups, each with its own dot colour
   ============================================================ */
.fq-body {
  position: relative;
  margin-top: calc(-136 * var(--u));      /* "About SDM" sits on the wave's white */
  padding: 0 20px max(80px, calc(240 * var(--u))) calc(180 * var(--u));
}

.fq-group { --dot: var(--pink); }
.fq-group + .fq-group { margin-top: max(72px, calc(205 * var(--u))); }
.fq-group--pink   { --dot: var(--pink); }
.fq-group--orange { --dot: var(--tangerine); }
.fq-group--red    { --dot: var(--orange); }
.fq-group--blue   { --dot: var(--mist-line); }

.fq-group-title {
  font-size: var(--fs-title);
  line-height: 1.15;
  color: var(--navy);
}

.fq-list {
  display: flex;
  flex-direction: column;
  gap: max(20px, calc(36 * var(--u)));
  margin-top: max(24px, calc(63 * var(--u)));
  padding-left: calc(28 * var(--u));
}
/* The first group is spaced more loosely in the design. */
.fq-group:first-child .fq-list { gap: max(24px, calc(56 * var(--u))); }
.fq-list li {
  position: relative;
  padding-left: calc(18px + max(14px, calc(22 * var(--u))));
}
/* The coloured dot, centred on the question's first line. */
.fq-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(0.61em - 9.5px);             /* half the 1.22 line, less half the dot */
  width: 18px;
  height: 19px;
  border-radius: 57px;
  background: var(--dot);
  font-size: var(--fs-h3);
  transition: transform 0.4s var(--ease-out);
}
.fq-list li:hover::before { transform: scale(1.25); }

.fq-list h3 {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.22;
  color: var(--grey-dark);
}
.fq-list p {
  max-width: 810px;
  margin-top: max(6px, calc(14 * var(--u)));
  font-size: var(--fs-lede);
  line-height: 1.22;
  color: var(--grey);
}
.fq-list a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  transition: color var(--dur) var(--ease);
}
.fq-list a:hover { color: var(--pink); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 760px) {
  .fq-lines { display: none; }

  /* The band grows to fit the character and title, centred. */
  .fq-hero { height: auto; padding: 20px 20px calc(445 * var(--u) + 8px); }
  .fq-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
  }
  .fq-hero-inner > * { position: static; }
  .fq-shadow { display: none; }
  .fq-character { width: 120px; }
  .fq-title { margin-bottom: 18px; }

  .fq-body { margin-top: 16px; padding-left: 20px; }
  .fq-list { padding-left: 0; }
}
