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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

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

::selection {
    background: #ba151b;
    color: #fef7f7;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdf2f2;
}
::-webkit-scrollbar-thumb {
    background: #e97070;
    border-radius: 3px;
}

/* ── Navbar ── */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(186, 21, 27, 0.08);
    transition: box-shadow 0.3s ease;
}

.nav-fixed.scrolled {
    box-shadow: 0 1px 20px rgba(128, 14, 18, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ba151b;
    transition: width 0.3s ease;
}

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

/* ── Mobile Menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line:last-child {
    transition: width 0.3s ease, transform 0.3s ease;
}

body.menu-open .menu-line:last-child {
    width: 1.25rem;
}

body.menu-open .menu-line:first-child {
    transform: translateY(5px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-line:last-child {
    transform: translateY(-5px) rotate(-45deg);
}

/* ── Hero ── */
.hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(77, 8, 10, 0.72) 0%,
        rgba(128, 14, 18, 0.65) 50%,
        rgba(102, 11, 14, 0.80) 100%
    );
}

.hero-content {
    padding-bottom: 4rem;
}

.hero-eyebrow {
    animation: fadeDown 0.8s ease forwards;
    opacity: 0;
}

.hero-headline {
    animation: fadeUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-scroll {
    animation: fadeUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Buttons ── */
.btn-primary {
    box-shadow: 0 4px 20px rgba(128, 14, 18, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 28px rgba(128, 14, 18, 0.35);
    transform: translateY(-1px);
}

.btn-outline-light {
    backdrop-filter: blur(4px);
}

.btn-outline-light:hover {
    backdrop-filter: blur(8px);
    transform: translateY(-1px);
}

/* ── Section Eyebrow ── */
.section-eyebrow {
    letter-spacing: 0.3em;
}

/* ── Cards ── */
.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(186, 21, 27, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(186, 21, 27, 0.18);
    box-shadow: 0 8px 40px rgba(128, 14, 18, 0.08);
    transform: translateY(-2px);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(186, 21, 27, 0.06);
    transition: background 0.3s ease;
}

.card:hover .card-icon {
    background: rgba(186, 21, 27, 0.12);
}

/* ── Tags ── */
.tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(186, 21, 27, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #800e12;
    font-weight: 400;
    background: rgba(186, 21, 27, 0.04);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(186, 21, 27, 0.1);
    border-color: rgba(186, 21, 27, 0.35);
}

/* ── Resource Cards ── */
.resource-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.resource-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── Inputs ── */
.input-field {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(186, 21, 27, 0.2);
    padding: 0.75rem 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #4d080a;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
}

.input-field::placeholder {
    color: #f3a8a8;
}

.input-field:focus {
    border-color: #ba151b;
}

.input-field option {
    color: #4d080a;
    background: white;
}

textarea.input-field {
    resize: none;
}

/* ── Form Success ── */
.success-msg {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(186, 21, 27, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(186, 21, 27, 0.15);
    animation: fadeIn 0.4s ease;
}

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

/* ── Reveal Animations (progressive enhancement) ── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden initial state when JS is active and user prefers motion */
.js .reveal {
    @media (prefers-reduced-motion: no-preference) {
        opacity: 0;
        transform: translateY(24px);
    }
}

.js .reveal.revealed {
    opacity: 1;
    transform: none;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    section {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 2.75rem;
    }
}
