:root {
  --ink: #132142;
  --cream: #fff9e8;
  --yellow: #ffdb45;
  --mint: #65dfcf;
  --pink: #ff5d9e;
  --paper: #ffffff;
  --line: #1b2a50;
  font-family: "Trebuchet MS", "Avenir Next", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, .7) 0 5rem, transparent 5.1rem),
    linear-gradient(180deg, #55d7d2 0 34rem, var(--cream) 34rem);
}

a { color: inherit; }

.sky {
  position: absolute;
  inset: 0 0 auto;
  height: 34rem;
  overflow: hidden;
  pointer-events: none;
}

.sky i {
  position: absolute;
  width: 6rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255,255,255,.46);
}

.sky i::before, .sky i::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.sky i::before { width: 2.7rem; height: 2.7rem; left: .8rem; }
.sky i::after { width: 3.5rem; height: 3.5rem; right: .7rem; }
.sky i:nth-child(1) { top: 8rem; left: 7%; transform: scale(.72); }
.sky i:nth-child(2) { top: 13rem; right: 8%; }
.sky i:nth-child(3) { top: 25rem; left: 43%; transform: scale(.55); }

.topbar, main, footer {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  min-height: 6.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.4rem;
  aspect-ratio: 1;
  border: 3px solid var(--line);
  border-radius: 1.1rem;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--line);
  font-size: 1.4rem;
}

.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-size: 1.25rem; }
.brand small { margin-top: .2rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }

.safe-pill, .count {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1rem;
  border: 2px solid rgba(19, 33, 66, .45);
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  font-size: .82rem;
  font-weight: 800;
}

.hero {
  min-height: 27.5rem;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 3rem;
  padding: 2rem clamp(1rem, 4vw, 4rem) 5rem;
}

.eyebrow {
  display: inline-flex;
  padding: .45rem .75rem;
  border: 2px solid var(--line);
  border-radius: .6rem;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--line);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.eyebrow.dark { background: var(--mint); box-shadow: none; }

h1, h2, p { margin-top: 0; }
h1 {
  margin: 1.25rem 0 1rem;
  font-size: clamp(2.65rem, 7vw, 5.7rem);
  line-height: .94;
  letter-spacing: -.065em;
}

h1 mark {
  color: inherit;
  background: linear-gradient(transparent 58%, var(--yellow) 58%);
}

.hero-copy p {
  max-width: 38rem;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.55;
  font-weight: 650;
}

.mascot {
  position: relative;
  min-height: 18rem;
  border: 3px solid var(--line);
  border-radius: 50% 50% 40% 40%;
  overflow: hidden;
  background: #bdf3dd;
  box-shadow: 10px 10px 0 rgba(19, 33, 66, .16);
}

.sun { position: absolute; right: 2rem; top: 1.2rem; font-size: 3.4rem; }
.mountain { position: absolute; bottom: -4rem; width: 16rem; height: 16rem; transform: rotate(45deg); border: 3px solid var(--line); background: #6eb475; }
.mountain-a { left: -3rem; }
.mountain-b { right: -2rem; bottom: -6rem; background: #4e9667; }
.marmot { position: absolute; left: 50%; bottom: 2.8rem; transform: translateX(-50%); width: 8.5rem; height: 10rem; border: 3px solid var(--line); border-radius: 50% 50% 40% 40%; background: #b66e42; color: transparent; box-shadow: inset 0 -1.2rem 0 #8e4f35; }
.marmot::before, .marmot::after { content: ""; position: absolute; top: -.7rem; width: 2rem; height: 2rem; border: 3px solid var(--line); border-radius: 50%; background: #b66e42; }
.marmot::before { left: .4rem; }.marmot::after { right: .4rem; }
.marmot-face { position: absolute; left: 50%; bottom: 8.9rem; transform: translateX(-50%); z-index: 2; font-size: 1.7rem; letter-spacing: 1.3rem; white-space: nowrap; }
.marmot-face b { display: block; margin: -.4rem 0 0 1rem; font-size: 2rem; }

.apps {
  margin-top: -2.3rem;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 3px solid var(--line);
  border-radius: 2.2rem;
  background: rgba(255,255,255,.94);
  box-shadow: 10px 10px 0 var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

h2 { margin: .7rem 0 0; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.045em; }

.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }

.app-card {
  position: relative;
  min-height: 18rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 1.2rem;
  padding: 2rem;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 1.6rem;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.app-card:hover, .app-card:focus-visible { transform: translateY(-5px); box-shadow: 0 9px 0 var(--line); outline: none; }
.app-card.potion { background: #ffdd66; }
.app-card.bugs { background: #7de2d5; }
.app-card.romans { grid-column: 1 / -1; min-height: 14rem; background: #c9b3ff; }
.card-number { position: absolute; top: 1.4rem; right: 1.5rem; font-weight: 900; opacity: .5; }
.card-icon { display: grid; place-items: center; width: 5.3rem; aspect-ratio: 1; border: 3px solid var(--line); border-radius: 1.5rem; background: var(--paper); font-size: 2.7rem; }
.card-copy small, .card-copy strong, .card-copy span { display: block; }
.card-copy small { margin-bottom: .45rem; font-size: .68rem; font-weight: 900; letter-spacing: .1em; }
.card-copy strong { font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.05; }
.card-copy span { margin-top: .6rem; line-height: 1.35; font-weight: 650; }
.arrow { display: grid; place-items: center; width: 3rem; aspect-ratio: 1; border: 3px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 1.5rem; font-weight: 900; }

footer {
  display: flex;
  justify-content: center;
  gap: .8rem;
  padding: 3.5rem 1rem 2rem;
  font-size: .8rem;
  font-weight: 800;
  opacity: .72;
}

@media (max-width: 760px) {
  body { background: linear-gradient(180deg, #55d7d2 0 31rem, var(--cream) 31rem); }
  .topbar { min-height: 5.5rem; }
  .safe-pill { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem .25rem 5rem; }
  .hero-copy p { font-size: 1rem; }
  .mascot { min-height: 11rem; width: min(20rem, 90%); margin-inline: auto; }
  .marmot { bottom: -1.5rem; transform: translateX(-50%) scale(.72); }
  .marmot-face { bottom: 4.7rem; transform: translateX(-50%) scale(.72); }
  .apps { margin-top: -2.8rem; border-radius: 1.5rem; box-shadow: 6px 6px 0 var(--line); }
  .section-heading { align-items: start; }
  .count { display: none; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card.romans { grid-column: auto; min-height: 15rem; }
  .app-card { min-height: 15rem; grid-template-columns: auto 1fr; padding: 1.35rem; }
  .card-icon { width: 4rem; font-size: 2rem; }
  .arrow { position: absolute; right: 1.25rem; top: 1.25rem; }
  footer { flex-wrap: wrap; }
}

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