/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-button);
  font-weight: 500;
  font-size: var(--fz-body-md);
  line-height: 1.4;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
  white-space: nowrap;
  min-height: 50px;
}

.btn--sm {
  padding: 9px 14px;
  border-radius: var(--radius-button-sm);
  min-height: 40px;
}

.btn--primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.btn--primary:hover {
  background-color: var(--primary-strong);
  transform: translateY(-1px);
}

.btn--ghost {
  background-color: transparent;
  color: var(--primary);
}

:root[data-theme="dark"] .btn--ghost {
  color: var(--secondary);
}

.btn--ghost:hover {
  background-color: rgba(6, 98, 74, 0.08);
}

.btn--outline {
  background-color: var(--background-2);
  color: var(--foreground-2);
  border: 1px solid var(--border-1);
  box-shadow: var(--shadow-card);
}

.btn--outline:hover {
  background-color: var(--background-1);
}

.btn--block {
  width: 100%;
  max-width: 300px;
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn__icon--invert {
  filter: brightness(0) invert(1);
}

/* ============================================================
   Card
   ============================================================ */
.card {
  background-color: var(--background-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.card--on-muted {
  background-color: var(--card-on-muted-bg);
  color: var(--card-on-muted-fg);
}

.card--on-muted .card__title {
  color: var(--card-on-muted-fg);
}

.card--on-muted .card__body {
  color: var(--card-on-muted-fg-muted);
}

.card__icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card__icon--amber {
  background-color: var(--tertiary-amber-soft);
}

.card__icon--green {
  background-color: var(--tertiary-green-soft);
}

.card__icon img {
  width: 30px;
  height: 30px;
}

.card__title {
  font-size: var(--fz-h5);
  font-weight: 700;
  line-height: 1.45;
  color: var(--foreground-1);
}

.card__body {
  font-size: var(--fz-body-md);
  font-weight: 500;
  line-height: 1.55;
  color: var(--foreground-2);
}

/* ============================================================
   Section header
   ============================================================ */
.section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.section__title {
  font-size: var(--fz-h3);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.section__subtitle {
  font-size: var(--fz-body-lg);
  font-weight: 500;
  color: var(--foreground-2);
  line-height: 1.45;
}

/* ============================================================
   Nav bar
   ============================================================ */
.navbar {
  background-color: var(--background-2);
  padding: 10px 16px;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 16px;
  flex-wrap: wrap;
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
  line-height: 26px;
  letter-spacing: 0;
}

:root[data-theme="dark"] .navbar__brand {
  color: var(--foreground-1);
}

/* In dark mode the gradient logo is unreadable — render it white */
:root[data-theme="dark"] .navbar__brand img {
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .navbar__brand img {
    filter: brightness(0) invert(1);
  }
}

.navbar__brand img {
  width: 36px;
  height: 31px;
  object-fit: contain;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar__nav a {
  font-size: var(--fz-body-sm);
  font-weight: 500;
  color: var(--foreground-3);
  transition: color 0.15s;
}

.navbar__nav a:hover {
  color: var(--primary);
}

:root[data-theme="dark"] .navbar__nav a:hover {
  color: var(--secondary);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   Theme toggle
   ============================================================ */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-button-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-3);
  transition: background-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
  background-color: var(--surface-muted);
  color: var(--foreground-1);
}

:root[data-theme="dark"] .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--foreground-1);
}

.theme-toggle__icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__sun { display: inline-block; }
.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: inline-block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__sun { display: none; }
  :root:not([data-theme]) .theme-toggle__moon { display: inline-block; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background-color: var(--primary);
  color: #ffffff;
  padding: 65px 40px 24px;
  border-radius: var(--radius-block);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer__col h4 {
  color: var(--secondary);
  font-size: var(--fz-body-md);
  font-weight: 700;
  margin-bottom: 16px;
}

.footer__col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__col a {
  font-size: var(--fz-body-sm);
  font-weight: 400;
  color: #ffffff;
  opacity: 0.92;
  transition: opacity 0.15s;
}

.footer__col a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: var(--fz-body-md);
  margin-bottom: 16px;
}

.footer__brand img {
  width: 36px;
  height: auto;
}

.footer__about {
  font-size: var(--fz-body-sm);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 16px;
  max-width: 280px;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__social a {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.15s, transform 0.15s;
}

.footer__social a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.footer__social svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 48px;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: var(--fz-caption);
  font-weight: 400;
}

.footer__bottom p {
  opacity: 0.92;
}

.footer__disclaimer {
  text-align: right;
  max-width: 480px;
}

/* ============================================================
   Responsive — components
   ============================================================ */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar__inner {
    padding: 0;
    gap: 12px;
  }
  .navbar__nav {
    display: none;
  }
  .navbar__actions .btn {
    min-height: 40px;
    padding: 8px 12px;
    font-size: var(--fz-body-sm);
  }
  .footer {
    padding: 40px 24px 20px;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer__disclaimer {
    text-align: center;
  }
  .section__title {
    font-size: 24px;
  }
  .section__subtitle {
    font-size: var(--fz-body-md);
  }
}
