/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --navy:        #122c54;
  --navy-deep:   #0b1d38;
  --royal:       #2c5aa0;
  --gold:        #d9a440;
  --gold-soft:   #f1cd86;
  --maroon:      #7c1f2e;
  --parchment:   #f7f2e4;
  --parchment-2: #efe7d2;
  --ink:         #1d2433;
  --ink-soft:    #4b5468;
  --line:        #d9cfb2;
  --white:       #fffdf8;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:    'Source Sans 3', 'Segoe UI', sans-serif;
  --mono:    'IBM Plex Mono', 'Courier New', monospace;

  --shadow-card: 0 1px 2px rgba(18,44,84,.06), 0 12px 28px -16px rgba(18,44,84,.28);
  --shadow-card-hover: 0 1px 2px rgba(18,44,84,.08), 0 22px 40px -18px rgba(18,44,84,.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* faint paper texture so the cream isn't flat */
body {
  background-image:
    radial-gradient(circle at 18% 8%, rgba(18,44,84,.04), transparent 40%),
    radial-gradient(circle at 86% 4%, rgba(124,31,46,.05), transparent 35%);
}

/* ============================================================
   Gear-tooth divider — the brand's own cog, flattened into a rule
   ============================================================ */
.gear-divider {
  height: 14px;
  background-image:
    linear-gradient(135deg, var(--navy) 25%, transparent 25.5%),
    linear-gradient(225deg, var(--navy) 25%, transparent 25.5%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 0;
  opacity: .85;
}
.gear-divider.gold {
  background-image:
    linear-gradient(135deg, var(--gold) 25%, transparent 25.5%),
    linear-gradient(225deg, var(--gold) 25%, transparent 25.5%);
}

/* ============================================================
   Header / Hero
   ============================================================ */
.site-header {
  background: linear-gradient(180deg, var(--navy-deep), var(--navy) 70%);
  color: var(--white);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60vw;
  height: 60vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(circle, rgba(217,164,64,.16), transparent 65%);
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 52px;
  align-items: center;
  padding-bottom: 56px;
  position: relative;
}

.hero-emblem {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(217,164,64,.12), 0 18px 36px -12px rgba(0,0,0,.5);
  flex-shrink: 0;
}
.hero-emblem img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 26px;
    padding-bottom: 40px;
  }
  .hero-emblem { width: 140px; height: 140px; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .locations { justify-content: center; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 16px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -.01em;
}

.hero p.lede {
  margin: 0 0 18px;
  max-width: 560px;
  color: #cdd7ea;
  font-size: 17px;
}

.locations {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
}
.locations span { opacity: .55; }
.locations strong { font-weight: 600; }

/* ============================================================
   Accreditation row — lives inside the header, not a separate strip
   ============================================================ */
.accreditation-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(255,255,255,.12);
  position: relative;
}
.accreditation-row .accred-label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #93a2bf;
  white-space: nowrap;
}
.accred-badges {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
}
.accred-badges img {
  height: 68px;
  width: 68px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
@media (max-width: 700px) {
  .accreditation-row { justify-content: center; text-align: center; padding: 24px 0 32px; }
  .accred-badges { justify-content: center; }
}

/* ============================================================
   Section headings
   ============================================================ */
.section-head {
  text-align: center;
  padding: 64px 0 8px;
}
.section-head .eyebrow { color: var(--maroon); justify-content: center; display: flex; }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  margin: 0 0 10px;
  color: var(--navy);
}
.section-head p {
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto;
}

/* ============================================================
   Card grid
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  padding: 40px 0 80px;
}

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

/* center a card left orphaned alone in the final row */
@media (min-width: 981px) {
  .grid > .card:last-child:nth-child(3n+1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 2 * 26px) / 3);
  }
}
@media (min-width: 641px) and (max-width: 980px) {
  .grid > .card:last-child:nth-child(2n+1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 26px) / 2);
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 26px 26px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--gold);
  outline: none;
}

.card-code {
  position: absolute;
  top: -10px;
  right: 22px;
  background: var(--maroon);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  padding: 5px 10px;
  border-radius: 4px;
  transform: rotate(3deg);
  box-shadow: 0 6px 12px -4px rgba(124,31,46,.55);
}

.card-logo {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  background: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; }

.card-location {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.card h3.college-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.28;
  margin: 0 0 12px;
  color: var(--navy);
  display: inline;
  background-image: linear-gradient(var(--gold-soft), var(--gold-soft));
  background-repeat: no-repeat;
  background-size: 0% 38%;
  background-position: 0 78%;
  transition: background-size .4s ease;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.card:hover h3.college-name,
.card:focus-visible h3.college-name {
  background-size: 100% 38%;
}

.card p.desc {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 20px;
  flex-grow: 1;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 26px;
}

.badge-autonomous {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy-deep);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(124,31,46,.18);
  animation: pulseGlow 1.8s ease-in-out infinite;
}
.badge-autonomous::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--maroon);
  flex-shrink: 0;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,164,64,.55); }
  50%      { box-shadow: 0 0 12px 5px rgba(217,164,64,.55); }
}
@media (prefers-reduced-motion: reduce) {
  .badge-autonomous { animation: none; }
}

.card-visit {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--royal);
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.card-visit svg {
  width: 14px;
  height: 14px;
  transition: transform .25s ease;
}
.card:hover .card-visit svg { transform: translateX(3px); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--navy-deep);
  color: #b9c4dd;
  padding: 56px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 14px;
}
.footer-grid p, .footer-grid a {
  font-size: 14.5px;
  color: #b9c4dd;
  text-decoration: none;
}
.footer-grid a:hover { color: var(--gold-soft); }
.signature {
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
  color: var(--white);
  margin: 0 0 4px;
}
.signature small {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8493b4;
  margin-top: 3px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 22px;
  font-size: 12.5px;
  color: #7c8aab;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
