:root {
  --purple: #772885;
  --purple-dark: #4f185d;
  --purple-soft: #f3e8f6;
  --magenta: #d20084;
  --blue: #2e50c7;
  --yellow: #ffe36b;
  --ink: #24182a;
  --muted: #665b6b;
  --line: #e7dfe9;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(66, 28, 76, 0.11);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 14%, rgba(210, 0, 132, .09), transparent 23rem),
    radial-gradient(circle at 94% 78%, rgba(46, 80, 199, .10), transparent 25rem),
    #fbf9fc;
  font-family: "Barlow", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 22rem;
  aspect-ratio: 1;
  border: 2px solid rgba(119, 40, 133, .08);
  border-radius: 43% 57% 63% 37% / 45% 38% 62% 55%;
  transform: rotate(22deg);
}

body::before { top: -14rem; right: -7rem; }
body::after { bottom: -16rem; left: -8rem; transform: rotate(-24deg); }

.skip-link {
  position: fixed;
  z-index: 10;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  color: white;
  background: var(--purple-dark);
  border-radius: .5rem;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: block;
  width: clamp(10rem, 15vw, 13rem);
  height: auto;
}

.language-switcher {
  display: flex;
  padding: .25rem;
  gap: .1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}

.language-switcher button {
  min-width: 2.55rem;
  min-height: 2.3rem;
  padding: .35rem .6rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  cursor: pointer;
}

.language-switcher button:hover { color: var(--purple); background: var(--purple-soft); }
.language-switcher button[aria-pressed="true"] { color: white; background: var(--purple); }

main {
  width: min(62rem, calc(100% - 2rem));
  margin: auto;
  padding: 4vh 0 8vh;
}

.intro { max-width: 42rem; margin: 0 auto 2.5rem; text-align: center; }
.eyebrow { margin: 0 0 .7rem; color: var(--purple); font-size: .79rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 4.25rem); line-height: .98; font-weight: 500;}
.lede { margin: 1.1rem 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }

.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }

.portal-card {
  position: relative;
  min-height: 16rem;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 1.2rem 1.25rem;
  color: inherit;
  background: rgba(255,255,255,.91);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  box-shadow: 0 5px 18px rgba(66, 28, 76, .04);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.portal-card:hover { transform: translateY(-4px); border-color: rgba(119,40,133,.35); box-shadow: var(--shadow); }
.portal-card:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.portal-card.suggested { border: 3px solid var(--purple); padding: calc(1.5rem - 1px); }

.portal-icon { width: 5rem; height: 5rem; object-fit: contain; }
.portal-heading { min-width: 0; align-self: center; }
.portal-kicker { display: block; margin-bottom: .35rem; color: var(--purple); font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.portal-heading h2 { margin: 0; font-size: 1.45rem; line-height: 1.1; letter-spacing: -.025em; }
.portal-description { grid-column: 1 / -1; margin: 0; color: var(--muted); line-height: 1.55; }
.portal-action { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--purple); font-weight: 780; }
.portal-action svg { width: 1.25rem; transition: transform .2s ease; }
.portal-card:hover .portal-action svg { transform: translateX(4px); }
.suggested-badge { position: absolute; top: 1rem; right: 1rem; width: 1rem; height: 1rem; border-radius: 50%; animation: 0.5s ease-in-out infinite green-led-glow; }

.help { margin: 1.35rem 0 0; color: var(--muted); font-size: .88rem; text-align: center; }

footer {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.3rem 0 1.6rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
  color: #776e7a;
  border-top: 1px solid var(--line);
  font-size: .8rem;
}

.noscript { position: fixed; inset: auto 1rem 1rem; padding: 1rem; color: white; background: var(--purple-dark); border-radius: .75rem; text-align: center; }
.noscript a { color: white; font-weight: 750; }

@media (max-width: 42rem) {
  .site-header { padding-top: 1rem; }
  .brand-logo { width: 8.5rem; }
  main { padding-top: 3vh; }
  .intro { margin-bottom: 1.75rem; }
  .portal-card { min-height: 0; padding: 1.2rem; gap: .9rem 1rem; border-radius: 1.1rem; }
  .portal-card.suggested { padding: calc(1.2rem - 1px); }
  .portal-icon { width: 4.25rem; height: 4.25rem; }
  .portal-description { font-size: .94rem; }
}

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

@keyframes green-led-glow {
  0% {  background: #115231; box-shadow: 0 0 0 0rem #dff5e9;}
  50% { background: #24a866; box-shadow: 0 0 0 0.5rem #dff5e9;}
  100% {  background: #115231; box-shadow: 0 0 0 0rem #dff5e9;}
}