/* Student Results — editorial page built from the Greenhills design system. */
.results-page {
  --results-navy: var(--legacy-panel);
  --results-ink: var(--legacy-ink);
  --results-accent: var(--sage);
  --results-mist: var(--blue-100);
}

.results-page .site-header,
.results-page .site-header.navigating {
  color: var(--results-ink);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 1px 0 rgba(11, 45, 92, .1);
  backdrop-filter: blur(16px);
}
.results-page .site-header .logo-light { display: none; }
.results-page .site-header .logo-dark { display: block; }
.results-page main h1,
.results-page main h2,
.results-page main h3 { color: var(--results-ink); }

.results-hero {
  min-height: 490px;
  margin-top: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff;
  overflow: hidden;
}
.results-hero-copy {
  align-self: center;
  padding: 3rem clamp(2rem, 3.5vw, 4.5rem);
  position: relative;
  z-index: 1;
}
.results-hero-copy h1 {
  max-width: 760px;
  margin: 0 0 1.8rem;
  font-size: clamp(3rem, 4.2vw, 4.5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: 0;
}
.results-hero-copy h1::after,
.rank-feature-heading h2::after,
.senior-results-band h2::after {
  content: "";
  display: block;
  width: 82px;
  height: 3px;
  margin-top: 1.65rem;
  background: var(--results-accent);
}
.results-hero-copy > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
  line-height: 1.65;
}
.results-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.2rem;
  margin-top: 2rem;
}
.results-hero-links a,
.senior-results-band a {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  padding: .35rem 0 .55rem;
  border-bottom: 1px solid currentColor;
  color: var(--results-ink);
  font-family: var(--font-ui);
  font-size: .96rem;
  font-weight: 500;
  line-height: 1.3;
}
.results-hero-links a span,
.senior-results-band a span { color: var(--label-green); transition: transform .18s ease; }
.senior-results-band a span { color: var(--sage); }
.results-hero-links a:hover span,
.senior-results-band a:hover span { transform: translateX(4px); }
.results-hero-media {
  position: relative;
  min-width: 0;
  margin: 0 0 0 -4rem;
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}
.results-hero-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 54% center; }

.rank-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  padding: 2.8rem clamp(1.5rem, 3.5vw, 4.5rem);
  background: var(--results-mist);
}
.rank-feature-heading { display: flex; align-items: center; padding-right: 2.25rem; }
.rank-feature-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 3.1rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
}
.rank-result {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: center;
  min-width: 0;
  padding: 0 clamp(1rem, 1.8vw, 2rem);
  border-left: 1px solid var(--legacy-rule);
}
.rank-result img { display: block; width: 155px; max-width: 100%; height: auto; border-radius: 7px; }
.rank-result:last-child { padding-right: 0; }
.rank-result h3 { margin: 0 0 .45rem; font-size: var(--card-title); line-height: 1.28; }
.rank-result p { margin: 0 0 1rem; color: var(--muted); font-size: var(--text-card); line-height: 1.45; }
.rank-result strong {
  display: block;
  padding-top: .8rem;
  border-top: 2px solid var(--results-accent);
  color: var(--results-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  font-size: clamp(1.75rem, 2.3vw, 2.65rem);
  line-height: 1;
  white-space: normal;
}
.rank-result sup { font-size: .48em; }
.rank-result img,
.student-result img { aspect-ratio: 4 / 5; object-fit: contain; background: var(--results-mist); }
.results-initials { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; background: var(--sage-tint); color: var(--legacy-ink); font-family: var(--font-display); font-size: 2.5rem; }
.rank-result p { margin-bottom: .25rem; }
.rank-result .result-rank { margin-top: .8rem; }
.results-page .result-year { color: var(--label-green); font-family: var(--font-ui); font-size: .85rem; }
.student-result .result-rank { margin-top: .35rem; font-weight: 600; }

.results-list-section {
  padding: clamp(4.5rem, 7vw, 7.5rem) clamp(1.25rem, 4vw, 4.5rem);
  background: #fff;
  scroll-margin-top: 110px;
}
.results-section-heading { max-width: 1180px; margin: 0 auto 2.25rem; }
.results-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0 0 1rem;
  font-size: var(--section-title);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}
