/* extra.css – Additional visual polish & micro-animations */

/* ---------- Scroll reveal animations ---------- */
.card,
.feature-card {
    opacity: 0;
    transform: translateY(20px);
    animation: revealUp 0.6s ease forwards;
}

.card:nth-child(1) {
    animation-delay: 0.05s;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.15s;
}

.card:nth-child(4) {
    animation-delay: 0.2s;
}

.card:nth-child(5) {
    animation-delay: 0.25s;
}

.card:nth-child(6) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Smooth gradient border on card hover ---------- */
.card.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card.glass {
    position: relative;
    overflow: hidden;
}

.card.glass:hover::before {
    opacity: 1;
}

/* ---------- Nav active link indicator ---------- */
.nav-links a.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* ---------- Focus states for accessibility ---------- */
.btn:focus-visible,
.dns-tab:focus-visible,
.nav-links a:focus-visible,
.code:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Scrollbar styling ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--grey);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ---------- Selection color ---------- */
::selection {
    background: rgba(230, 126, 34, 0.3);
    color: #fff;
}

/* ---------- Subtle glow behind section titles ---------- */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 3px;
    margin-top: 0.5rem;
}

/* ---------- Mobile nav toggle animation ---------- */
.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hover underline effect on footer links ---------- */
.footer-col a {
    position: relative;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.footer-col a:hover::after {
    width: 100%;
}

/* ---------- Back to top indicator on scroll ---------- */
.nav-brand img {
    transition: transform 0.3s ease;
}

.nav.scrolled .nav-brand img {
    transform: rotate(-5deg) scale(0.95);
}


/* ---------- DNS tab active transition ---------- */
.dns-tab {
    position: relative;
}

.dns-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.35rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

/* ---------- Animated gradient separator ---------- */
.section+.section-alt::before,
.section-alt+.section::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), rgba(230, 126, 34, 0.15), var(--border), transparent);
}

/* ---------- Code hover glow ---------- */
.code:hover {
    box-shadow: 0 0 0 1px rgba(230, 126, 34, 0.1);
}

/* ---------- Status item animation ---------- */
.status-count {
    transition: transform 0.3s ease;
}

.status-item:hover .status-count {
    transform: scale(1.05);
}

/* ---------- Feature card icon bounce on hover ---------- */
.feature-card:hover .feature-icon {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* ---------- Print styles ---------- */
@media print {

    .nav,
    .hero-bg,
    .nav-toggle {
        display: none;
    }

    .hero {
        padding-top: 2rem;
        min-height: auto;
    }

    body {
        background: #fff;
        color: #333;
    }

    .card.glass {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}