/* Brand colours and faces kept (QC Red, black, white;
   Libre Baskerville and Cabin). Five type steps, square corners, no rules, shadows or gradients. */
:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: #4a4a4a;
  --accent: #E71939;        /* Queens College Red: the action, and the fields it owns */
  --accent-strong: #B20E28;
  --field: #E71939;         /* the staircase and the footer */
  --panel: #000000;         /* the about panel */
  --paper: #ffffff;         /* the timetable sheet */
  --surface: #f2f2ef;

  --display: "Libre Baskerville", Baskerville, Georgia, serif;
  --text: "Cabin", "Gill Sans", "Segoe UI", system-ui, sans-serif;

  /* the five sizes on the page */
  --t-display: clamp(64px, 11.4vw, 176px);
  --t-head: clamp(28px, 2.6vw, 36px);
  --t-lead: 22px;
  --t-body: 17px;
  --t-small: 14px;

  --m: clamp(16px, 2.2vw, 32px);   /* the one pair of page margins */
  --gap: clamp(120px, 12vw, 200px); /* between sections */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.55 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; transition: text-decoration-color var(--t-hover) ease; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3, p, figure { margin: 0; }
.photo, .hero-pic img, .stair-pics img, .board-ground, .arch img { filter: grayscale(1) contrast(1.06); }

/* buttons: one shape, square, flat */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; background: var(--accent); color: #fff; font: 700 var(--t-body)/1 var(--text); text-decoration: none; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: var(--t-small); }
.btn-ink { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-strong); }
  .btn-ink:hover { background: #fff; color: var(--ink); }
  a:hover { text-decoration-color: currentColor; }
}

/* navigation: wordmark, three links, one action */
.nav { position: absolute; inset: 0 0 auto 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 20px var(--m); }
.wordmark { font: 700 var(--t-body)/1.2 var(--display); text-decoration: none; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: var(--t-small); font-weight: 600; text-decoration-color: transparent; }
.nav .btn { justify-self: end; }

/* hero: a shouted two-line title, the Quad photograph rising underneath */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; padding: calc(12svh + 24px) var(--m) 0; }
.hero h1 { font: 700 var(--t-display)/0.9 var(--display); letter-spacing: -0.035em; text-align: center; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; }
.hero-pic { justify-self: center; width: 27vw; margin-top: 2.2vw; aspect-ratio: 3 / 4; overflow: hidden; align-self: start; }
.hero-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 46% 78%; scale: 1.6; transform-origin: 50% 61%; }
.hero-foot { position: absolute; inset: auto var(--m) 32px var(--m); display: flex; justify-content: space-between; align-items: end; gap: 32px; pointer-events: none; }
.hero-foot > * { pointer-events: auto; }
.hero-say { width: min(300px, 24vw); display: grid; gap: 18px; justify-items: start; }
.hero-next { width: min(300px, 24vw); text-align: right; }
.hero-next b { display: block; font-weight: 700; }

