*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Keep anchored sections from landing under the fixed header
     (~93px tall: 2×sp-20 vertical padding + the demo button). */
  scroll-padding-top: 6.5rem;
}

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--surface-white);
  min-width: 1200px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

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

.section {
  position: relative;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-align: center;
}

.section-title--inverse {
  color: var(--text-inverse);
}

.section-lead {
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-secondary);
  text-align: center;
  max-width: 40rem;
}

.section-lead--inverse {
  color: var(--text-tertiary);
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: center;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  padding: var(--sp-16) var(--sp-32);
  border-radius: var(--radius-12);
  font-size: var(--fs-ui-m);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn--primary {
  background: var(--ui-primary);
  color: var(--text-inverse);
}

.btn--secondary {
  background: var(--ui-secondary);
  color: var(--text-primary);
}

.btn--outline {
  background: transparent;
  border-color: var(--ui-primary);
  color: var(--text-primary);
}

.btn--outline-inverse {
  background: transparent;
  border-color: var(--ui-secondary);
  color: var(--text-inverse);
}

.btn--block {
  width: 100%;
}

/* ---- Cards ---- */
.card {
  background: var(--surface-white);
  border-radius: var(--radius-12);
}

/* ---- Tooltip ---- */
.tooltip {
  position: relative;
  display: inline-flex;
  cursor: help;
}

.tooltip__bubble {
  position: absolute;
  bottom: calc(100% + var(--sp-8));
  right: 0;
  width: 14rem;
  padding: var(--sp-12);
  border-radius: var(--radius-12);
  background: var(--surface-dark-blue);
  color: var(--text-inverse);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-ui-s);
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.tooltip:hover .tooltip__bubble,
.tooltip:focus-within .tooltip__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---- Checkbox ---- */
.checkbox {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  cursor: pointer;
  font-size: var(--fs-body-14);
}

.checkbox input[type="checkbox"] {
  appearance: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1.5px solid var(--ui-disable);
  border-radius: 0.25rem;
  position: relative;
  background: var(--surface-white);
}

.checkbox input[type="checkbox"]:checked {
  background: var(--ui-primary);
  border-color: var(--ui-primary);
}

.checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.0625rem;
  width: 0.3rem;
  height: 0.55rem;
  border: solid var(--text-inverse);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
  background: var(--ui-disable);
  border-color: var(--ui-disable);
}

.checkbox--disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
}

.checkbox__accent {
  color: var(--text-primary);
}

.checkbox__note {
  color: var(--text-secondary);
}
