/* ============================================
   BuildSheet — Base & Global Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Blueprint grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.03;
  background-image:
    linear-gradient(var(--color-accent-teal) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-accent-teal) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

[data-theme="light"] body::before {
  opacity: 0.04;
  background-image:
    linear-gradient(var(--color-navy-400) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-navy-400) 1px, transparent 1px);
}

/* ── Base Elements ──────────────────────────── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

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

a {
  color: var(--color-accent-teal);
  text-decoration: none;
  transition: var(--transition-colors);
}

a:hover {
  color: var(--color-accent-cyan-light);
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-5xl); font-weight: var(--weight-extrabold); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

::selection {
  background-color: var(--color-accent-teal);
  color: var(--color-navy-950);
}

/* ── Focus Styles ───────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent-teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Utility Classes ────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--container-md);
}

.container--wide {
  max-width: var(--container-2xl);
}

.section {
  padding-block: var(--space-20);
  position: relative;
}

.section--lg {
  padding-block: var(--space-32);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 600px;
  margin-inline: auto;
}

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.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;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Section divider */
.section-divider {
  width: 100%;
  height: 1px;
  background: var(--divider);
  border: none;
}

/* ── RTL Layout Support (Arabic) ────────────── */
.rtl-layout {
  direction: rtl;
  text-align: right;
}

.rtl-layout .navbar__logo {
  margin-right: 0;
  margin-left: auto;
}

.rtl-layout .btn svg {
  margin-left: 0;
  margin-right: 0.5rem;
  transform: scaleX(-1);
}

.rtl-layout .faq__list .accordion__chevron {
  margin-left: 0;
  margin-right: auto;
}

.rtl-layout .step__icon-wrapper {
  margin-right: 0;
  margin-left: 1rem;
}
