/* ═══ Degree Advisor — site pages around the homepage ═══════════════════
   Shared by the pages a visitor reaches from the homepage on the way to
   sign-in: universities.html (find your university), university.html
   (/universities/<slug>) and request-access.html.

   The homepage (index.html) is the visual source of truth: the tokens,
   nav, buttons and motion below are copied from it unchanged. If the
   homepage changes, update this file to match — don't add a parallel
   system here. Page-specific layout stays in each page's own <style>.  */

:root {
  --ink: #0b0d17;
  --ink-2: #262a37;
  --ink-3: #565b6d;
  --ink-4: #8a8fa1;
  --line: #e8e9f0;
  --line-2: #d9dbe6;
  --bg: #ffffff;
  --bg-soft: #fafafc;
  --bg-tint: #f5f5fb;

  --indigo: #5856d6;
  --indigo-700: #3d3ba3;
  --indigo-50: #f4f4fe;
  --indigo-100: #e9e9fc;
  --indigo-200: #d5d4f7;

  --green: #2f7a5b;  --green-50: #edf6f2;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px;
  --shadow-1: 0 1px 2px rgba(11,13,23,0.05), 0 1px 1px rgba(11,13,23,0.03);
  --shadow-2: 0 1px 2px rgba(11,13,23,0.04), 0 10px 28px -14px rgba(11,13,23,0.16);
  --ring: 0 0 0 4px rgba(88,86,214,0.14);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease: var(--ease-out);
  --dur-press: 120ms;
  --dur-micro: 160ms;
  --dur-base: 240ms;
  --dur-enter: 480ms;
  --stagger: 60ms;

  --gutter: clamp(18px, 5vw, 40px);
  --wrap: 1200px;
  --nav-h: 64px;
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100svh;
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--ink-3);
  /* The homepage hero's soft indigo wash, centred at the top. Painted as a
     background (not an oversized layer) so it never causes sideways
     scrolling on phones. */
  background:
    radial-gradient(600px 450px at 50% 30px, rgba(88,86,214,0.11), rgba(88,86,214,0.04) 55%, transparent) no-repeat,
    var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
svg { display: block; }
h1, h2, h3 { color: var(--ink); font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons — the homepage's .btn, .btn-primary, .btn-secondary */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap;
  transition: background var(--dur-micro) var(--ease), border-color var(--dur-micro) var(--ease), box-shadow var(--dur-micro) var(--ease), transform var(--dur-press) var(--ease);
}
.btn .arrow { transition: transform var(--dur-base) var(--ease); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), var(--shadow-1); }
.btn-secondary { background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 15.5px; }
@media (hover: hover) {
  .btn-primary:hover { background: #22263a; }
  .btn-secondary:hover { border-color: var(--ink-4); }
  .btn:hover .arrow { transform: translateX(3px); }
}
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: scale(0.97); } }

/* Quiet text link ("← Choose another university") */
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-size: 15px; font-weight: 500; color: var(--ink-3); transition: color var(--dur-micro) var(--ease); }
@media (hover: hover) { .text-link:hover { color: var(--ink); } }

/* Header — the homepage nav's brand row */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.88); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: border-color var(--dur-base) var(--ease); }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--ink); }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; letter-spacing: -0.02em; box-shadow: inset 0 1px 0 rgba(255,255,255,0.14); }
.brand-word { font-weight: 500; font-size: 16px; letter-spacing: -0.02em; white-space: nowrap; }
.nav-home { margin-left: auto; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 10px; margin-right: -10px; font-size: 15px; font-weight: 500; color: var(--ink-3); transition: color var(--dur-micro) var(--ease); }
@media (hover: hover) { .nav-home:hover { color: var(--ink); } }

/* Centred page heading (finder, request, school pages) */
.page-head { text-align: center; }
.page-head h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.04em; }
.page-head p { margin: 14px auto 0; max-width: 32em; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.55; }

/* Surface card — the homepage tile surface */
.surface { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }

/* Status chip (Available / Not yet available) */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-4); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.is-live { color: var(--green); }

/* Form fields */
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: -0.005em; }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow-1); outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur-micro) var(--ease), box-shadow var(--dur-micro) var(--ease);
}
.input::placeholder { color: var(--ink-4); }
@media (hover: hover) { .input:hover { border-color: var(--ink-4); } }
.input:focus { border-color: var(--indigo); box-shadow: var(--ring); }

/* University photography (js/tenants.js → mountPhoto). Shown only once
   the file has loaded (.has-photo); the container's own colour/text design
   is the fallback, never a placeholder image. */
.tenant-photo { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 700ms var(--ease); }
.tenant-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.has-photo > .tenant-photo { opacity: 1; }
.photo-credit { position: absolute; z-index: 2; right: 12px; bottom: 10px; font-size: 11px; line-height: 1.2; color: rgba(255,255,255,0.78); text-shadow: 0 1px 2px rgba(0,0,0,0.45); }
.photo-credit[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tenant-photo { transition: none; } }

/* Entrance — the homepage's `rise`, played once on load. */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: rise var(--dur-enter) var(--ease) backwards; animation-delay: calc(var(--d, 0) * var(--stagger)); }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn .arrow, .input, .text-link, .nav-home { transition: none; }
}
