/* SchoolMachine's plain pages (/schools and each school's page). A file,
   not a <style> block, so the Content-Security-Policy needs no
   'unsafe-inline' for styles. The brand: deep navy, royal blue and teal,
   with the buddy's gold. */

:root {
  --navy: #0b1640;
  --royal: #2b3fd6;
  --teal: #2aa3c8;
  --gold: #ffc233;
  --bg: #f4f6fc;
  --surface: #ffffff;
  --ink: #0e1a4f;
  --ink-2: #3e4a72;
  --line: #dfe4f2;
  --link: #2b3fd6;
  --chip: #eef1fb;
  --shadow: 0 1px 2px rgba(11, 22, 64, 0.06), 0 8px 28px rgba(11, 22, 64, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080f2c;
    --surface: #111a3f;
    --ink: #eef1ff;
    --ink-2: #b9c1e3;
    --line: #22306a;
    --link: #a9b6ff;
    --chip: #1a2552;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
}

a {
  color: var(--link);
}

img {
  max-width: 100%;
}

/* ------------------------------------------------------------ top and foot */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  padding-top: env(safe-area-inset-top);
}

.top__inner,
.foot__inner,
.hero__inner,
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.top__inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.wordmark img {
  width: 26px;
  height: auto;
}

.wordmark b {
  color: var(--gold);
  font-weight: 800;
}

.top__nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top__nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.top__nav a:hover {
  color: #fff;
}

.top__nav .top__cta {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.foot {
  margin-top: 48px;
  padding: 32px 0 calc(40px + env(safe-area-inset-bottom));
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9375rem;
}

.foot a {
  color: #fff;
}

.foot p {
  max-width: 60ch;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(42, 163, 200, 0.55), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, #16248a 48%, var(--royal) 78%, var(--teal) 130%);
  padding: calc(96px + env(safe-area-inset-top)) 0 56px;
}

.hero::after {
  /* The buddy's gold, as a soft glow behind it. */
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 194, 51, 0.28), transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero--short {
  padding-bottom: 44px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.125rem, 6vw + 0.5rem, 3.75rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.lede {
  margin: 16px 0 0;
  max-width: 36rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: pretty;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn--store {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn--store:hover {
  background: #f1f3ff;
}

.btn--soon {
  background: rgba(255, 194, 51, 0.16);
  color: var(--gold);
  border: 1.5px solid rgba(255, 194, 51, 0.6);
}

.btn--ghost {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero__art {
  display: flex;
  justify-content: center;
}

.buddy {
  width: 132px;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(3, 8, 40, 0.45));
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .buddy {
    animation: none;
  }
}

@media (min-width: 820px) {
  .hero {
    padding: 132px 0 84px;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
  }

  .hero__text {
    order: 0;
  }

  .buddy {
    width: 230px;
  }
}

@media (max-width: 819px) {
  .hero__art {
    order: -1;
    justify-content: flex-start;
  }

  .buddy {
    width: 76px;
  }
}

/* ------------------------------------------------------------------ cards */

.wrap {
  display: grid;
  gap: 16px;
  margin-top: -24px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.card p:last-child {
  margin-bottom: 0;
}

.note {
  font-size: 0.875rem;
  margin-top: 14px !important;
}

@media (min-width: 820px) {
  .wrap {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 20px;
    margin-top: -36px;
  }

  .card {
    padding: 28px;
  }
}

.reads,
.steps,
.school-list,
.nearby ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reads li {
  display: grid;
  gap: 2px;
  padding: 12px 0 12px 18px;
  border-top: 1px solid var(--line);
  position: relative;
}

.reads li:first-child {
  border-top: 0;
  padding-top: 2px;
}

.reads li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.reads li:first-child::before {
  top: 10px;
}

.reads span,
.steps span,
.school-list span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  display: grid;
  gap: 2px;
  padding-left: 44px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--royal);
  color: #fff;
  font-weight: 800;
  font-size: 0.9375rem;
}

.faq {
  margin: 0;
}

.faq dt {
  font-weight: 700;
  margin-top: 14px;
}

.faq dt:first-child {
  margin-top: 0;
}

.faq dd {
  margin: 4px 0 0;
  color: var(--ink-2);
}

.share {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--gold), var(--teal)) border-box;
  border: 2px solid transparent;
}

.share__post {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--chip);
  color: var(--ink);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.nearby ul {
  display: grid;
  gap: 8px;
}

.school-list {
  display: grid;
  gap: 0;
}

.school-list a {
  display: grid;
  gap: 1px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.school-list li:first-child a {
  border-top: 0;
  padding-top: 0;
}

.school-list a:hover strong {
  color: var(--link);
}

/* Home and invite: the promise about logins, in the buddy's gold. */
.keychain {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--gold), var(--teal)) border-box;
  border: 2px solid transparent;
}

.keychain h2::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: -3px;
  background: url("/brand/buddy.svg") center / contain no-repeat;
}

.nearby p {
  margin: 14px 0 0;
  font-weight: 600;
}
