/* ═══════════════════════════════════════════
   base.css — Body, layout shell, shared components
   ═══════════════════════════════════════════ */

/* ── Accessibility - Skip Link ── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--ease), color var(--ease);
    padding-top: 75px; /* Account for fixed header height */
}

/* ── Layout container ── */
.container {
    width: 90%;
    max-width: 1200px;
    margin-inline: auto;
}

/* ── Section rhythm ── */
.section-padding {
    padding: 6rem 0;
}

/* ── Section headers ── */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    transition: transform var(--ease), box-shadow var(--ease),
                background-color var(--ease), color var(--ease);
    /* Better touch targets for mobile */
    min-height: 44px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99,102,241,.4);
}

.btn-primary:hover,
.btn-primary:active {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(99,102,241,.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn-secondary:hover,
.btn-secondary:active {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

/* Mobile-specific button adjustments */
@media (max-width: 768px) {
    .btn {
        padding: 0.875rem 1.5rem;
        /* Prevent text size adjustment on iOS */
        -webkit-text-size-adjust: 100%;
    }
}

/* ── Custom Cursor ── */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-light);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Hide custom cursor on mobile/touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* ── Social icon (reused in contact + footer) ── */
.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: background-color var(--ease), color var(--ease),
                transform var(--ease);
}

.social-icon:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

/* ── Scroll-to-top ── */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease),
                background-color var(--ease), transform var(--ease);
    box-shadow: 0 10px 20px rgba(99,102,241,.4);
    z-index: 99;
    -webkit-tap-highlight-color: transparent;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover,
.scroll-to-top:active {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Mobile positioning */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}