/* ==========================================================================
   ENGTEC — Base Styles & CSS Reset
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

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

/* ── Typography ───────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--color-primary-dark);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--text-3xl);
}

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

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

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

h6 {
    font-size: var(--text-md);
}

p {
    max-width: 65ch;
    line-height: var(--leading-normal);
}

.text-mono {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-secondary);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-accent {
    color: var(--color-secondary);
}

strong {
    font-weight: 600;
}

/* ── Links ────────────────────────────────────────────────────────────────── */
.link {
    color: var(--color-primary);
    position: relative;
    transition: color var(--duration-fast) var(--ease-out);
}

.link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width var(--duration-normal) var(--ease-out);
}

.link:hover {
    color: var(--color-secondary);
}

.link:hover::after {
    width: 100%;
}

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

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

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

/* ── Section ──────────────────────────────────────────────────────────────── */
.section {
    padding-block: var(--space-16);
    position: relative;
}

.section--compact {
    padding-block: var(--space-10);
}

.section__label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: var(--space-3);
    display: block;
}

.section__title {
    margin-bottom: var(--space-5);
}

.section__subtitle {
    font-size: var(--text-md);
    color: var(--color-text-muted);
    max-width: 55ch;
    line-height: var(--leading-normal);
}

/* ── Blueprint Grid Pattern (background decoration) ──────────────────────── */
.blueprint-bg {
    position: relative;
}

.blueprint-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(27, 94, 138, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 94, 138, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ── Selection ────────────────────────────────────────────────────────────── */
::selection {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
}

/* ── Focus ────────────────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

/* ── Screen Reader Only ───────────────────────────────────────────────────── */
.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;
}