/* SAT Bot — light page, blurple-dominant. The demo panel stays dark because
   real Discord is dark, and it should read as a genuine artifact on the page. */

:root {
  --blurple: #5865f2;
  --blurple-deep: #4149d4;
  --blurple-dark: #2f36a8;
  /* Sampled from the logo, so navy surfaces match the mark exactly. */
  --periwinkle: #8ca2f4;
  --deep: #081838;

  /* Everything below flips between themes. --deep does not: it is the logo's
     navy and stays put in both, which is why it is separate from --ink. */
  --paper: #fcfcff;
  --band: #eceefd;
  --card: #fff;
  --nav-bg: rgba(252, 252, 255, 0.88);
  --ink: #081838;
  --ink-soft: #55597a;
  --prose: #3c405e;
  --line: #dcdff4;
  --line-soft: #f0f1fa;
  --accent-text: var(--blurple-deep);
  --shadow: rgba(8, 24, 56, 0.4);

  --green: #1f9254;
  --red: #d13438;

  --dc-bg: #313338;
  --dc-embed: #2b2d31;
  --dc-text: #dbdee1;
  --dc-mute: #949ba4;
  --dc-grey: #4e5058;
  --dc-green: #248046;
  --dc-red: #da373c;
  --teal: #1abc9c;

  --display: 'Bricolage Grotesque', 'Archivo', system-ui, sans-serif;
  --body: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1140px;
  --pad: 28px;
}

/* Dark values live in one place and are applied twice: once for people whose
   system asks for dark and who have not chosen otherwise, once for an explicit
   choice. [data-theme="light"] therefore beats a dark system preference. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0a1531;
    --band: #0f1e42;
    --card: #101f45;
    --nav-bg: rgba(10, 21, 49, 0.88);
    --ink: #e9eeff;
    --ink-soft: #9aa8cf;
    --prose: #c3cdea;
    --line: #1e2f5e;
    --line-soft: #16264d;
    --accent-text: var(--periwinkle);
    --shadow: rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme='dark'] {
  --paper: #0a1531;
  --band: #0f1e42;
  --card: #101f45;
  --nav-bg: rgba(10, 21, 49, 0.88);
  --ink: #e9eeff;
  --ink-soft: #9aa8cf;
  --prose: #c3cdea;
  --line: #1e2f5e;
  --line-soft: #16264d;
  --accent-text: var(--periwinkle);
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

/* The UA's [hidden] rule loses to any author `display` declaration, and
   .embed-title sets display:flex — so hidden elements need this to stay hidden. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent-text);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------------- type ---------------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
}

h1 {
  font-size: clamp(2.9rem, 8vw, 5.4rem);
}

h2 {
  font-size: clamp(2.1rem, 5.6vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  line-height: 1.1;
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 22px 0 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 18px;
}

/* A filled answer bubble — the one artifact everyone recognises from a real
   answer sheet. Used only as the eyebrow mark. */
.eyebrow::before {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.22);
  flex-shrink: 0;
}

/* ---------------- nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 68px;
}

.brand .mark {
  display: block;
  border-radius: 7px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

/* Must exclude .btn — `.nav-links a` outranks `.btn-solid`, so without this the
   nav button loses its white bold text to the plain link styling. */
.nav-links a:not(.btn) {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:not(.btn):hover {
  color: var(--ink);
}

/* Theme toggle. Both icons are in the DOM; CSS picks which one shows, so the
   button is correct on first paint without JavaScript having to draw it. */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--blurple);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--blurple);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  grid-area: 1 / 1;
}

.theme-toggle .moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .sun {
    display: none;
  }

  :root:not([data-theme='light']) .theme-toggle .moon {
    display: block;
  }
}

