/* Theme tokens and global reset */
:root {
  --brand-blue: #1c4e97;
  --cream: #ffe6d2;
  --paper: #ffffff;
  --overlay: rgba(0,0,0,.45);

  /* CTA */
  --cta: #ff9900;
  --cta-dark: #e68600;

  /* Layout + effects */
  --container: clamp(10px, 2.4vw, 28px);
  --radius-xl: 18px;
  --shadow-lg: 0 12px 28px rgba(0,0,0,.25);
  --header-offset: 76px;

  /* Typography */
  --body-size: 18px;
  --headline-weight: 500;
  --body-weight: 400;

  /* Content + spacing */
  --content-max: clamp(1500px, 90vw, 2200px);
  --stack-1: clamp(10px, 1.1vw, 14px);
  --stack-2: clamp(14px, 1.6vw, 22px);
  --stack-3: clamp(28px, 3.4vw, 48px);
  --section-pad: clamp(48px, 8vw, 96px);

  /* Additional tokens */
  --success: #27c17c;
  --card-bg: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
}

@media (max-width: 960px) {
  :root {
    --header-offset: 0px;
  }
}

@media (max-width: 480px) {
  :root {
    --body-size: 16px;
    --container: 14px;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }
}

* {
  box-sizing: border-box;
}

/* Ensure reCAPTCHA badge stays on top */
.grecaptcha-badge {
  z-index: 9999 !important;
}

/* Accessible focus polish: remove default outlines on focus, keep a clear ring for keyboard users */
input:focus,
textarea:focus,
select:focus,
button:focus,
a:focus {
  outline: none;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: rgba(91, 150, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(91, 150, 255, 0.25);
}

/* Strip accidental outlines on non-interactive containers */
div:focus {
  outline: none;
  box-shadow: none;
}

html,
body {
  height: 100%;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  color: var(--paper);
  background: #0b1324;
}

body.light-ui {
  color-scheme: light;
  background: #f8fafc;
  color: #0f172a;
  --overlay: rgba(255, 255, 255, 0.55);
  --paper: #0f172a;
  --card-bg: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
}

@media (max-width: 1280px) and (min-width: 1024px) and (pointer: fine) {
  html {
    zoom: 0.9;
  }
}
