/* ==========================================================================
   BASE — Reset, Inter font, typography scale, body defaults
   Depends on: variables.css
   ========================================================================== */

/* Inter is enqueued via functions.php (Google Fonts) — no @import needed here */

/* ── BOX MODEL ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── ROOT ─────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  tab-size: 4;
}

/* ── BODY ──────────────────────────────────────────────────────────────── */
body {
  font-family: var(--ezee-font-sans);
  font-size: var(--ezee-text-base);
  font-weight: var(--ezee-weight-normal);
  line-height: var(--ezee-leading-relaxed);
  color: var(--ezee-text);
  background-color: var(--ezee-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── MEDIA ─────────────────────────────────────────────────────────────── */
img,
video,
svg,
iframe {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
  vertical-align: middle;
}

/* ── HEADINGS ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ezee-font-sans);
  font-weight: var(--ezee-weight-bold);
  line-height: var(--ezee-leading-tight);
  color: var(--ezee-text);
  letter-spacing: var(--ezee-tracking-snug);
}

h1 {
  font-size: var(--ezee-text-5xl);
  font-weight: var(--ezee-weight-extrabold);
  letter-spacing: var(--ezee-tracking-tight);
  line-height: 1.1;
}

h2 {
  font-size: var(--ezee-text-3xl);
  font-weight: var(--ezee-weight-bold);
  letter-spacing: var(--ezee-tracking-snug);
}

h3 {
  font-size: var(--ezee-text-2xl);
  font-weight: var(--ezee-weight-bold);
}

h4 {
  font-size: var(--ezee-text-xl);
  font-weight: var(--ezee-weight-semibold);
}

h5 {
  font-size: var(--ezee-text-lg);
  font-weight: var(--ezee-weight-semibold);
}

h6 {
  font-size: var(--ezee-text-base);
  font-weight: var(--ezee-weight-semibold);
  letter-spacing: var(--ezee-tracking-normal);
}

/* ── PARAGRAPHS & INLINE ───────────────────────────────────────────────── */
p {
  line-height: var(--ezee-leading-relaxed);
  color: var(--ezee-text);
}

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

strong, b { font-weight: var(--ezee-weight-semibold); }
em, i     { font-style: italic; }
small     { font-size: var(--ezee-text-sm); }
sub, sup  { font-size: 0.75em; line-height: 0; position: relative; vertical-align: baseline; }
sup       { top: -0.5em; }
sub       { bottom: -0.25em; }

/* ── LINKS ─────────────────────────────────────────────────────────────── */
a {
  color: var(--ezee-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--ezee-duration-fast) var(--ezee-ease);
}

a:hover {
  color: var(--ezee-primary-dark);
  text-decoration-color: var(--ezee-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--ezee-primary);
  outline-offset: 3px;
  border-radius: var(--ezee-radius-sm);
  text-decoration: none;
}

/* ── LISTS ─────────────────────────────────────────────────────────────── */
ul, ol {
  padding-left: var(--ezee-space-6);
}

li { line-height: var(--ezee-leading-relaxed); }
li + li { margin-top: var(--ezee-space-1); }

/* WordPress editor list resets */
.wp-block-list,
.entry-content ul,
.entry-content ol {
  padding-left: var(--ezee-space-6);
  margin-bottom: var(--ezee-space-4);
}

/* ── BLOCKQUOTE ────────────────────────────────────────────────────────── */
blockquote {
  margin: var(--ezee-space-6) 0;
  padding: var(--ezee-space-4) var(--ezee-space-6);
  border-left: 4px solid var(--ezee-primary);
  background: var(--ezee-primary-bg);
  border-radius: 0 var(--ezee-radius-md) var(--ezee-radius-md) 0;
  font-size: var(--ezee-text-lg);
  font-style: italic;
  color: var(--ezee-text-muted);
  font-family: var(--ezee-font-serif);
}

/* ── CODE ──────────────────────────────────────────────────────────────── */
code {
  font-family: var(--ezee-font-mono);
  font-size: 0.875em;
  background: var(--ezee-surface);
  border: 1px solid var(--ezee-border);
  border-radius: var(--ezee-radius-sm);
  padding: 0.1em 0.4em;
}

pre {
  background: var(--ezee-navy);
  color: var(--ezee-primary-light);
  border-radius: var(--ezee-radius-md);
  padding: var(--ezee-space-6);
  overflow-x: auto;
  font-family: var(--ezee-font-mono);
  font-size: var(--ezee-text-sm);
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ── HORIZONTAL RULE ───────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--ezee-border);
  margin: var(--ezee-space-8) 0;
}

/* ── TABLES ────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }

/* ── FORM ELEMENT RESETS ───────────────────────────────────────────────── */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ── SELECTION ─────────────────────────────────────────────────────────── */
::selection {
  background: var(--ezee-primary-bg-strong);
  color: var(--ezee-primary-dark);
}

/* ── SCROLLBAR (Webkit) ────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 8px; height: 8px; }
::-webkit-scrollbar-track        { background: var(--ezee-surface); }
::-webkit-scrollbar-thumb        { background: var(--ezee-border-strong); border-radius: var(--ezee-radius-full); }
::-webkit-scrollbar-thumb:hover  { background: var(--ezee-text-soft); }

/* ── LAYOUT UTILITIES ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--ezee-max-wide);
  margin-inline: auto;
  padding-inline: var(--ezee-space-6);
}

.container-sm   { max-width: var(--ezee-max-content); margin-inline: auto; padding-inline: var(--ezee-space-6); }
.container-md   { max-width: var(--ezee-max-narrow);  margin-inline: auto; padding-inline: var(--ezee-space-6); }
.container-hero { max-width: var(--ezee-max-hero);    margin-inline: auto; padding-inline: var(--ezee-space-6); }

/* ── ACCESSIBILITY ─────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--ezee-space-4);
  z-index: var(--ezee-z-toast);
  padding: var(--ezee-space-3) var(--ezee-space-5);
  background: var(--ezee-primary);
  color: white;
  font-weight: var(--ezee-weight-semibold);
  border-radius: var(--ezee-radius);
  text-decoration: none;
  transition: top var(--ezee-duration-fast);
}

.skip-link:focus { top: var(--ezee-space-4); }

/* ── ANIMATION UTILITIES ───────────────────────────────────────────────── */
.ez-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s var(--ezee-ease-out),
    transform 0.55s var(--ezee-ease-out);
}

