:root {
  /* transitions */
  --transition-duration: 1s;

  /* fonts */
  --font-sans: "Lato", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", monospace;

  /* colors */
  --transparent: transparent;
  --white: rgba(255, 255, 255, 1);
  --white-transparent: rgba(255, 255, 255, 0.65);
  --black: rgba(0, 0, 0, 1);
  --black-transparent: rgba(0, 0, 0, 0.55);
  --nph-blue: rgba(0, 112, 158, 1);
  --nph-grey: rgba(51, 51, 51, 1);
  --custom-blue: rgba(58, 67, 147, 1); /* probably unused */
  --custom-dark-blue: rgba(1, 46, 120, 1);
  --custom-light-blue: rgba(194, 201, 255, 0.27);
  --custom-green: rgba(83, 157, 104, 1);
  --custom-red: rgba(168, 7, 45, 1);
  --custom-sky-blue: rgba(1, 204, 255, 1);
  --custom-bubble-code: rgba(200, 255, 0, 1);

  /* effects */
  --active-effect: blur(7px);

  /* backgrounds */
  --bg-hero: linear-gradient(
    180deg,
    rgba(224, 221, 247, 1) 10.09%,
    var(--white) 93.47%
  );
  --bg-cta-button: linear-gradient(
    16deg,
    var(--nph-blue) 9.3%,
    rgba(132, 104, 221, 1) 87.07%
  );
  --bg-modal: linear-gradient(
    164.79deg,
    var(--nph-blue) 11.66%,
    rgba(75, 54, 144, 1) 100%
  );
  --bg-modal-backdrop: rgba(37, 34, 84, 0.85);

  --bg-chat-header: linear-gradient(
    0deg,
    rgba(9, 106, 157, 0.36) 0%,
    rgba(9, 106, 157, 1) 46.71%
  );
  --bg-chat-bubble: var(--custom-light-blue);
  --bg-input: linear-gradient(
    92.06deg,
    rgba(65, 85, 155, 1) 3.09%,
    rgba(88, 69, 153, 1) 100%
  );

  /* landing sizes */
  --landing-header-height: 64px;

  /* shadow colors */
  --shadow-input: 0px -2px 24.2px 0px rgba(28, 2, 95, 0.25);

  /* element colors */
  --btn-bg-primary: var(--custom-sky-blue);
  --btn-bg-secondary: var(--white);
  --btn-bg-tertiary: var(--custom-light-blue);
  --btn-clr-primary: var(--custom-dark-blue);
  --btn-clr-secondary: var(--custom-dark-blue);
  --btn-clr-tertiary: var(--white);
}
* {
  font-family: var(--font-sans);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  transition-duration: var(--transition-duration);
  box-shadow: none;
}

html,
body {
  font-family: var(--font-sans);
  line-height: 1.25;
}

body:has(dialog[open]) {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 900;
}
h1 {
  font-size: 2.5rem;
  line-height: 2.688rem;
}
h2 {
  font-size: 2rem;
  line-height: 100%;
}
*:focus-visible {
  outline: 2px solid var(--custom-sky-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(1, 46, 120, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

code,
pre {
  font-family: var(--font-mono);
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* Buttons */
.btn {
  height: 48px;
  border-radius: 15px;
  padding: 15px 25px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid currentColor;
  width: fit-content;
  font-weight: 700;
  font-size: 0.875rem;
  gap: 2px;
}
.btn:hover:not(:disabled),
.btn:focus:not(:disabled) {
  box-shadow: 0 0 7px 0 var(--white-transparent);
}

.btn-icon {
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  aspect-ratio: 1;
  padding: 0;
  background-color: var(--custom-sky-blue);
  border-color: var(--custom-sky-blue);
  color: var(--white);
}
.btn-icon.btn-icon--small {
  height: 24px;
  min-width: 24px;
}

.btn-icon:disabled {
  background-color: var(--custom-light-blue);
  border-color: var(--custom-light-blue);
  color: var(--white);
}
.btn-icon:disabled img {
  filter: invert();
}

.btn-text-icon {
  justify-content: space-between;
}

.btn-primary {
  background-color: var(--custom-sky-blue);
  border-color: var(--custom-sky-blue);
  color: var(--custom-dark-blue);
}

.btn-secondary {
  background-color: var(--nph-blue);
  border-color: var(--nph-blue);
  color: var(--white);
}

.btn-inverted {
  background-color: var(--transparent);
  border-color: var(--white);
  color: var(--white);
}
.btn-close {
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  aspect-ratio: 1;
  padding: 0;
  background-color: var(--transparent);
  color: var(--white);
}

.btn-option {
  padding: 12px;
  background-color: var(--transparent);
  color: var(--white);
  height: auto;
  width: 100%;
  gap: 8px;
  justify-content: start;
}
.btn-option:has(input:checked) {
  border-color: var(--custom-sky-blue);
}
.btn-option:has(input:checked) input:checked {
  accent-color: var(--custom-sky-blue);
}

.btn--correct {
  background-color: var(--custom-green);
  border-color: var(--custom-light-blue);
}
.btn--wrong,
.btn--jailbreak {
  background: var(--custom-red);
  border-color: var(--custom-light-blue);
}

.btn-cta {
  background: var(--bg-cta-button);
  color: var(--white);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;

  border-radius: 13px;
  padding: 1px 9px 2px;
  border: 1px solid var(--white-transparent);
  background-color: var(--nph-blue);
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  line-height: 1;
}

.badge:hover,
.badge:focus-visible {
  background-color: var(--nph-blue);
  border-color: var(--white);
  color: var(--white);
}

.badge:active,
.badge--active {
  background-color: var(--white);
  border-color: var(--white);
  color: var(--nph-blue);
}

/* hero */
section:has(.hero-animation) {
  position: relative;
}
.hero-animation {
  position: absolute;
  right: calc(50% - 76px);
  transform: translateX(50%) translateY(-100%);
  animation-duration: 1000ms;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
  animation-delay: 1000ms;
  animation-name: slide-down;
}

@keyframes slide-down {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(calc(var(--landing-header-height) * -1));
  }
}

/* ── Typing indicator ── */
.typing-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  height: 7px;
  justify-content: center;
}
.typing-dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--white);
  animation: blink 1.2s infinite;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
    box-shadow: 0 0 2px 2px var(--white-transparent);
  }
}

canvas#idCanvas {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
