:root {
    --navy: #0c1829;
    --navy-light: #152238;
    --ink: #111827;
    --ink-muted: #6b7280;
    --ink-faint: #9ca3af;
    --surface: #ffffff;
    --surface-muted: #f3f4f6;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --accent: #c4a35a;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
    background: var(--surface-muted);
    color: var(--ink);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.page {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Animations ── */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out var(--delay, 0s) forwards;
}

/* ── Hero ── */

.hero {
    background: var(--navy);
    color: #fff;
    min-height: 62vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem 6rem;
    text-align: center;
    position: relative;
}

.hero-inner {
    max-width: 780px;
    width: 100%;
}

.hero-brand {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.75rem;
}

.hero-title {
    font-size: clamp(2.25rem, 6.5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #fff;
}

.hero-line {
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin: 2.25rem auto 0;
}

/* ── Details ── */

.details {
    padding: 0 1.5rem 4rem;
    margin-top: -2.5rem;
    position: relative;
    z-index: 1;
}

.details-inner {
    max-width: 680px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.06);
}

.details-list {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row dt {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-faint);
    letter-spacing: 0.02em;
}

.detail-row dd {
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.6;
}

.detail-row dd a {
    font-weight: 500;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 1px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.detail-row dd a:hover {
    border-color: var(--accent);
}

/* ── Footer ── */

footer {
    text-align: center;
    padding: 1.75rem 1.5rem;
    color: var(--ink-faint);
    font-size: 0.8125rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    letter-spacing: 0.01em;
}

/* ── 404 ── */

.error-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
    background: var(--surface);
}

.error-content {
    max-width: 440px;
}

.error-code {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(4rem, 15vw, 6rem);
    font-weight: 300;
    line-height: 1;
    color: var(--navy);
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--ink);
}

.error-message {
    color: var(--ink-muted);
    margin-bottom: 2.25rem;
    font-size: 1rem;
    line-height: 1.7;
}

.btn-home {
    display: inline-block;
    padding: 0.8125rem 2rem;
    background: var(--navy);
    color: #fff;
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    transition: background 0.2s ease;
}

.btn-home:hover {
    background: var(--navy-light);
    color: #fff;
}

/* ── Responsive ── */

@media (max-width: 600px) {
    .hero {
        min-height: 55vh;
        padding: 4rem 1.25rem 5rem;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.375rem;
        padding: 1.375rem 1.5rem;
    }

    .details {
        padding: 0 1rem 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-in {
        opacity: 1;
        animation: none;
        transform: none;
    }
}
