/* ==========================================================================
   site.css — the public marketing website.

   Separate shell from the portal: this one is a normal scrolling document with
   a sticky header, because it is a website and should behave like one. On a
   phone it still borrows the app's motion language (sheets, press feedback)
   and gains a bottom quick-action bar.
   ========================================================================== */

body.mode-site {
  background: var(--surface);
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.wrap-tight { max-width: 920px; }

/* --------------------------------------------------------------------------
   Utility bar + header
   -------------------------------------------------------------------------- */
.utilbar {
  background: var(--brand-deep); color: rgba(255,255,255,.9);
  font-size: 11.5px; font-weight: 500;
}
.utilbar .wrap { display: flex; align-items: center; gap: 20px; padding-top: 7px; padding-bottom: 7px; }
.utilbar a { display: inline-flex; align-items: center; gap: 6px; }
.utilbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.sitehead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.sitehead .wrap {
  display: flex; align-items: center; gap: 14px;
  padding-top: 11px; padding-bottom: 11px;
  flex-wrap: nowrap;
}
.sitelogo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.sitelogo img {
  width: 44px; height: 44px; object-fit: contain; border-radius: 12px;
  background: #fff; padding: 3px; border: 1px solid var(--line);
}
.sitelogo .n { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; line-height: 1.15; letter-spacing: -.01em; }
.sitelogo .s { font-size: 10.5px; color: var(--text-faint); font-weight: 600; }

/* The nav flexes and scrolls rather than wrapping the header onto two rows. */
.sitenav {
  display: flex; gap: 2px; margin-left: 8px;
  min-width: 0; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.sitenav::-webkit-scrollbar { display: none; }
.sitenav a {
  font-size: 13px; font-weight: 600; color: var(--text-soft); white-space: nowrap;
  padding: 8px 10px; border-radius: 9px; transition: background var(--dur-fast), color var(--dur-fast);
}
.sitenav a:hover { background: var(--surface-2); color: var(--text); }
.sitenav a.on { color: var(--brand); background: var(--brand-soft); }

/* --------------------------------------------------------------------------
   Notice ticker
   -------------------------------------------------------------------------- */
.ticker {
  background: var(--brand); color: #fff; overflow: hidden;
}
.ticker .wrap { display: flex; align-items: center; gap: 13px; padding-top: 8px; padding-bottom: 8px; font-size: 12px; }
.ticker .tag {
  background: rgba(255,255,255,.22); font-weight: 800; font-size: 9.5px; letter-spacing: .08em;
  padding: 4px 9px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}
.ticker .track { flex: 1; min-width: 0; overflow: hidden; }
.ticker .track > div { display: flex; gap: 40px; width: max-content; animation: tickerslide 32s linear infinite; }
.ticker:hover .track > div { animation-play-state: paused; }
@keyframes tickerslide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero-site {
  background: linear-gradient(165deg, var(--surface) 42%, var(--brand-soft));
  border-bottom: 1px solid var(--line);
}
.hero-site .wrap {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 30px;
  padding-top: 40px; padding-bottom: 40px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 6px 12px; border-radius: var(--r-pill);
}
.hero-site h1 {
  font-size: clamp(28px, 5.2vw, 42px); font-weight: 800; line-height: 1.1;
  margin: 15px 0 13px;
}
.hero-site h1 em { font-style: normal; color: var(--brand); }
.hero-site .lead { font-size: 15px; color: var(--text-soft); line-height: 1.6; max-width: 56ch; }
.hero-ctas { display: flex; gap: 10px; margin: 22px 0 24px; flex-wrap: wrap; }
.hero-stats { display: flex; border-top: 1px solid var(--line); padding-top: 18px; }
.hero-stats > div { flex: 1; border-right: 1px solid var(--line); padding-right: 14px; }
.hero-stats > div:last-child { border-right: none; }
.hero-stats .v { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.hero-stats .k { font-size: 11px; color: var(--text-faint); font-weight: 600; }

/* Role-picker card sitting in the hero */
.portalcard {
  background: var(--grad-brand); border-radius: var(--r-xl); padding: 20px; color: #fff;
  box-shadow: 0 30px 50px -30px var(--brand-dark);
}
.portalcard .role {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px; padding: 11px 12px; display: flex; align-items: center; gap: 11px;
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent; width: 100%; text-align: left;
}
.portalcard .role:hover { background: rgba(255,255,255,.2); }
.portalcard .role:active { transform: scale(.98); }
.portalcard .role .ri {
  width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Quick-access strip
   -------------------------------------------------------------------------- */
.quickstrip { border-bottom: 1px solid var(--line); background: var(--surface); }
.quickstrip .wrap { display: grid; grid-template-columns: repeat(6, 1fr); padding: 0; }
.quickstrip a {
  padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 9px;
  border-right: 1px solid var(--line); text-align: center;
  transition: background var(--dur-fast);
}
.quickstrip a:last-child { border-right: none; }
.quickstrip a:hover { background: var(--surface-2); }
.quickstrip .qi {
  width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.quickstrip .ql { font-size: 11.5px; font-weight: 700; color: var(--text-soft); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 44px 0; }
.section.alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(18px, 3vw, 20px); font-weight: 700; }
.section-head .s { font-size: 13.5px; color: var(--text-faint); font-weight: 600; margin-top: 3px; }

.cardgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.progcard {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;
  display: flex; gap: 13px; background: var(--surface);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}
.progcard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line-strong); }
.progcard .pn { font-weight: 700; font-size: 14px; }
.progcard .pd { font-size: 12.5px; color: var(--text-soft); line-height: 1.5; margin: 5px 0 9px; }
.progcard .pm { display: flex; gap: 10px; font-size: 11px; color: var(--text-faint); font-weight: 600; }

.facecard {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;
  background: var(--surface); text-align: center;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.facecard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery figure {
  margin: 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3;
  position: relative; background: var(--surface-3);
  display: flex; align-items: flex-end; padding: 14px; color: #fff;
  font-weight: 700; font-size: 13px;
  transition: transform var(--dur) var(--ease-out);
}
.gallery figure:hover { transform: scale(1.02); }
.gallery figure::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.62)); }
.gallery figure > span { position: relative; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
/* The footer is a near-black slab in the canvases, not a brand-tinted one —
   it reads as the end of the page rather than more of the institution. */
.sitefoot { background: #141420; color: #fff; padding: 30px 0 0; }
.sitefoot h4 {
  color: #fff; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 12px; font-family: var(--font-body); font-weight: 800; opacity: .5;
}
.sitefoot a { display: block; font-size: 12px; padding: 4.5px 0; opacity: .75; font-weight: 500; transition: opacity var(--dur-fast); }
.sitefoot a:hover { opacity: 1; }
.sitefoot .blurb { font-size: 11.5px; opacity: .65; line-height: 1.6; max-width: 34ch; }
.sitefoot .cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 24px; padding-bottom: 26px; }
.sitefoot .social { display: flex; gap: 8px; margin-top: 14px; }
.sitefoot .social span {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.sitefoot .bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 15px 0;
  display: flex; justify-content: space-between; gap: 14px; font-size: 11px; opacity: .55; flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Results band — a full-bleed figure strip in the deep brand tone
   -------------------------------------------------------------------------- */
.resultband { background: var(--brand-dark); color: #fff; }
.resultband .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding-top: 22px; padding-bottom: 22px;
}
.resultband .rb { display: flex; align-items: center; gap: 12px; }
.resultband .rb svg { opacity: .65; flex-shrink: 0; }
.resultband .rb .v { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.resultband .rb .k { font-size: 10.5px; opacity: .8; font-weight: 600; }

/* --------------------------------------------------------------------------
   Bordered list rows used on the home page (notices, events)
   -------------------------------------------------------------------------- */
.siterow {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px;
  transition: border-color var(--dur-fast), background var(--dur-fast);
  width: 100%; text-align: left; background: var(--surface);
}
.siterow:hover { border-color: var(--line-strong); background: var(--surface-2); }
.siterow .datechip {
  text-align: center; background: var(--brand-soft); border-radius: 8px;
  padding: 6px 9px; min-width: 44px; flex-shrink: 0;
}
.siterow .datechip .d { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--brand); line-height: 1; }
.siterow .datechip .m { font-size: 9px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; }
.siterow .st { font-weight: 700; font-size: 12.5px; color: var(--text); }
.siterow .ss { font-size: 10.5px; color: var(--text-faint); font-weight: 600; }

/* Facility tile — flat inset panel rather than a floating card */
.factile {
  display: flex; gap: 11px; align-items: center;
  background: var(--surface-inset); border-radius: var(--r-md); padding: 13px;
}
.factile .fl { font-weight: 700; font-size: 12.5px; color: var(--text); }
.factile .fs { font-size: 11px; color: var(--text-faint); font-weight: 500; }

/* --------------------------------------------------------------------------
   Phone layout for the public site
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .utilbar .wrap { gap: 12px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .utilbar .wrap::-webkit-scrollbar { display: none; }
  .utilbar .right { margin-left: 0; }

  .sitenav { display: none; }
  .sitehead .wrap { padding-top: 9px; padding-bottom: 9px; }
  .sitelogo img { width: 38px; height: 38px; }
  .sitelogo .n { font-size: 13px; }

  .hero-site .wrap { grid-template-columns: 1fr; gap: 22px; padding-top: 26px; padding-bottom: 30px; }
  .hero-stats { flex-wrap: wrap; gap: 14px 0; }
  .hero-stats > div { flex: 0 0 50%; border-right: none; }
  .hero-ctas .btn { flex: 1; }

  .quickstrip .wrap { grid-template-columns: repeat(4, 1fr); }
  .quickstrip a { padding: 14px 6px; border-bottom: 1px solid var(--line); }
  .quickstrip a:nth-child(4n) { border-right: none; }
  .quickstrip .ql { font-size: 10.5px; }

  .section { padding: 30px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 16px; }

  .cardgrid { grid-template-columns: 1fr; gap: 10px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .sitefoot .cols { grid-template-columns: 1fr 1fr; gap: 22px; }
  .resultband .wrap { grid-template-columns: 1fr 1fr; gap: 16px 8px; }
  .siterow { padding: 10px; gap: 10px; }
  .sitefoot { padding-bottom: 72px; }

  /* Sticky bottom bar with the two actions that actually matter on mobile. */
  .sitebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: flex; gap: 9px; padding: 10px 14px calc(10px + var(--safe-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
  }
  .sitebar .btn { flex: 1; }
}

@media (min-width: 900px) {
  .sitebar { display: none; }
  .sitemenu-btn { display: none; }
}

/* --------------------------------------------------------------------------
   Installed to the home screen
   The status bar is translucent in standalone mode, so the marketing site —
   which is a normal scrolling document rather than the app frame — has to
   inset its own chrome. The portal already handles this via --safe-top.
   -------------------------------------------------------------------------- */
@media (display-mode: standalone) {
  .utilbar .wrap { padding-top: calc(7px + env(safe-area-inset-top, 0px)); }
  .sitehead { top: 0; }
  .sitefoot { padding-bottom: env(safe-area-inset-bottom, 0px); }
  /* No browser chrome to scroll away, so the bottom bar needs the inset. */
  .sitebar { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}
