/* ==========================================================================
   2. Modern Reset & Bi-directional Base Architecture
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* Persian / RTL Base */
html[dir="rtl"],
body.rtl,
body.is-epna-rtl {
  direction: rtl;
  text-align: start;
  font-family: var(--epna-font-farsi);
}

/* Latin / LTR Base */
html[dir="ltr"],
body.ltr,
body.is-epna-ltr {
  direction: ltr;
  text-align: start;
  font-family: var(--epna-font-latin);
}

body {
  margin: 0;
  padding: 0;
  color: #334155;
  background-color: var(--epna-light);
  font-family: var(--epna-font-latin);
  font-size: 0.9375rem;
  line-height: 1.8;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Accessibility & Screen Readers */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.screen-reader-text:focus {
  position: fixed !important;
  inset-block-start: 1rem !important;
  inset-inline-start: 1rem !important;
  width: auto !important;
  height: auto !important;
  padding: 0.75rem 1.25rem !important;
  margin: 0 !important;
  clip: auto !important;
  background-color: var(--epna-cyan) !important;
  color: var(--epna-dark) !important;
  font-weight: 700 !important;
  border-radius: var(--epna-radius-sm) !important;
  z-index: 999999 !important;
  box-shadow: var(--epna-shadow-lg) !important;
}

/* Focus Outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--epna-cyan);
  outline-offset: 3px;
}

/* Interactive Elements */
a {
  color: #0284c7;
  text-decoration: none;
  transition: color var(--epna-transition-fast);
}

a:hover {
  color: #0369a1;
}

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

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

/* ==========================================================================
   3. Typography Scale & Heading Hierarchy
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--epna-dark);
  font-weight: 700;
  line-height: 1.35;
  margin-block-start: 0;
  margin-block-end: var(--epna-space-md);
  text-wrap: balance;
}

.site-header h1, .site-header h2, .site-header h3,
.epna-hero-section h1, .epna-hero-section h2, .epna-hero-section h3,
.site-footer h1, .site-footer h2, .site-footer h3,
.epna-values-section h1, .epna-values-section h2, .epna-values-section h3,
.promo-banner-card h1, .promo-banner-card h2, .promo-banner-card h3 {
  color: var(--epna-white);
}

h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

h4 {
  font-size: 1.2rem;
}

h5 {
  font-size: 1.05rem;
}

h6 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-block-start: 0;
  margin-block-end: var(--epna-space-md);
}

blockquote {
  margin-inline: 0;
  margin-block: var(--epna-space-lg);
  padding-inline-start: var(--epna-space-lg);
  padding-inline-end: 0;
  border-inline-start: 3px solid var(--epna-cyan);
  border-inline-end: none;
  color: var(--epna-gray-light);
  font-style: italic;
}

code, kbd, samp, pre {
  font-family: var(--epna-font-mono);
  font-size: 0.875em;
}
