/* ==========================================================================
   Chemesis Core — Base layer
   Minimal global normalization matching the approved Vercel prototype.
   Loaded after the Hello Elementor theme; neutralizes only necessary drift.
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ch-paper);
  color: var(--ch-text);
  font-family: var(--ch-font-body);
  font-size: var(--ch-type-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" on, "cv11" on;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ch-font-display);
  color: inherit;
  text-wrap: balance;
  /* Tailwind preflight parity: headings inherit size/weight and reset margins */
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

p,
dl,
dd,
figure,
blockquote,
pre {
  margin: 0;
}

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

.entry-content h1 a,
.entry-content h2 a,
.entry-content h3 a,
.entry-content h4 a,
h1 a,
h2 a,
h3 a,
h4 a {
  color: inherit;
}

a {
  color: var(--ch-blue-600);
  text-decoration: none;
  transition: color var(--ch-dur-fast) var(--ch-ease-expo);
}

a:hover {
  color: var(--ch-blue-700);
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--ch-blue);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--ch-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Element (link) focus parity: the theme's `a:focus` ring is unreadable
   black; these beat it on specificity so keyboard focus is brand blue
   across links AND controls everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--ch-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* WordPress core helpers */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ------------------------------------------------------------------
   Reduced motion — foundation enforcement for all Chemesis motion.
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ch-reveal,
  .ch-reveal-mask,
  .ch-reveal-scale,
  .ch-reveal-left,
  .ch-card-lift {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }

  .ch-wordmask > span {
    transform: none !important;
    transition: none !important;
  }

  .ch-step-line i {
    transform: scaleX(1) !important;
    transition: none !important;
  }
}
