/* ==========================================================================
   AudiTax Base Styles & Modern Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  background-color: var(--background);
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  padding-top: var(--header-height, 80px);
  background-color: var(--background);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Offset anchor scrolling to account for fixed header */
section[id] {
  scroll-margin-top: calc(var(--header-height, 80px) + 1.25rem);
}

/* Logical directional alignment */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

/* Focus Ring for WCAG Accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Custom Selection */
::selection {
  background-color: var(--accent);
  color: #060D17;
}

/* Sleek Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.container-narrow {
  max-width: 960px;
}

.container-wide {
  max-width: 1440px;
}

.section {
  padding-block: clamp(3.5rem, 6vw, 6.5rem);
  position: relative;
}

.section-alt {
  background-color: var(--background-alt);
}

.section-dark {
  background-color: var(--primary);
  color: var(--text-on-dark, #FFFFFF);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--text-on-dark, #FFFFFF);
}

.section-dark .text-muted,
.section-dark .text-secondary {
  color: var(--text-on-dark-muted, #CBD5E1);
}

/* Section Header Utility */
.section-header {
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
  max-width: 760px;
}

.section-header.text-center {
  margin-inline: auto;
  text-align: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  font-size: var(--font-size-small);
  font-weight: var(--fw-semibold);
  color: var(--accent);
  background-color: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[dir="rtl"] .section-badge {
  letter-spacing: normal;
}

.section-title {
  font-size: var(--font-size-h1);
  margin-bottom: 1rem;
  color: var(--text);
}

.section-desc {
  font-size: var(--font-size-lead);
  color: var(--text-muted);
  line-height: var(--line-height-relaxed);
}

/* Media Elements */
img, svg, picture, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

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

/* UI Hidden utility for deactivated sections and navigation links (preserved in code, hidden from UI) */
.section-hidden,
.nav-hidden {
  display: none !important;
}

