/* =============================================================================
   Zagros Tech — Base / Reset
   ============================================================================= */

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

html {
  font-size: var(--fs-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }

img, svg, video { display: block; max-width: 100%; height: auto; }
img { background: var(--surface-2); }

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

ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

::selection { background: var(--brand); color: var(--brand-contrast); }

[hidden] { display: none !important; }

/* helpers */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-4); }
@media (min-width: 768px) { .container { padding-inline: var(--s-5); } }

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

.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; letter-spacing: 0; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand);
}

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(12px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-in) var(--ease), transform var(--dur-in) var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* page progress bar */
#page-progress {
  position: fixed; inset-block-start: 0; inset-inline-start: 0; height: 2px;
  background: var(--brand); width: 0; z-index: var(--z-toast);
  transition: width 180ms var(--ease), opacity 300ms;
}
