/* Explain: Base reset, typography, accessibility, and site-wide copy prevention styles. */
* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    background: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.4;
    margin: 0;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--text-color);
    text-wrap: balance;
}

h1,
h2 {
    line-height: 1.35;
}

/* عناوين الصفحات: حجم مناسب وسطران متوازنان على كل الشاشات */
h1 {
    font-size: clamp(1.5rem, 7vw, 2.95rem);
}

h3,
h4 {
    line-height: 1.55;
}

p {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

a {
    color: inherit;
}

strong,
b {
    font-weight: 800;
}

[id] {
    scroll-margin-top: 7rem;
}

::selection {
    background: rgba(11, 93, 78, 0.16);
    color: var(--text-color);
}

:focus-visible {
    outline: 3px solid rgba(11, 93, 78, 0.45);
    outline-offset: 3px;
}

.font-heading {
    font-family: var(--font-heading);
}

/* ===== Soft scroll reveal (only when JS is ready) ===== */
html.reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

html.reveal-ready [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    html.reveal-ready [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== منع نسخ نصوص الموقع ===== */
body,
body * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea,
select,
option,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

img {
    -webkit-user-drag: none;
}

.copy-notice {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    z-index: 100000;
    transform: translate(-50%, 1.25rem);
    opacity: 0;
    pointer-events: none;
    max-width: min(92vw, 22rem);
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: var(--secondary-color);
    color: #FFFFFF;
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 18px 40px rgba(6, 26, 22, 0.28);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.copy-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .copy-notice {
        transition: none;
    }
}