/**
 * Zenith — base layer
 *
 * Element defaults and the small set of utility primitives the page
 * templates rely on. Component styling lives with its component.
 * Loaded after tokens.css, before any Elementor output.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--zen-page);
  color: var(--zen-ink-2);
  font-family: var(--zen-font-sans);
  font-size: var(--zen-step-0);
  line-height: var(--zen-leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Headings ------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--zen-space-4);
  color: var(--zen-blue-900);
  font-weight: var(--zen-weight-black);
  line-height: var(--zen-leading-head);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--zen-step-5); line-height: var(--zen-leading-tight); }
h2 { font-size: var(--zen-step-4); }
h3 { font-size: var(--zen-step-2); }
h4 { font-size: var(--zen-step-1); }
h5, h6 { font-size: var(--zen-step-0); }

p { margin: 0 0 var(--zen-space-4); }
p:last-child { margin-bottom: 0; }

/* Keep running text readable regardless of container width. */
.zen-prose > p,
.zen-prose > ul,
.zen-prose > ol { max-width: 68ch; }

/* ---- Links --------------------------------------------------------- */

a {
  color: var(--zen-blue-600);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color var(--zen-dur) var(--zen-ease);
}

a:hover { color: var(--zen-blue-800); }

/* Visible focus for every interactive element. Do not remove. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--zen-blue-600);
  outline-offset: 2px;
  border-radius: var(--zen-radius-sm);
}

/* ---- Media --------------------------------------------------------- */

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Lists --------------------------------------------------------- */

ul, ol { margin: 0 0 var(--zen-space-4); padding-inline-start: 1.25rem; }
li { margin-bottom: var(--zen-space-2); }

/* ---- Tables (spec sheets, warranty comparisons) -------------------- */

.zen-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--zen-line);
  border-radius: var(--zen-radius);
  background: var(--zen-surface);
}

.zen-table-wrap table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: var(--zen-step--1);
  font-variant-numeric: tabular-nums;
}

.zen-table-wrap th,
.zen-table-wrap td {
  padding: var(--zen-space-3) var(--zen-space-4);
  text-align: left;
  border-bottom: 1px solid var(--zen-line);
}

.zen-table-wrap th {
  background: var(--zen-sunk);
  color: var(--zen-ink);
  font-weight: var(--zen-weight-bold);
  white-space: nowrap;
}

.zen-table-wrap tr:last-child td { border-bottom: 0; }

/* ---- Accessibility helpers ----------------------------------------- */

.zen-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.zen-skip-link {
  position: absolute;
  top: -100%;
  left: var(--zen-space-4);
  z-index: 1000;
  padding: var(--zen-space-3) var(--zen-space-5);
  background: var(--zen-blue-600);
  color: #fff;
  border-radius: 0 0 var(--zen-radius) var(--zen-radius);
  font-weight: var(--zen-weight-bold);
  text-decoration: none;
}

.zen-skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---- Buttons ------------------------------------------------------- */

.zen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--zen-space-2);
  padding: 0.85em 1.6em;
  border: 1px solid transparent;
  border-radius: var(--zen-radius);
  font: inherit;
  font-weight: var(--zen-weight-bold);
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--zen-dur) var(--zen-ease),
              border-color var(--zen-dur) var(--zen-ease),
              color var(--zen-dur) var(--zen-ease),
              transform var(--zen-dur-fast) var(--zen-ease);
}

.zen-btn:active { transform: translateY(1px); }

.zen-btn--primary {
  background: var(--zen-blue-600);
  color: #fff;
}

.zen-btn--primary:hover {
  background: var(--zen-blue-800);
  color: #fff;
}

.zen-btn--secondary {
  background: var(--zen-surface);
  border-color: var(--zen-blue-600);
  color: var(--zen-blue-600);
}

.zen-btn--secondary:hover {
  background: var(--zen-blue-050);
  color: var(--zen-blue-800);
}

.zen-btn--danger {
  background: var(--zen-red-600);
  color: #fff;
}

.zen-btn--danger:hover { background: var(--zen-red-700); color: #fff; }

.zen-btn[aria-disabled="true"],
.zen-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Tap targets stay finger-friendly on small screens (WCAG 2.5.8). */
@media (max-width: 640px) {
  .zen-btn { min-height: 44px; width: 100%; }
}

/* ---- Cards --------------------------------------------------------- */

.zen-card {
  background: var(--zen-surface);
  border: 1px solid var(--zen-line);
  border-radius: var(--zen-radius-lg);
  padding: var(--zen-space-5);
}

.zen-card--raised { box-shadow: var(--zen-shadow-sm); border-color: transparent; }

/* ---- Print --------------------------------------------------------- */

@media print {
  .zen-skip-link,
  .zen-emergency-bar,
  .zen-site-header,
  .zen-site-footer { display: none !important; }
  body { color: #000; }
}
