:root {
  --white: #fff;
  --paper: #f6f7fb;
  --navy: #1b373d;
  --teal: #405356;
  --light-blue: #b4c1c3;
  --red: #d31316;
  --red-dark: #b41312;
  --indigo: #312e81;
  --indigo-mid: #4338ca;
  --indigo-200: #c7d2fe;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --gray-text: #64748b;
  --shadow: 0 20px 60px rgb(20 35 55 / 18%);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 18%, rgb(255 255 255 / 9%) 0 3px, transparent 4px),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 5%) 0 1px, transparent 1px 22px),
    linear-gradient(145deg, var(--navy) 0%, var(--teal) 45%, var(--indigo) 100%);
  background-size: 36px 36px, auto, auto;
  color: var(--navy);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.portal-shell {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 100px rgb(0 0 0 / 32%);
}

.topbar {
  min-height: 108px;
  padding: 24px 42px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(90deg, var(--navy), var(--indigo));
  color: var(--white);
}

.topbar h1,
.topbar p,
h2,
p {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: -.05em;
}

.brand-mark {
  width: 60px;
  height: 60px;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border: 2px solid rgb(255 255 255 / 68%);
  border-radius: 16px;
  background: rgb(255 255 255 / 10%);
}

.brand-tile {
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--white);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: -.02em;
}

.brand-tile.math {
  background: var(--red);
}

.brand-tile.word {
  background: var(--orange);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--light-blue);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--orange-dark);
}

.hero {
  margin: 42px;
  min-height: 300px;
  padding: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 590px;
}

.hero h2 {
  margin-bottom: 14px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: .92;
  letter-spacing: -.06em;
}

.hero p:not(.eyebrow) {
  color: var(--gray-text);
  font-size: 1.16rem;
  line-height: 1.55;
}

.hero-tools {
  min-width: 320px;
  min-height: 230px;
  position: relative;
}

.mini-calculator {
  width: 164px;
  padding: 14px;
  position: absolute;
  right: 120px;
  top: 20px;
  border: 5px solid var(--navy);
  border-radius: 25px;
  background: var(--red);
  box-shadow: 10px 12px 0 var(--light-blue);
  transform: rotate(-8deg);
}

.calculator-display {
  min-height: 42px;
  margin-bottom: 11px;
  padding: 8px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--white);
  color: var(--red);
  font-weight: 900;
}

.calculator-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.calculator-keys span {
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 900;
}

.mini-book {
  width: 166px;
  padding-bottom: 12px;
  position: absolute;
  right: 10px;
  bottom: 0;
  border: 5px solid var(--indigo);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 10px 12px 0 var(--indigo-200);
  transform: rotate(7deg);
  overflow: hidden;
}

.book-label {
  padding: 9px 12px;
  background: var(--orange);
  color: var(--white);
  text-align: center;
  font-size: .85rem;
  font-weight: 900;
}

.mini-book span {
  margin: 12px 15px 0;
  padding-bottom: 7px;
  display: block;
  border-bottom: 2px solid var(--indigo-200);
  color: var(--indigo);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.portal-grid {
  padding: 0 42px 54px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.portal-card {
  min-height: 230px;
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 22px;
  align-items: center;
  border: 2.5px solid transparent;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 8px 25px rgb(20 35 55 / 10%);
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), border-color .15s, box-shadow .15s;
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow);
}

.portal-card:focus-visible {
  outline: 4px solid var(--orange);
  outline-offset: 4px;
}

.reken-card:hover,
.reken-card:focus-visible {
  border-color: var(--red);
}

.woord-card:hover,
.woord-card:focus-visible {
  border-color: var(--orange);
}

.card-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 20px;
}

.calculator-icon {
  padding: 8px;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  border: 3px solid var(--navy);
  background: var(--red);
}

.calculator-icon .calculator-display {
  min-height: 24px;
  margin: 0;
  grid-column: 1 / -1;
  font-size: .9rem;
}

.calculator-icon span:not(.calculator-display) {
  height: 14px;
  border-radius: 4px;
  background: var(--white);
}

.book-icon {
  padding: 13px 12px 12px 24px;
  position: relative;
  justify-items: stretch;
  gap: 8px;
  border: 3px solid var(--indigo);
  background: var(--white);
}

.book-icon .book-spine {
  position: absolute;
  inset: 0 auto 0 0;
  width: 18px;
  border-radius: 17px 0 0 17px;
  background: var(--orange);
}

.book-icon span:not(.book-spine) {
  height: 5px;
  border-radius: 4px;
  background: var(--indigo-200);
}

.card-copy {
  display: grid;
  gap: 9px;
}

.card-copy strong {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.card-copy small {
  color: var(--gray-text);
  font-size: 1.02rem;
  line-height: 1.45;
}

.card-action {
  min-height: 56px;
  padding: 0 24px;
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
}

.reken-card .card-action {
  background: var(--red);
}

.reken-card:hover .card-action,
.reken-card:focus-visible .card-action {
  background: var(--red-dark);
}

.woord-card .card-action {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
}

@media (max-width: 860px) {
  .topbar {
    padding: 22px 28px;
  }

  .hero {
    margin: 28px;
    padding: 30px;
  }

  .hero-tools {
    display: none;
  }

  .portal-grid {
    padding: 0 28px 38px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 14px;
    padding: 20px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
  }

  .hero {
    margin: 20px;
    padding: 24px;
    border-radius: 24px;
  }

  .hero h2 {
    font-size: clamp(2.35rem, 13vw, 3.4rem);
  }

  .portal-grid {
    padding: 0 20px 30px;
  }

  .portal-card {
    min-height: 210px;
    padding: 22px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card-icon {
    width: 66px;
    height: 66px;
  }
}
