/* =========================
   RESET & BASE STYLES
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
    scroll-behavior:smooth;
}

body{
    background: linear-gradient(135deg, #f5f8ff 0%, #f0f4ff 100%);
    color:#0f172a;
    overflow-x:hidden;
}

/* =========================
   DESIGN TOKENS
========================= */

:root{
    --primary: #0f62fe;
    --primary-dark: #0b246e;
    --primary-light: #cfe8ff;
    --muted: #475569;
    --muted-light: #94a3b8;
    --bg: #f5f8ff;
    --card: #ffffff;
    --accent: #cfe8ff;
    --radius: 12px;
    --shadow-sm: 0 4px 12px rgba(15,23,42,0.04);
    --shadow-md: 0 10px 24px rgba(15,23,42,0.06);
    --shadow-lg: 0 20px 40px rgba(15,23,42,0.1);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-slow: 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =========================
   NAVBAR
========================= */

header{
    position:fixed;
    top:0;
    width:100%;
    z-index:1000;
    animation: slideDown 500ms ease both;
}

@keyframes slideDown{
    from{
        transform: translateY(-100%);
        opacity: 0;
    }
    to{
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 8%;
    background: rgba(255,255,255,0.85);
    backdrop-filter:blur(12px);
    border-bottom:1px solid rgba(15,23,42,0.06);
    box-shadow: var(--shadow-sm);
    transition: all 300ms ease;
    position: relative;
}

.navbar:hover{
    background: rgba(255,255,255,0.95);
    box-shadow: var(--shadow-md);
}

.logo{
    font-size:2rem;
    font-weight:800;
    background: linear-gradient(135deg, #0f62fe 0%, #0b246e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 300ms ease;
}

.logo:hover{
    transform: scale(1.05);
}

/* Hamburger menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #0f172a;
    border-radius: 2px;
    transition: all 300ms ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


.nav-links{
    display:flex;
    gap:30px;
    list-style:none;
    align-items: center;
}

.nav-links a{
    text-decoration:none;
    color:#0f172a;
    font-weight:500;
    position: relative;
    transition: color var(--transition-fast) ease;
}

.nav-links a:not(.nav-btn)::after{
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0f62fe, #0b246e);
    transition: width var(--transition-smooth) ease;
}

.nav-links a:hover{
    color: var(--primary);
}

.nav-links a:not(.nav-btn):hover::after{
    width: 100%;
}

.nav-btn{
    background: linear-gradient(135deg, #0f62fe 0%, #0b246e 100%);
    color:white !important;
    padding:12px 24px;
    border-radius:8px;
    font-weight:600;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth) ease;
}

.nav-btn::before{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 600ms ease, height 600ms ease;
}

.nav-btn:hover::before{
    width: 300px;
    height: 300px;
}

.nav-btn:hover{
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15,98,254,0.3);
}

.nav-btn:active{
    transform: translateY(-1px);
}

/* =========================
   HERO SECTION
========================= */

.hero{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:100px 8%;
    background: linear-gradient(135deg, rgba(15,98,254,0.02) 0%, rgba(207,232,255,0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before{
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(15,98,254,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

@keyframes float{
    0%, 100%{ transform: translateY(0px) translateX(0px); }
    50%{ transform: translateY(-30px) translateX(20px); }
}

.hero-content{
    max-width:850px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 800ms ease both;
}

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

.hero h1{
    font-size:3.2rem;
    margin-bottom:20px;
    line-height:1.2;
    font-weight: 800;
    background: linear-gradient(135deg, #0f62fe 0%, #0b246e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 800ms ease 100ms both;
}

.hero h1:hover{
    transform: scale(1.02);
}

.hero p{
    font-size:1.1rem;
    color:#475569;
    margin-bottom:28px;
    line-height: 1.6;
    animation: fadeInUp 800ms ease 200ms both;
}

.hero-buttons{
    display:flex;
    justify-content:center;
    gap:16px;
    flex-wrap:wrap;
    animation: fadeInUp 800ms ease 300ms both;
}

/* =========================
   BUTTONS
========================= */

.btn, .btn-outline{
    text-decoration:none;
    padding:14px 32px;
    border-radius:10px;
    font-weight:600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth) ease;
    display: inline-block;
}

.btn{
    background: linear-gradient(135deg, #0f62fe 0%, #0b246e 100%);
    color:white;
    box-shadow: 0 8px 20px rgba(15,98,254,0.2);
}

.btn::before{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 600ms ease, height 600ms ease;
}

.btn:hover::before{
    width: 300px;
    height: 300px;
}

.btn:hover{
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(15,98,254,0.3);
}

.btn:active{
    transform: translateY(-1px) scale(0.98);
}

.btn-outline{
    border:2px solid var(--primary-light);
    color: var(--primary);
    background: transparent;
    position: relative;
    z-index: 1;
}

.btn-outline::before{
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(15,98,254,0.05);
    border-radius: 8px;
    z-index: -1;
    transition: left var(--transition-smooth) ease;
}

.btn-outline:hover::before{
    left: 0;
}

.btn-outline:hover{
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* =========================
   SECTIONS
========================= */

.section{
    padding:100px 8%;
    position: relative;
}

.section:nth-child(even){
    background: rgba(207,232,255,0.02);
}

.section h2{
    text-align:center;
    margin-bottom:60px;
    color: var(--primary);
    font-size:2.2rem;
    font-weight: 800;
    position: relative;
    animation: fadeInDown 600ms ease;
}

.section h2::after{
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #0f62fe, #0b246e);
    margin: 16px auto 0;
    border-radius: 2px;
    animation: slideIn 800ms ease 200ms both;
}

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

@keyframes slideIn{
    from{
        width: 0;
    }
    to{
        width: 60px;
    }
}

/* =========================
   CARDS & TEMPLATES
========================= */

.cards{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap:28px;
    animation: fadeIn 600ms ease 200ms both;
}

@keyframes fadeIn{
    from{ opacity: 0; }
    to{ opacity: 1; }
}

.card{
    background: white;
    border: 1px solid rgba(15,23,42,0.06);
    border-radius: 14px;
    padding: 28px;
    text-align:center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-smooth) ease;
    will-change: transform, box-shadow;
    animation: cardSlideIn 600ms ease backwards;
}

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

.card:nth-child(1){ animation-delay: 0ms; }
.card:nth-child(2){ animation-delay: 100ms; }
.card:nth-child(3){ animation-delay: 200ms; }
.card:nth-child(4){ animation-delay: 300ms; }
.card:nth-child(5){ animation-delay: 400ms; }
.card:nth-child(6){ animation-delay: 500ms; }

.card::before{
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15,98,254,0.1), transparent);
    transition: left 600ms ease;
}

.card:hover::before{
    left: 100%;
}

.card:hover{
    transform: translateY(-12px);
    box-shadow: 0 24px 50px rgba(15,23,42,0.12);
    border-color: rgba(15,98,254,0.1);
}

.card:active{
    transform: translateY(-6px);
}

.card h3{
    color: var(--primary);
    font-size:1.7rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Template Cards Specific Styles */
.template-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
}

.template-card .template-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 12px 0 6px;
}

.template-card .template-desc {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.template-card .template-link {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f62fe 0%, #0b246e 100%);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition-fast) ease;
    width: 100%;
    box-sizing: border-box;
}

.template-card .template-link:hover {
    box-shadow: 0 6px 15px rgba(15,98,254,0.25);
    transform: translateY(-2px);
}

/* Template Mini Previews */
.template-mini-preview {
    width: 100%;
    height: 120px;
    background: #f8fafc;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}

/* Mini CSS Mocks */
.modern-mini { display: flex; }
.modern-mini::before { content: ''; width: 30%; height: 100%; background: var(--primary-light); }
.modern-mini::after { content: ''; width: 70%; height: 100%; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 4px, transparent 4px, transparent 12px); background-size: 80% 12px; background-repeat: no-repeat; background-position: 10px 10px; }

.ats-mini::before { content: ''; display: block; width: 50%; height: 6px; background: #94a3b8; margin: 10px auto; }
.ats-mini::after { content: ''; display: block; width: 80%; height: 80%; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 3px, transparent 3px, transparent 10px); margin: 0 auto; }

.classic-mini { display: flex; flex-direction: column; padding: 10px; }
.classic-mini::before { content: ''; width: 20px; height: 100%; background: var(--primary); position: absolute; left: 0; top: 0; }
.classic-mini::after { content: ''; width: 70%; height: 80%; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 3px, transparent 3px, transparent 12px); position: absolute; left: 30px; top: 10px; }

.student-mini::before { content: ''; display: block; width: 100%; height: 30px; background: var(--primary-light); }
.student-mini::after { content: ''; display: block; width: 70%; height: 70px; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 3px, transparent 3px, transparent 12px); margin: 10px auto; }

.creative-mini::before { content: ''; display: block; width: 100%; height: 40px; background: linear-gradient(90deg, #0f62fe, #0b246e); }
.creative-mini::after { content: ''; display: block; width: 80%; height: 60px; border-radius: 4px; background: #e2e8f0; margin: -10px auto 0; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.executive-mini { border: 4px double #cbd5e1; margin: 5px; height: 110px; padding: 10px; }
.executive-mini::before { content: ''; display: block; width: 60%; height: 4px; background: #64748b; margin: 0 auto 10px; }
.executive-mini::after { content: ''; display: block; width: 90%; height: 70px; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 2px, transparent 2px, transparent 8px); margin: 0 auto; }

.tech-mini { background: #0f172a; padding: 10px; }
.tech-mini::before { content: ''; display: block; width: 40%; height: 4px; background: #22c55e; margin-bottom: 8px; }
.tech-mini::after { content: ''; display: block; width: 90%; height: 80%; background: repeating-linear-gradient(to bottom, #475569 0, #475569 2px, transparent 2px, transparent 10px); }

.elegant-mini { padding: 10px; }
.elegant-mini::before { content: ''; display: block; width: 50%; height: 2px; background: var(--primary); margin: 15px auto 10px; }
.elegant-mini::after { content: ''; display: block; width: 80%; height: 60px; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 2px, transparent 2px, transparent 12px); margin: 0 auto; }

.bold-mini::before { content: ''; display: block; width: 90%; height: 15px; background: #0f172a; margin: 10px 5%; }
.bold-mini::after { content: ''; display: block; width: 90%; height: 70px; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 4px, transparent 4px, transparent 12px); margin: 0 5%; }

.timeline-mini { padding: 10px 10px 10px 30px; position: relative; }
.timeline-mini::before { content: ''; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; background: var(--primary); }
.timeline-mini::after { content: ''; position: absolute; left: 11px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 20px 0 var(--primary), 0 40px 0 var(--primary); }

.nordic-mini { padding: 20px 10px; }
.nordic-mini::before { content: ''; display: block; width: 30%; height: 2px; background: #0f172a; margin-bottom: 15px; }
.nordic-mini::after { content: ''; display: block; width: 60%; height: 50px; background: repeating-linear-gradient(to bottom, #e2e8f0 0, #e2e8f0 2px, transparent 2px, transparent 12px); }

.infographic-mini { padding: 10px; }
.infographic-mini::before { content: ''; display: block; width: 80%; height: 6px; background: var(--primary-light); margin-bottom: 8px; border-radius: 3px; }
.infographic-mini::after { content: ''; display: block; width: 50%; height: 6px; background: var(--primary); margin-top: -14px; margin-bottom: 15px; border-radius: 3px; }

.split-mini { display: flex; }
.split-mini::before { content: ''; width: 50%; height: 100%; background: #e2e8f0; }
.split-mini::after { content: ''; width: 50%; height: 100%; background: #f8fafc; border-left: 1px solid #cbd5e1; }

.compact-mini { padding: 5px; }
.compact-mini::before { content: ''; display: block; width: 96%; height: 100px; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 2px, transparent 2px, transparent 6px); margin: 0 auto; }

.gradient-mini::before { content: ''; display: block; width: 100%; height: 40px; background: linear-gradient(135deg, #0f62fe 0%, #0b246e 100%); }
.gradient-mini::after { content: ''; display: block; width: 80%; height: 60px; background: repeating-linear-gradient(to bottom, #cbd5e1 0, #cbd5e1 3px, transparent 3px, transparent 10px); margin: 10px auto; }

/* =========================
   FOOTER
========================= */

.main-footer {
    background: #ffffff;
    border-top: 1px solid rgba(15,23,42,0.06);
    padding: 80px 8% 40px;
    color: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand-col .footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0f62fe 0%, #0b246e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand-col .footer-pitch {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    text-decoration: none;
    font-size: 1.25rem;
    transition: transform var(--transition-fast) ease;
}

.footer-socials a:hover {
    transform: translateY(-2px);
}

.footer-links-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-col a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast) ease;
}

.footer-links-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(15,23,42,0.06);
    padding-top: 30px;
    text-align: center;
    color: var(--muted-light);
    font-size: 0.9rem;
}

@media(max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media(max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .main-footer {
        padding: 60px 5% 30px;
    }
}

/* =========================
   ACCESSIBILITY & FOCUS
========================= */

a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible{
    outline: 3px solid rgba(15,98,254,0.3);
    outline-offset: 3px;
    border-radius: 8px;
}

/* =========================
   SMOOTH TRANSITIONS
========================= */

* {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: var(--transition-fast);
    transition-timing-function: ease;
}

button, a, .card, .btn {
    transition-property: transform, box-shadow, background-color, border-color, color;
    transition-duration: var(--transition-smooth);
    transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:900px){
    .hero h1{
        font-size:2.8rem;
    }
    .section h2{
        font-size: 1.8rem;
    }
}

@media(max-width:768px){
    .hamburger {
        display: flex;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        padding: 20px 8%;
        gap: 20px;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 300ms ease;
        box-shadow: 0 10px 24px rgba(15,23,42,0.1);
        border-top: 1px solid rgba(15,23,42,0.06);
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

@media(max-width:600px){
    .hero h1{
        font-size:2rem;
    }

    .hero-buttons{
        flex-direction:column;
        gap: 12px;
    }

    .btn, .btn-outline{
        width: 100%;
    }
}

@media(max-width:400px){
    .hero {
        padding-top: 120px;
        padding-left: 5%;
        padding-right: 5%;
    }
    .hero h1{
        font-size:1.75rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section {
        padding: 60px 5%;
    }
}

.back-to-top{
    position: fixed;
    right: 20px;
    bottom: 24px;
    width:44px;
    height:44px;
    border-radius:50%;
    background: var(--primary);
    color: white;
    border:none;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    box-shadow: 0 10px 24px rgba(15,23,42,0.12);
    opacity:0; transform: translateY(8px) scale(.95);
    transition: opacity 220ms ease, transform 220ms ease;
    z-index:9999;
}
.back-to-top.visible{ opacity:1; transform: translateY(0) scale(1); }

/* Micro tooltip */
.micro-tooltip{
    position: fixed;
    background: rgba(15,23,42,0.92);
    color: #fff;
    padding:6px 10px;
    border-radius:6px;
    font-size:13px;
    pointer-events:none;
    z-index:99999;
    white-space:nowrap;
    transform: translateY(-6px);
    opacity:0;
    transition: transform 140ms ease, opacity 140ms ease;
}
.micro-tooltip.show{ opacity:1; transform: translateY(0); }

/* nav underline animation */
.nav-links a:not(.nav-btn){
    position: relative;
}
.nav-links a:not(.nav-btn)::after{
    content: '';
    position: absolute;
    left:0; right:0;
    bottom:-6px;
    height:2px;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 220ms ease;
}
.nav-links a:not(.nav-btn):hover::after, .nav-links a:not(.nav-btn):focus::after{ transform: scaleX(1); }

/* ripple element */
.ripple-effect{
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255,255,255,0.45);
    opacity: 0.9;
    pointer-events: none;
    animation: ripple 600ms linear;
}

@keyframes ripple{
    to{ transform: scale(4); opacity: 0; }
}

/* ensure buttons are positioned for ripple */
button, .btn, .nav-btn, .download-btn, .template-btn{ position: relative; overflow: hidden; }

/* template hover micro animation */
.template-btn.template-hover{ transform: translateY(-6px) rotate(-1deg) scale(1.02); box-shadow: 0 18px 36px rgba(15,23,42,0.12);} 