/* staircase statement on the red field */
.stairs { position: relative; background: var(--field); min-height: 100svh; margin-top: var(--gap); padding: 0 var(--m); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.stair-text { font: 700 var(--t-head)/1.08 var(--display); letter-spacing: -0.01em; }
.stair { display: block; padding-left: calc(var(--s) * 6vw); color: var(--ink); }
.stair:nth-child(odd) { color: #fff; }
.stair-pics { display: grid; gap: 16px; align-self: start; margin-top: 28svh; }
.stair-pics img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.stair-pics img:first-child { object-position: 50% 30%; }
.stair-note { position: absolute; left: var(--m); bottom: 32px; max-width: 34ch; font-size: var(--t-small); color: var(--ink); }

/* the timetable: one printed sheet over the Albany chamber */
.board { position: relative; margin-top: var(--gap); min-height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding: 96px var(--m); overflow: hidden; background: var(--ink); }
.board-ground { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.board .sheet { position: relative; grid-column: 7 / 13; width: min(640px, 100%); justify-self: end; background: var(--paper); padding: 64px; text-align: center; --sc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23ffffff'/%3E%3C/svg%3E"); }
.board .sheet::before, .board .sheet::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; background: var(--sc) repeat-x; }
.board .sheet::before { top: -12px; }
.board .sheet::after { bottom: -12px; transform: scaleY(-1); }
.board .sheet h2 { font: 700 var(--t-head)/1.1 var(--display); letter-spacing: -0.01em; }
.board .sheet-note { margin-top: 10px; font-size: var(--t-small); color: var(--muted); }
.years { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.years button { min-height: 44px; padding: 0 14px; border: 0; background: var(--surface); color: var(--ink); font: 600 var(--t-small)/1 var(--text); cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.years button:active { transform: scale(0.96); }
.years button[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) { .years button:not([aria-pressed="true"]):hover { background: #e2e2dd; } }
.groups { margin-top: 48px; display: grid; gap: 56px; }
.group h3 { font: 700 var(--t-lead)/1.2 var(--display); }
.group ol { list-style: none; margin: 18px auto 0; padding: 0; max-width: 440px; display: grid; gap: 16px; text-align: left; }
.dep { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; }
.dep a { font-weight: 600; text-decoration-color: transparent; }
.dep time { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.dep time.soon { color: var(--accent); }
.dep span { grid-column: 1 / -1; font-size: var(--t-small); color: var(--muted); }
.board .sheet-end { margin-top: 56px; font-size: var(--t-small); color: var(--muted); line-height: 1.7; }
.board .sheet-end a { color: var(--ink); font-weight: 600; }

/* about: a black inset panel, the college in an arch */
.about { position: relative; margin: var(--gap) 20px 0; background: var(--panel); color: #fff; min-height: 100svh; overflow: hidden; display: grid; grid-template-columns: 63fr 37fr; }
.about-left { padding: 56px; display: grid; grid-template-rows: auto 1fr; }
.about h2 { font: 700 var(--t-head)/1.1 var(--display); letter-spacing: -0.01em; }
.arch { align-self: end; width: 38vw; aspect-ratio: 4 / 5; margin: 64px 0 -12svh; overflow: hidden; border-radius: 19vw 19vw 0 0; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.about-right { padding: 56px 56px 56px 0; display: grid; align-content: start; gap: 48px; justify-items: start; }
.about-right > div { max-width: 340px; }
.about h3 { font: 700 var(--t-lead)/1.25 var(--display); }
.about p { margin-top: 12px; }
.about .sig { color: #c9c9c9; font-size: var(--t-small); }

/* footer: the invitation, and the name cropped by the bottom edge */
.foot { margin-top: var(--gap); background: var(--field); color: var(--ink); min-height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; padding: 64px var(--m) 0; }
.foot-top { display: grid; grid-template-columns: 7fr 2fr 3fr; }
.invite { display: grid; gap: 28px; justify-items: start; }
.invite h2 { font: 700 var(--t-head)/1.1 var(--display); color: #fff; }
.foot-links { grid-column: 3; display: grid; gap: 10px; align-content: start; }
.foot-links a { font-weight: 600; }
.credits { grid-row: 3; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: var(--t-small); padding-bottom: 12px; }
.giant { grid-row: 4; font: 700 28vw/0.78 var(--display); letter-spacing: -0.05em; color: #fff; white-space: nowrap; transform: translateY(24%); margin-left: -0.04em; }

/* phones: their own composition */
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; padding: 16px; }
  .nav-links, .wordmark .long { display: none; }
  .hero { padding: calc(10svh + 40px) 16px 0; }
  .hero h1 { font-size: 12vw; text-align: left; }
  .hero { height: auto; min-height: 100svh; }
  .hero-pic { width: 64vw; margin-top: 24px; }
  .hero-foot { position: static; display: grid; gap: 20px; padding: 32px 0 48px; }
  .hero-say, .hero-next { width: auto; text-align: left; }
  .stairs { grid-template-columns: 1fr; padding: 64px 16px 48px; align-items: start; gap: 40px; }
  .stair-text { font-size: 24px; }
  .stair { padding-left: calc(var(--s) * 5vw); }
  .stair-pics { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .stair-note { position: static; }
  .board { display: block; padding: 48px 10px; }
  .board .sheet { width: 100%; padding: 40px 20px; }
  .groups { gap: 40px; }
  .group h3 { font-size: 20px; }
  .about { margin: var(--gap) 10px 0; min-height: 0; display: flex; flex-direction: column; }
  .about-left { display: contents; }
  .about h2 { order: 1; padding: 40px 20px 0; }
  .about-right { order: 2; padding: 32px 20px 40px; }
  .arch { order: 3; width: 86vw; align-self: center; margin: 0 0 -20vw; border-radius: 43vw 43vw 0 0; }
  .foot-top { grid-template-columns: 1fr; gap: 40px; }
  .foot-links { grid-column: auto; display: flex; flex-wrap: wrap; gap: 10px 22px; }
  .invite .btn { width: 100%; justify-content: center; }
  .giant { font-size: 34vw; }
}

/* motion: the masked headline, entrances, one moving picture */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js [data-rise] { opacity: 0; transform: translateY(20px); animation: rise 700ms var(--ease-out) 520ms forwards; }
  .js .hero-pic img { animation: settle 2200ms var(--ease-soft) both; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .dep { opacity: 0; transform: translateY(12px); animation: rise 600ms var(--ease-out) forwards; animation-delay: calc(var(--k, 0) * 40ms); }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }

/* ---------- preview 2: the path, year by year ---------- */
.path-page { --t-display: clamp(52px, 7vw, 112px); }
.path-page .hero h1 { letter-spacing: -0.03em; line-height: 0.95; }
.path-page .hero-pic { margin-top: 3vw; }

/* the goal and year picker sticks under the top of the screen while you read the path */
.picker { position: sticky; top: 0; z-index: 20; background: var(--surface); padding: 12px var(--m); display: grid; gap: 8px; margin-top: 0; }
.pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pick-label { font-size: var(--t-small); font-weight: 700; color: var(--muted); min-width: 76px; }
.picker button { min-height: 40px; padding: 0 14px; border: 0; background: var(--bg); color: var(--ink); font: 600 var(--t-small)/1 var(--text); cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.picker button:active { transform: scale(0.96); }
.picker button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.picker nav a { font-size: var(--t-small); font-weight: 600; padding: 8px 4px; }
@media (hover: hover) and (pointer: fine) { .picker button:not([aria-pressed="true"]):hover { background: #e2e2dd; } }

/* each year: the name and a picture pinned on the left, the three parts on the right */
.stages > .stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 64px; padding: var(--gap) var(--m) 0; scroll-margin-top: var(--picker-h, 110px); }
.stage-pin { position: sticky; top: calc(var(--picker-h, 110px) + 32px); align-self: start; }
.stage-pin h2 { font: 700 var(--t-display)/0.95 var(--display); letter-spacing: -0.03em; }
.stage-focus { margin-top: 18px; font: 700 var(--t-lead)/1.3 var(--display); max-width: 22ch; }
.stage-tag { margin-top: 8px; font-size: var(--t-small); font-weight: 700; color: var(--accent); }
.stage-pin img { margin-top: 32px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1) contrast(1.06); }
.stage-body { display: grid; gap: 72px; padding-top: 12px; }
.part h3 { font: 700 var(--t-lead)/1.25 var(--display); }
.part-note { margin-top: 6px; font-size: var(--t-small); color: var(--muted); }
.terms { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.term-n { font-size: var(--t-small); font-weight: 700; color: var(--muted); }
.terms ul, .guides, .apply { list-style: none; margin: 0; padding: 0; }
.terms ul { margin-top: 8px; display: grid; gap: 10px; }
.alt { margin-top: 28px; }
.guides { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.guides a { font-weight: 700; }
.guides span, .apply .m { display: block; font-size: var(--t-small); color: var(--muted); margin-top: 2px; }
.apply { margin-top: 18px; display: grid; gap: 16px; }
.apply li { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 16px; }
.apply time, .apply .when { font-variant-numeric: tabular-nums; font-weight: 700; }
.apply time.soon { color: var(--accent-strong); }
.apply .when { color: var(--muted); }
.apply a { font-weight: 600; }
.apply .m { grid-column: 2; }
.all-link { display: inline-block; margin-top: 20px; font-weight: 700; }
.stage-fallback { padding: var(--gap) var(--m) 0; }

@media (max-width: 760px) {
  .path-page .hero h1 { font-size: 8.6vw; letter-spacing: -0.035em; }
  .picker { padding: 10px 12px; }
  .pick-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pick-row::-webkit-scrollbar { display: none; }
  .pick-label { min-width: auto; white-space: nowrap; }
  .picker button, .picker nav a { flex: 0 0 auto; white-space: nowrap; }
  .stages > .stage { grid-template-columns: 1fr; padding-top: 88px; }
  .stage-pin { position: static; }
  .stage-pin h2 { font-size: 12vw; }
  .stage-pin img { margin-top: 24px; }
  .stage-body { gap: 48px; padding-top: 40px; }
  .terms { grid-template-columns: 1fr; gap: 20px; }
  .guides { grid-template-columns: 1fr; }
}

/* ---------- tighter spacing (Mohamed: "a lot of whitespace") ---------- */
.path-page { --gap: clamp(56px, 6vw, 96px); }
.path-page .hero { height: auto; min-height: 0; padding-bottom: 0; grid-template-rows: auto auto; }
.path-page .hero-pic { width: 34vw; max-height: 56svh; aspect-ratio: auto; height: 56svh; margin-top: 2vw; }
.path-page .hero-foot { inset: auto var(--m) 28px var(--m); }
.path-page .stairs { min-height: 0; margin-top: 0; padding-block: 72px; align-items: start; }
.path-page .stair-pics { margin-top: 0; grid-template-columns: 1fr 1fr; }
.path-page .stair-note { position: static; grid-column: 1; margin-top: -8px; }
.stages > .stage { gap: 0 48px; }
.path-page .stage-body { gap: 48px; padding-top: 4px; }
.path-page .stage-pin img { margin-top: 24px; }
.path-page .about { min-height: 0; grid-template-columns: 1fr 1fr; }
.path-page .about-left { padding: 48px 48px 0; }
.path-page .about-right { padding: 48px 48px 48px 0; gap: 32px; }
.path-page .arch { width: min(30vw, 420px); margin: 40px 0 -64px; border-radius: 15vw 15vw 0 0; }
.path-page .foot { min-height: 0; padding-top: 56px; grid-template-rows: auto auto auto auto; gap: 40px; }
@media (max-width: 760px) {
  .path-page .hero-pic { width: 100%; height: 44svh; }
  .path-page .stairs { padding-block: 48px; }
  .path-page .stair-note { margin-top: 0; }
  .stages > .stage { padding-top: 56px; }
  .path-page .about-left { padding: 0; }
  .path-page .about h2 { padding: 32px 20px 0; }
  .path-page .about-right { padding: 24px 20px 32px; }
  .path-page .arch { width: 86vw; margin: 0 0 -20vw; border-radius: 43vw 43vw 0 0; }
}
.path-page .about h2 { white-space: nowrap; }
@media (max-width: 1100px) { .path-page .about-left { padding: 40px 32px 0; } }
@media (max-width: 760px) { .stages > .stage { padding-top: 88px; } .path-page .about h2 { white-space: normal; } }
.path-page { --t-display: clamp(48px, 6.2vw, 100px); }
.stages > .stage { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.path-page .stage-pin h2 { letter-spacing: -0.035em; }
@media (max-width: 760px) { .picker { position: static; } }
@media (max-width: 760px) { .stages > .stage { grid-template-columns: 1fr; } }

/* ---------- "Not sure where to start?" quiz ---------- */
.quiz { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: var(--gap) var(--m) 0; scroll-margin-top: var(--picker-h, 110px); }
.quiz h2 { font: 700 var(--t-head)/1.15 var(--display); }
.quiz-intro p { margin-top: 12px; max-width: 40ch; }
.quiz-box { background: var(--surface); padding: 32px; min-height: 360px; }
.quiz-box fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-q { font: 700 var(--t-lead)/1.3 var(--display); padding: 0; }
.q-progress { margin-top: 6px; font-size: var(--t-small); color: var(--muted); }
.q-opts { margin-top: 20px; display: grid; gap: 8px; }
.q-opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; background: var(--bg); cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.q-opt input { position: absolute; opacity: 0; pointer-events: none; }
.q-opt:active { transform: scale(0.99); }
.q-opt:has(input:checked) { background: var(--ink); color: #fff; }
.q-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .q-opt:not(:has(input:checked)):hover { background: #e2e2dd; } }
.q-back, .q-again { margin-top: 18px; border: 0; background: none; padding: 8px 0; font: 600 var(--t-small)/1 var(--text); color: var(--ink); text-decoration: underline; cursor: pointer; }
.q-result h3 { font: 700 var(--t-head)/1.15 var(--display); outline: none; }
.q-say, .q-fact, .q-also, .q-tip { margin-top: 14px; max-width: 60ch; }
.q-fact { font-size: var(--t-lead); line-height: 1.4; }
.q-actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.q-actions .q-again { margin-top: 0; }
.picker nav a[href="#quiz"] { color: var(--accent-strong); }
@media (max-width: 760px) {
  .quiz { grid-template-columns: 1fr; gap: 20px; padding-top: 72px; }
  .quiz-box { padding: 20px; min-height: 0; }
  .q-fact { font-size: var(--t-body); }
}