.ez-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ez-reveal-delay-1 { transition-delay: 0.1s; }
.ez-reveal-delay-2 { transition-delay: 0.2s; }
.ez-reveal-delay-3 { transition-delay: 0.3s; }
.ez-reveal-delay-4 { transition-delay: 0.4s; }

/* ── WORDPRESS SPECIFIC ────────────────────────────────────────────────── */
.alignnone  { margin: 0; }
.aligncenter { display: block; margin-inline: auto; }
.alignleft  { float: left; margin: 0 var(--ezee-space-5) var(--ezee-space-4) 0; }
.alignright { float: right; margin: 0 0 var(--ezee-space-4) var(--ezee-space-5); }

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: var(--ezee-text-sm);
  color: var(--ezee-text-muted);
  text-align: center;
  margin-top: var(--ezee-space-2);
}

img.wp-smiley { border: none; margin-bottom: 0; padding: 0; }

.sticky { /* WordPress sticky post, style as needed */ }

/* ── RESPONSIVE TYPOGRAPHY ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container,
  .container-sm,
  .container-md,
  .container-hero {
    padding-inline: var(--ezee-space-4);
  }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
}

/* ── PRINT ─────────────────────────────────────────────────────────────── */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  a, a:visited { text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; }

  abbr[title]::after { content: " (" attr(title) ")"; }
  a[href^="#"]::after,
  a[href^="javascript:"]::after { content: ""; }

  pre { white-space: pre-wrap !important; }
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }

  thead { display: table-header-group; }
  tr, img { page-break-inside: avoid; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3 { page-break-after: avoid; }
}
