@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/caveat-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/eb-garamond-normal-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-italic-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/outfit-latin.woff2') format('woff2');
}

:root {
  --bg: #f3ead7;
  --paper: #fbf3e2;
  --paper-2: #fff9eb;
  --ink: #2a1d18;
  --ink-70: rgba(42, 29, 24, .70);
  --ink-50: rgba(42, 29, 24, .50);
  --ink-40: rgba(42, 29, 24, .38);
  --ink-20: rgba(42, 29, 24, .18);
  --hair: rgba(42, 29, 24, .14);

  --rust: #c66942;
  --sage: #7a8a6b;
  --plum: #6a4a55;
  --mustard: #c4953b;
  --slate: #4e6e7e;

  --sh-sm: 0 6px 18px -10px rgba(42, 29, 24, .28);
  --sh-md: 0 16px 36px -14px rgba(42, 29, 24, .38);
  --sh-rust: 0 10px 22px -10px rgba(198, 105, 66, .48);

  --serif: 'EB Garamond', Garamond, serif;
  --hand: 'Caveat', cursive;
  --sans: 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  min-height: 100vh;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.scatter {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  width: 100%;
  height: 100%;
}
.s-sage { fill: var(--sage); opacity: .15; }
.s-mst { fill: var(--mustard); opacity: .15; }
.s-plum { fill: var(--plum); opacity: .12; }
.s-rust { fill: var(--rust); opacity: .15; }
.s-ar { stroke: var(--rust); fill: none; stroke-width: 2.5; stroke-linecap: round; opacity: .28; }
.s-as { stroke: var(--sage); fill: none; stroke-width: 2.5; stroke-linecap: round; opacity: .28; }

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-card {
  width: 100%;
  max-width: 390px;
  background: var(--paper);
  border: 1.5px solid var(--hair);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: var(--sh-md);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login-logo { height: 46px; width: auto; margin-bottom: 12px; }
.login-eyebrow {
  font-family: var(--hand);
  font-size: 28px;
  color: var(--rust);
  transform: rotate(-1.5deg);
  display: inline-block;
  margin: 0;
}
.login-title {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}
.login-title em { color: var(--rust); }
.login-sub {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-70);
  margin: 10px 0 0;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rust);
  flex-shrink: 0;
}
.dot.plum { background: var(--plum); }
.field input {
  width: 100%;
  min-height: 50px;
  background: var(--paper-2);
  border: 1.5px solid var(--hair);
  border-radius: 10px;
  padding: 12px 15px;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  outline: none;
  transition: border-color .13s, box-shadow .13s;
}
.field input::placeholder { color: var(--ink-40); font-style: italic; }
.field input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122, 138, 107, .2);
}

.form-msg {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  display: none;
}
.form-msg.err {
  display: block;
  color: #b6361a;
  background: rgba(182, 54, 26, .08);
  border: 1px solid rgba(182, 54, 26, .2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 22px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform .1s, box-shadow .14s, background .14s, border-color .14s, color .14s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--rust);
  color: #fff7ec;
  box-shadow: var(--sh-rust);
}
.btn-primary:hover { background: #b35a36; }
.btn-ghost {
  background: rgba(251, 243, 226, .68);
  color: var(--ink);
  border: 1.5px solid var(--hair);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  border-color: var(--rust);
  color: var(--rust);
}
.btn-sm {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 13px;
}
.btn-full { width: 100%; }

.hub-screen {
  position: relative;
  max-width: 1080px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 32px 60px;
}

.hub-logout {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.hub-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
  gap: 4px;
}

.hub-title {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}
.hub-title em { font-style: italic; color: var(--rust); }
.hub-eyebrow {
  font-family: var(--hand);
  font-size: 24px;
  color: var(--rust);
  display: inline-block;
  transform: rotate(-1deg);
  line-height: 1;
  margin-top: 6px;
  white-space: nowrap;
}

.app-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
}
.app-card {
  flex: 0 0 calc(33.333% - 15px);
  min-width: 290px;
  background: var(--paper);
  border: 1.5px solid var(--hair);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform .16s cubic-bezier(.34, 1.26, .64, 1), box-shadow .18s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
}
.app-card:not(.app-card--soon):hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-md);
}
.app-card--soon { opacity: .65; cursor: default; }
.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--app-color);
  z-index: 2;
  border-radius: 20px 20px 0 0;
}

