@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #2F588B;
  --blue-dark: #24466F;
  --blue-soft: #EAF0F6;
  --sage: #7F9C88;
  --sage-soft: #EDF3EF;
  --gold: #D8A74C;
  --gold-soft: #FBF4E6;
  --charcoal: #2B2D31;
  --muted: #6C737C;
  --surface: #FFFFFF;
  --border: #DCE2E8;
  --purple: #75679A;
  --purple-soft: #F0EDF7;
  --sky: #6E9FBE;
  --sky-soft: #EAF3F8;
  --shadow-sm: 0 4px 14px rgba(34, 54, 77, .07);
  --shadow: 0 16px 36px rgba(34, 54, 77, .10);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; max-width: 100%; overflow-x: hidden; }
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--charcoal);
  background:
    radial-gradient(circle at top right, rgba(216,167,76,.08), transparent 28rem),
    linear-gradient(180deg, #F7F9FB 0%, #F1F4F7 100%);
}
a { color: inherit; }
button { font: inherit; }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
main { width: min(1380px, calc(100% - 48px)); margin: 0 auto; flex: 1; }

.hero {
  position: relative; overflow: hidden;
  margin: 24px 0 22px; padding: 30px 36px;
  min-height: 228px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  background: linear-gradient(135deg, #294F7E 0%, #315E92 72%, #3A6B9F 100%);
  color: white; border-radius: 22px; box-shadow: var(--shadow);
}
.hero::after {
  content: ''; position: absolute; right: -66px; bottom: -138px; width: 330px; height: 330px; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.hero-copy { position: relative; z-index: 1; max-width: 850px; }
.eyebrow, .section-kicker { margin: 0 0 7px; color: #F0C56F; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 780px; font-size: clamp(32px, 3.7vw, 50px); line-height: 1.02; letter-spacing: -.035em; }
.hero-text { margin: 13px 0 0; max-width: 800px; color: rgba(255,255,255,.85); font-size: 16px; line-height: 1.48; }
.hero-mark {
  position: relative; z-index: 1; flex: 0 0 154px; width: 154px; height: 154px;
  display: grid; place-items: center; padding: 6px;
  background: rgba(255,255,255,.98); border: 1px solid rgba(255,255,255,.32); border-radius: 50%;
  box-shadow: 0 14px 30px rgba(15,34,56,.20);
}
.hero-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }

.systems-section { padding: 0 0 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 14px; }
.section-kicker { color: var(--gold); }
.section-head h2 { margin: 0; color: var(--blue-dark); font-size: 27px; letter-spacing: -.02em; }
.section-help { max-width: 510px; margin: 0 0 1px; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }

.app-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 15px; }
.app-card {
  --accent: var(--blue); --soft: var(--blue-soft);
  grid-column: span 4; position: relative; min-height: 228px; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 21px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.app-card.featured { grid-column: span 6; min-height: 230px; }
.app-card.available:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.app-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); }
.app-card.accent-sage { --accent: var(--sage); --soft: var(--sage-soft); }
.app-card.accent-blue { --accent: var(--blue); --soft: var(--blue-soft); }
.app-card.accent-gold { --accent: var(--gold); --soft: var(--gold-soft); }
.app-card.accent-purple { --accent: var(--purple); --soft: var(--purple-soft); }
.app-card.accent-sky { --accent: var(--sky); --soft: var(--sky-soft); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.app-icon { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; color: var(--accent); background: var(--soft); border-radius: 14px; }
.app-icon svg { width: 25px; height: 25px; stroke-width: 1.9; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.status-available { color: #4D6D55; background: #EAF3ED; }
.status-coming-soon { color: #75561B; background: #FBF4E6; }
.status-needs-link { color: #52657B; background: #EDF2F7; }
.card-eyebrow { margin: 18px 0 4px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.app-card h3 { margin: 0; color: #23282E; font-size: 21px; line-height: 1.12; letter-spacing: -.02em; }
.app-description { margin: 9px 0 16px; color: #636B74; font-size: 13px; line-height: 1.48; }
.card-action { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.open-app {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  color: white; background: var(--accent); border: 0; border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(34,54,77,.12);
}
.open-app:hover { filter: brightness(.96); }
.open-app svg { width: 15px; height: 15px; }
.card-note { color: #8A9199; font-size: 10px; font-weight: 600; }
.app-card.disabled { background: linear-gradient(180deg, #fff 0%, #FCFCFD 100%); }
.app-card.disabled .app-icon, .app-card.disabled h3, .app-card.disabled .card-eyebrow { opacity: .88; }
.app-card.disabled .open-app { color: #777F88; background: #EFF2F4; box-shadow: none; pointer-events: none; }
.load-error { margin-top: 15px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; color: #8A3E3E; background: #FCEDED; border: 1px solid #F0CCCC; border-radius: 12px; }

.site-footer {
  width: min(1380px, calc(100% - 48px)); margin: 20px auto 0; padding: 16px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  color: var(--muted); border-top: 1px solid rgba(47,88,139,.10);
}
.site-footer > div { display: flex; flex-direction: column; gap: 2px; font-size: 10px; }
.site-footer strong { color: #4A525A; font-size: 11px; }
.site-footer img { width: 132px; height: 54px; object-fit: contain; }

@media (max-width: 1050px) {
  main, .site-footer { width: min(100% - 32px, 1180px); }
  .hero { padding: 28px 30px; min-height: 212px; }
  .hero-mark { flex-basis: 132px; width: 132px; height: 132px; }
  .app-card, .app-card.featured { grid-column: span 6; }
}

@media (max-width: 740px) {
  main, .site-footer { width: min(100% - 24px, 760px); }
  .hero { margin-top: 14px; padding: 24px 22px; min-height: 0; border-radius: 19px; }
  .hero-mark { flex: 0 0 98px; width: 98px; height: 98px; }
  .hero-text { font-size: 14px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 6px; margin-bottom: 12px; }
  .section-help { text-align: left; }
  .app-card, .app-card.featured { grid-column: 1 / -1; min-height: 0; padding: 19px; }
  .card-eyebrow { margin-top: 16px; }
  .site-footer { align-items: flex-start; }
  .site-footer img { width: 112px; height: 48px; }
}

@media (max-width: 520px) {
  .hero { align-items: flex-start; }
  .hero-mark { flex-basis: 76px; width: 76px; height: 76px; }
  .hero h1 { font-size: 31px; }
  .section-head h2 { font-size: 23px; }
  .card-action { align-items: flex-start; flex-direction: column; }
  .open-app { width: 100%; justify-content: center; }
}

@media (max-width: 390px) {
  .hero-mark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