.results-section-heading h2::after { content: ""; flex: 1; height: 1px; min-width: 80px; background: rgba(11, 45, 92, .25); }
.results-section-heading > p { max-width: 820px; margin: 0; color: var(--muted); font-size: var(--text-card); line-height: 1.7; }
.results-list {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.student-result {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 1.65rem;
  align-items: center;
  min-height: 168px;
  padding: 1.2rem 1.75rem 1.2rem 0;
  border-top: 1px solid var(--sage-line);
}
.student-result:nth-child(even) { padding-left: 2rem; border-left: 1px solid rgba(11, 45, 92, .18); }
.student-result img { display: block; width: 106px; height: auto; border-radius: 7px; }
.student-result h3 { margin: 0 0 .25rem; font-size: var(--card-title); line-height: 1.28; }
.student-result p { margin: 0; color: var(--muted); font-size: var(--text-card); line-height: 1.45; }
.student-result .programme { color: var(--results-ink); font-weight: 600; }

.senior-results-band {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  align-items: end;
  gap: 2rem;
  padding: clamp(3.5rem, 6vw, 6rem) clamp(1.5rem, 4vw, 4.5rem);
  background: var(--results-navy);
  color: #fff;
  overflow: hidden;
  scroll-margin-top: 110px;
}
.senior-results-band > div { align-self: center; max-width: 850px; }
.results-page .senior-results-band h2 { margin: 0 0 1.3rem; color: #fff; font-size: var(--section-title); line-height: 1.08; }
.senior-results-band p { margin: 0 0 1.2rem; color: rgba(255,255,255,.84); font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.72; }
.senior-results-band a { color: #fff; }
.senior-line-art { width: min(440px, 100%); color: var(--results-accent); opacity: .72; }

.results-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: clamp(2.5rem, 4vw, 4rem) clamp(1.5rem, 6vw, 7rem);
  background: #fff;
}
.results-cta h2 { margin: 0 0 .35rem; font-size: var(--section-title); line-height: 1.1; }
.results-cta p { margin: 0; color: var(--muted); font-size: var(--text-card); }
.results-cta .primary-button { flex: none; }
.results-page .site-footer { grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); }
.results-page .site-footer h3 { color: #fff; }

@media (max-width: 1280px) {
  .rank-feature { grid-template-columns: 1fr 1fr; }
  .rank-feature-heading { grid-column: 1 / -1; padding: 0 0 2.5rem; }
  .rank-result:first-of-type { border-left: 0; padding-left: 0; }
}

@media (max-width: 900px) {
  .results-hero { min-height: 0; grid-template-columns: 1fr; }
  .results-hero-copy { padding-top: 4.5rem; }
  .results-hero-copy h1 { font-size: clamp(3rem, 9vw, 4.8rem); }
  .results-hero-media { height: auto; aspect-ratio: 1.8; margin: 0; clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%); }
  .rank-feature { grid-template-columns: 1fr; }
  .rank-result { border-left: 0; border-top: 1px solid var(--legacy-rule); padding: 1.8rem 0; }
  .results-list { grid-template-columns: 1fr; }
  .student-result:nth-child(even) { padding-left: 0; border-left: 0; }
  .senior-results-band { grid-template-columns: 1fr; }
  .senior-line-art { justify-self: end; max-height: 180px; }
  .results-cta { align-items: flex-start; flex-direction: column; }
  .results-page .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .results-hero { margin-top: 70px; }
  .results-hero-copy { padding: 3.25rem 1rem 2.8rem; }
  .results-hero-copy h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .results-hero-copy h1 br { display: none; }
  .results-hero-links { flex-direction: column; align-items: flex-start; }
  .results-hero-media { height: auto; }
  .rank-feature { padding: 3.25rem 1rem; }
  .rank-feature-heading h2 br { display: none; }
  .rank-result { grid-template-columns: 112px 1fr; gap: 1rem; }
  .rank-result img { width: 112px; }
  .rank-result strong { font-size: 1.65rem; }
  .results-list-section { padding: 3.5rem 1rem; }
  .results-section-heading h2 { display: block; }
  .results-section-heading h2::after { display: block; width: 74px; margin-top: 1.2rem; }
  .student-result { grid-template-columns: 88px minmax(0, 1fr); min-height: 140px; gap: 1rem; padding-right: 0; }
  .student-result img { width: 88px; }
  .senior-results-band { padding: 3.5rem 1rem 0; }
  .senior-line-art { max-height: 140px; }
  .results-cta { padding: 3rem 1rem; }
  .results-cta .primary-button { width: 100%; }
  .results-page .site-footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .results-hero-links a span,
  .senior-results-band a span { transition: none; }
}