.c-rust { --app-color: #c66942; }
.c-sage { --app-color: #7a8a6b; }
.c-plum { --app-color: #6a4a55; }
.c-mst { --app-color: #c4953b; }
.c-slate { --app-color: #4e6e7e; }

.card-hero {
  height: 190px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 18px;
}
.blob {
  position: absolute;
  background: var(--app-color);
  pointer-events: none;
}
.blob-a {
  width: 162px;
  height: 152px;
  opacity: .12;
  border-radius: 62% 38% 34% 66% / 58% 32% 68% 42%;
  transform: rotate(-18deg);
}
.blob-b {
  width: 118px;
  height: 118px;
  opacity: .16;
  border-radius: 32% 68% 64% 36% / 28% 36% 64% 72%;
  transform: rotate(22deg);
}
.c-sage .blob-a { border-radius: 42% 58% 55% 45% / 48% 62% 38% 52%; transform: rotate(8deg); }
.c-sage .blob-b { border-radius: 65% 35% 45% 55% / 35% 55% 45% 65%; transform: rotate(-30deg); }
.c-plum .blob-a { border-radius: 50% 50% 30% 70% / 70% 30% 50% 50%; transform: rotate(35deg); }
.c-plum .blob-b { border-radius: 38% 62% 58% 42% / 52% 44% 56% 48%; transform: rotate(-12deg); }
.c-mst .blob-a { border-radius: 70% 30% 60% 40% / 40% 60% 30% 70%; transform: rotate(-40deg); }
.c-mst .blob-b { border-radius: 45% 55% 35% 65% / 60% 40% 68% 32%; transform: rotate(15deg); }
.c-slate .blob-a { border-radius: 38% 62% 42% 58% / 55% 45% 65% 35%; transform: rotate(25deg); }
.c-slate .blob-b { border-radius: 58% 42% 68% 32% / 38% 62% 35% 65%; transform: rotate(-8deg); }

.card-icon {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: var(--paper);
  border: 1.5px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-sm);
  color: var(--app-color);
  transition: transform .16s cubic-bezier(.34, 1.26, .64, 1);
}
.app-card:not(.app-card--soon):hover .card-icon {
  transform: scale(1.07) rotate(-3deg);
}

.card-body {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  text-align: center;
  align-items: center;
}
.card-name {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}
.card-desc {
  font-size: 13.5px;
  color: var(--ink-50);
  margin: 0;
  line-height: 1.5;
  max-width: 30ch;
}
.card-foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.soon-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink-20);
  color: var(--ink-50);
}

.hub-footer {
  text-align: center;
  margin-top: 64px;
  font-size: 13px;
  color: var(--ink-40);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hub-footer::before,
.hub-footer::after {
  content: '';
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: var(--hair);
}
.footer-support {
  color: var(--ink-50);
}
.footer-support:empty { display: none; }

.admissions-page {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 44px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 0 64px;
}

.admissions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.admissions-title {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  margin: 0;
  letter-spacing: 0;
}

.admissions-status {
  background: rgba(251, 243, 226, .72);
  border: 1.5px solid var(--hair);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--ink-70);
  box-shadow: var(--sh-sm);
}

.admissions-summary {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.admissions-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admissions-meta > div,
.summary-stat,
.recent-stat {
  background: var(--paper);
  border: 1.5px solid var(--hair);
  border-radius: 12px;
  box-shadow: var(--sh-sm);
}

.admissions-meta > div {
  padding: 18px 20px;
}

.admissions-label,
.summary-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 6px;
}

.admissions-meta strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summary-stat,
.recent-stat {
  padding: 22px 20px;
}

.summary-stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 500;
  line-height: .95;
  color: var(--plum);
}

.summary-stat--attention strong {
  color: var(--rust);
}

.recent-stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  color: var(--sage);
}

.admissions-note {
  margin: 0;
  padding: 16px 18px;
  background: rgba(122, 138, 107, .12);
  border: 1.5px solid rgba(122, 138, 107, .24);
  border-radius: 12px;
  color: var(--ink-70);
}

.admissions-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admissions-form-link {
  color: var(--ink-50);
  font-weight: 700;
  font-size: 14px;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.admissions-form-link:hover {
  color: var(--rust);
}

@media (max-width: 920px) {
  .app-card { flex: 0 0 calc(50% - 11px); }
}

@media (max-width: 768px) {
  .hub-screen { padding: 28px 18px 64px; }
  .hub-logout {
    position: absolute;
    top: 16px;
    right: 18px;
  }
  .hub-title { font-size: 38px; }
  .hub-eyebrow { font-size: 20px; }
  .card-hero { height: 165px; }
  .blob-a { width: 160px; height: 150px; }
  .blob-b { width: 120px; height: 120px; }
  .card-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }
  .card-icon svg { width: 30px; height: 30px; }
  .admissions-page {
    width: min(100% - 32px, 980px);
    padding-top: 26px;
  }
  .admissions-header {
    flex-direction: column-reverse;
    gap: 18px;
  }
  .admissions-title { font-size: 36px; }
  .admissions-meta,
  .summary-grid,
  .recent-grid {
    grid-template-columns: 1fr;
  }
  .summary-stat strong { font-size: 48px; }
  .admissions-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .app-card { flex: 0 0 100%; }
  .hub-title { font-size: 32px; }
  .login-screen { padding: 20px; }
  .login-card { padding: 34px 26px; }
  .login-title { font-size: 38px; }
}