:root[data-theme='dark'] .theme-toggle .sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .moon {
  display: block;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.08s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-solid {
  background: var(--blurple);
  color: #fff;
}

.btn-solid:hover {
  background: var(--blurple-deep);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-line:hover {
  border-color: var(--blurple);
  color: var(--accent-text);
}

/* Sits on the blurple band, so it needs white text on something dark rather
   than blurple-on-white, which greys out against the field behind it. */
.btn-invert {
  background: var(--deep);
  color: #fff;
}

.btn-invert:hover {
  background: #000;
}

.nav .btn {
  padding: 10px 20px;
  font-size: 15px;
}

/* The closing call to action is the one button on the page that has to be
   noticed, so it gets a halo that pulses outward and a slow rise. Nothing else
   on the page moves on its own, which is what makes this read as the
   destination rather than as decoration. */
.btn-pulse {
  position: relative;
  animation: cta-rise 2.6s ease-in-out infinite;
}

/* The halo is a pseudo-element rather than a box-shadow on the button itself:
   a spreading shadow would repaint the button on every frame and fight the
   rise transform. `inset` + `border-radius: inherit` keep it glued to the
   pill shape without restating the radius. */
.btn-pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid #fff;
  animation: cta-halo 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes cta-rise {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes cta-halo {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

/* Once it has been noticed, stop selling. Hover and press also need the
   animation gone so `.btn:active`'s transform is not overridden by a running
   keyframe, which outranks it. */
.btn-pulse:hover,
.btn-pulse:focus-visible,
.btn-pulse:active {
  animation: none;
}

.btn-pulse:hover::after,
.btn-pulse:focus-visible::after,
.btn-pulse:active::after {
  animation: none;
  opacity: 0;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

/* ---------------- bands ---------------- */

.band {
  padding: 104px 0;
}

.band-tint {
  background: var(--band);
}

.band-blurple {
  background: var(--blurple);
  color: #fff;
}

.band-blurple .lede,
.band-blurple .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.band-blurple .eyebrow::before {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.hero {
  padding: 112px 0 96px;
}

.hero .wrap {
  max-width: 900px;
}

.hero h1 {
  max-width: 15ch;
}

.hero .lede {
  max-width: 46ch;
}

/* ---------------- feature rows ---------------- */

.row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}

.row + .row {
  margin-top: 104px;
}

.row-flip .row-text {
  order: 2;
}

.row p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin: 20px 0 0;
  max-width: 46ch;
}

.band-blurple .row p {
  color: rgba(255, 255, 255, 0.86);
}

/* ---------------- leaderboard mock ---------------- */

.lb {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 18px 40px -24px var(--shadow);
}

.band-blurple .lb {
  border-color: transparent;
}

.lb-head {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 10px 14px 14px;
  border-bottom: 1px solid var(--line);
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  color: var(--ink);
}

.lb-row + .lb-row {
  border-top: 1px solid var(--line-soft);
}

.lb-rank {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--band);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.lb-row.is-you {
  background: rgba(88, 101, 242, 0.07);
  border-radius: 10px;
}

.lb-row.is-you .lb-rank {
  background: var(--blurple);
  color: #fff;
}

.lb-name {
  font-weight: 600;
  font-size: 15px;
}

.lb-score {
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.lb-row.is-you .lb-name {
  color: var(--accent-text);
}

/* ---------------- difficulty picker mock ---------------- */

/* Mirrors Discord's slash-command option list, which is always dark regardless
   of the page theme — same reasoning as the demo panel. */
.picker {
  background: var(--dc-embed);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 18px 40px -24px var(--shadow);
}

.picker-cmd {
  color: var(--dc-mute);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.picker-cmd span {
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  background: rgba(88, 101, 242, 0.28);
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
}

.picker-opt {
  color: var(--dc-text);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 12px;
  border-radius: 6px;
  margin-top: 4px;
}

.picker-opt.is-on {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* ---------------- discord demo ---------------- */

.demo {
  background: var(--dc-bg);
  border-radius: 20px;
  padding: 22px;
  max-width: 700px;
  margin: 44px auto 0;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  font-family: var(--body);
}

.demo-chan {
  color: var(--dc-mute);
  font-size: 14px;
  font-weight: 700;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.msg {
  display: flex;
  gap: 15px;
}

.pfp {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--deep);
}

.msg-body {
  flex: 1;
  min-width: 0;
}

.msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.msg-name {
  color: #f2f3f5;
  font-weight: 700;
  font-size: 15px;
}

.tag {
  background: var(--blurple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.stamp {
  color: var(--dc-mute);
  font-size: 12px;
}

/* A second message under the bot's, so the demo reads as a conversation rather
   than a lone embed floating in an empty channel. */
.msg-next {
  margin-top: 20px;
}

.msg-text {
  color: var(--dc-text);
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
}

.embed {
  background: var(--dc-embed);
  border-left: 4px solid var(--teal);
  border-radius: 4px;
  padding: 13px 15px 14px;
  max-width: 520px;
  transition: border-color 0.2s;
}

.embed.ok {
  border-left-color: #57f287;
}

.embed.no {
  border-left-color: #ed4245;
}

.embed-by {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.embed-by svg {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.embed-by span {
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 700;
}

.embed-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 9px;
}

.embed-title svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.embed-title.ok {
  color: #57f287;
}

.embed-title.no {
  color: #ed4245;
}

.q {
  color: var(--dc-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
}

/* Bigger and heavier than Discord would render it, deliberately — this is a
   marketing screenshot that has to stay legible when the page is scrolled past
   at speed, not a faithful copy of the client. */
.opts {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--dc-text);
  font-size: 16px;
  font-weight: 600;
}

/* No padding between options: the gaps were most of the embed's height, and
   closing them shrinks the box while the type inside it grows. */
.opts li {
  padding: 0;
  line-height: 1.5;
}

.opts b {
  color: #fff;
}

.field {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.field-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}

.field-val {
  color: #b5bac1;
  font-size: 14px;
  margin: 0;
  white-space: pre-wrap;
}

.foot {
  color: var(--dc-mute);
  font-size: 12px;
  margin-top: 13px;
}

.row-btns {
  display: flex;
  gap: 8px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.dbtn {
  min-width: 62px;
  padding: 10px 17px;
  border: 0;
  border-radius: 4px;
  background: var(--blurple);
  color: #fff;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  /* Without this the letter sits left inside the 62px min-width rather than in
     the middle of the button. */
  justify-content: center;
  gap: 7px;
  transition: background 0.12s, opacity 0.12s;
}

.dbtn svg {
  width: 15px;
  height: 15px;
}

.dbtn:hover:not(:disabled) {
  background: var(--blurple-deep);
}

.dbtn:disabled {
  cursor: default;
  opacity: 0.62;
}

.dbtn.g {
  background: var(--dc-grey);
}

.dbtn.win {
  background: var(--dc-green);
}

.dbtn.lose {
  background: var(--dc-red);
}

.dbtn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.note {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 22px 0 0;
}

/* ---------------- commands ---------------- */

.cmds {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 44px;
}

.cmd {
  background: var(--paper);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: baseline;
}

.cmd code {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-text);
}

.cmd span {
  color: var(--ink-soft);
  font-size: 16px;
}

/* Leads the line, so it has to out-weigh the grey description behind it:
   Archivo's heaviest loaded weight plus full ink. 800 is in the font request
   for this — without it the browser fakes the weight and it reads no bolder. */
.cmd span strong {
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------------- closing cta ---------------- */

.close {
  text-align: center;
}

.close .lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 40ch;
}

.close .actions {
  justify-content: center;
}

/* ---------------- footer ---------------- */

.site-foot {
  background: var(--deep);
  color: #9aa8d4;
  padding: 56px 0 64px;
}

.site-foot .brand {
  color: #fff;
}

.foot-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.foot-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.foot-links a {
  color: var(--periwinkle);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.foot-links a:hover {
  color: #fff;
}

.fine {
  color: #6f7396;
  font-size: 13px;
  line-height: 1.6;
  margin: 34px 0 0;
  max-width: 66ch;
}

/* ---------------- legal ---------------- */

.legal {
  max-width: 740px;
  padding-top: 64px;
  padding-bottom: 88px;
}

.legal h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin-bottom: 10px;
}

.stamp-date {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 44px;
}

.legal h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin: 46px 0 14px;
}

.legal h3 {
  font-size: 1.15rem;
  margin: 30px 0 8px;
}

.legal p,
.legal li {
  color: var(--prose);
  font-size: 16.5px;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 9px;
}

.legal code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--band);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--accent-text);
}

.callout {
  background: var(--band);
  border-left: 4px solid var(--blurple);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.callout p {
  margin: 0;
}

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .row,
  .row-flip .row-text {
    grid-template-columns: 1fr;
    order: 0;
  }

  .row {
    gap: 34px;
  }

  .row + .row {
    margin-top: 72px;
  }
}

@media (max-width: 680px) {
  :root {
    --pad: 20px;
  }

  body {
    font-size: 16px;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .band {
    padding: 72px 0;
  }

  .hero {
    padding: 76px 0 64px;
  }

  .demo {
    padding: 16px 14px 20px;
    border-radius: 16px;
  }

  .msg {
    gap: 11px;
  }

  .pfp {
    width: 32px;
    height: 32px;
  }

  .dbtn {
    flex: 1 1 60px;
    justify-content: center;
  }

  .cmd {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    /* Kills the pulsing call to action too. It loses the attention it was
       added for, which is the correct trade — the button still reads as the
       primary action from its size and contrast alone. */
    animation: none !important;
  }
}
