/* Tazers base styles. Resets, typography, focus, selection. */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;         /* modern stricter clip, falls back to hidden */
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  position: relative;
}

/* Override Hello Elementor's alignfull / alignwide which use 100vw and -80px
   margin -- both cause horizontal scroll because 100vw includes the scrollbar
   and -80px extends past the viewport edge. Force them to fit. */
.alignfull,
.alignfull img {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
}
.alignwide {
  margin-inline: 0 !important;
  max-width: 100% !important;
}

/* Universal media + iframe safety - never wider than container */
img, video, iframe, svg, object, embed {
  max-width: 100%;
}
/* Prevent long URLs / emails from forcing horizontal scroll */
a, p, h1, h2, h3, h4, blockquote, li, td, dt, dd, span {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

img, video, svg { height: auto; display: block; }

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--color-link-hover); }

/* Focus */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--color-selection-bg); color: var(--color-selection-text); }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: var(--lh-h2);
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 var(--space-4); }
p + p { margin-top: var(--space-2); }

.tz-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  display: inline-block;
}

.tz-mono { font-family: var(--font-mono); font-size: var(--fs-mono); }

/* Layout containers */
.tz-container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.tz-prose { max-width: 65ch; }

/* Buttons */
.tz-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 16px 32px;
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  border: 2px solid var(--color-cta-bg);
  border-radius: var(--radius-button);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tz-btn:hover { background: var(--color-cta-bg-hover); color: var(--color-cta-text-hover); }
.tz-btn:active { transform: translateY(1px); }

.tz-btn--ghost {
  background: transparent;
  color: var(--color-cta-bg);
  border-color: var(--color-cta-bg);
}
.tz-btn--ghost:hover {
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
}

/* Skip link (a11y) */
.tz-skip {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  padding: 12px 16px;
  background: var(--tz-red); color: var(--tz-cream);
  font-weight: 700;
}
.tz-skip:focus { left: 12px; top: 12px; }

/* Hide visually but keep for screen readers */
.tz-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
