/* ============================================================
   Al Raki Jotun — Typography System
   ============================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-total-h);
}

/* ── Body: Arabic (RTL default) ── */
body {
    font-family: var(--font-arabic);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: var(--leading-arabic);
    color: var(--color-text);
    background-color: var(--color-white);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Body: English (LTR) ── */
body.lang-en {
    font-family: var(--font-english);
    direction: ltr;
    line-height: var(--leading-normal);
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    line-height: var(--leading-tight);
    color: var(--color-navy);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
}

.lang-ar h1, .lang-ar h2, .lang-ar h3 {
    font-weight: var(--weight-bold);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }
h4 { font-size: clamp(var(--text-lg), 2vw, var(--text-2xl)); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

/* ── Paragraph ── */
p {
    margin-bottom: var(--space-4);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
    max-width: 70ch;
}

p:last-child { margin-bottom: 0; }

/* ── Section Heading Pattern ── */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-4);
}

.section-label::before,
.section-label::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--color-gold);
    border-radius: var(--radius-full);
}

.section-heading {
    font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
    font-weight: var(--weight-extrabold);
    color: var(--color-navy);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
}

.section-heading .accent {
    color: var(--color-gold);
}

.section-desc {
    font-size: var(--text-md);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
    max-width: 60ch;
}

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

.section-header--center {
    text-align: center;
}

.section-header--center .section-label {
    justify-content: center;
}

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

/* ── Links ── */
a {
    color: var(--color-navy);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover { color: var(--color-gold); }

a:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 28px;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* Primary button: Gold */
.btn-primary {
    background: var(--color-gold);
    color: var(--color-navy-dark);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    background: var(--color-gold-bright);
    border-color: var(--color-gold-bright);
    color: var(--color-navy-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(217, 169, 0, 0.40);
}

.btn-primary:active { transform: translateY(0); }

/* Secondary button: Navy outline */
.btn-secondary {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.btn-secondary:hover {
    background: var(--color-navy);
    color: var(--color-white);
    transform: translateY(-1px);
}

/* Ghost button: White outline (for dark backgrounds) */
.btn-ghost {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-white);
    color: var(--color-white);
}

/* Navy solid button */
.btn-navy {
    background: var(--color-navy);
    color: var(--color-white);
    border-color: var(--color-navy);
}

.btn-navy:hover {
    background: var(--color-navy-dark);
    border-color: var(--color-navy-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* WhatsApp button */
.btn-whatsapp {
    background: var(--color-whatsapp);
    color: var(--color-white);
    border-color: var(--color-whatsapp);
    gap: var(--space-2);
}

.btn-whatsapp:hover {
    background: #1DA851;
    color: var(--color-white);
    transform: translateY(-1px);
}

/* Size variants */
.btn-sm { padding: 8px 18px; font-size: var(--text-sm); }
.btn-lg { padding: 16px 36px; font-size: var(--text-md); }
.btn-xl { padding: 18px 44px; font-size: var(--text-lg); }

/* ── 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: 0;
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-start  { text-align: start; }
.text-end    { text-align: end; }
.text-gold   { color: var(--color-gold) !important; }
.text-navy   { color: var(--color-navy) !important; }
.text-muted  { color: var(--color-text-muted) !important; }
.text-white  { color: var(--color-white) !important; }

.font-bold   { font-weight: var(--weight-bold); }
.font-medium { font-weight: var(--weight-medium); }

/* ── Divider ── */
.divider {
    height: 1px;
    background: var(--color-border);
    border: none;
    margin: var(--space-8) 0;
}

/* ── Badge ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-full);
    line-height: 1.5;
}

.badge-gold   { background: var(--color-gold-pale); color: var(--color-gold); border: 1px solid var(--color-gold-light); }
.badge-navy   { background: rgba(6, 52, 91, 0.08); color: var(--color-navy); }
.badge-green  { background: rgba(32, 201, 104, 0.1); color: #157a3c; }
.badge-white  { background: rgba(255,255,255,0.15); color: var(--color-white); border: 1px solid rgba(255,255,255,0.4); backdrop-filter: blur(4px); }
