/* ============================================
   PDF Tools — CodexNeo
   ============================================ */

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode (default) */
    --c-bg: #f5f5f9;
    --c-surface: #ffffff;
    --c-surface-2: #eeeef3;
    --c-border: rgba(0, 0, 0, 0.08);
    --c-text: #1a1a2e;
    --c-text-muted: #6b6b80;

    /* Brand Colors */
    --c-primary: #1565D8;
    /* Royal Blue */
    --c-primary-light: #00A8FF;
    /* Electric Blue */
    --c-accent: #0B3C91;
    /* Deep Blue */
    --c-gradient: linear-gradient(135deg, #1565D8 0%, #00A8FF 100%);

    --c-header-bg: rgba(255, 255, 255, 0.85);

    --tc-blue: #1565D8;
    --tc-purple: #0B3C91;
    --tc-green: #10b981;

    --r-md: 0.75rem;
    --r-lg: 1rem;
    --r-xl: 1.25rem;

    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 40px rgba(21, 101, 216, 0.06);
    --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.10), 0 0 60px rgba(21, 101, 216, 0.06);

    --t-fast: 0.15s ease;
    --t-normal: 0.3s ease;
    --t-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --c-bg: #0A0F1F;
    /* Main Background */
    --c-surface: #111827;
    /* Section Background */
    --c-surface-2: #1f2937;
    /* Card Background (lighter) */
    --c-border: rgba(255, 255, 255, 0.08);
    --c-text: #FFFFFF;
    /* Heading */
    --c-text-muted: #9CA3AF;
    /* Paragraph */

    --c-primary: #1565D8;
    --c-primary-light: #00A8FF;
    --c-accent: #00A8FF;
    --c-gradient: linear-gradient(135deg, #1565D8 0%, #00A8FF 100%);

    --c-header-bg: rgba(10, 15, 31, 0.85);

    --tc-blue: #3b82f6;
    --tc-purple: #8b5cf6;
    --tc-green: #22c55e;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 60px rgba(21, 101, 216, 0.10);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 80px rgba(21, 101, 216, 0.12);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.12);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.35s ease, color 0.35s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--c-text-muted);
    font-size: 1rem;
    margin-top: 0.4rem;
}

.gradient-text {
    background: var(--c-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all var(--t-normal);
}

.btn--primary {
    background: var(--c-gradient);
    color: #fff;
    box-shadow: 0 4px 18px rgba(21, 101, 216, 0.25);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(21, 101, 216, 0.40);
}

.btn--lg {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
}

.btn--muted {
    background: var(--c-surface-2);
    color: var(--c-text-muted);
    cursor: default;
    font-size: 0.82rem;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--c-header-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--c-border);
    transition: background-color 0.35s ease;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header__logo-img {
    height: 30px;
    width: auto;
}

.header__logo-divider {
    width: 1px;
    height: 22px;
    background: var(--c-border);
}

.header__logo-text {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--c-text-muted);
}

.header__nav {
    display: flex;
    gap: 1.8rem;
}

.header__nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--c-text-muted);
    transition: color var(--t-fast);
    position: relative;
}

.header__nav-link:hover,
.header__nav-link.active {
    color: var(--c-text);
}

.header__nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--c-gradient);
    border-radius: 1px;
}

.header__menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.header__menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: all var(--t-normal);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    padding: 9rem 0 5rem;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero__title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
}

.hero__subtitle {
    font-size: 1.08rem;
    color: var(--c-text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 460px;
}

.hero__glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.hero__glow--1 {
    top: -180px;
    right: -120px;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, transparent 70%);
}

.hero__glow--2 {
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.07) 0%, transparent 70%);
}

/* ============================================
   TOOLS GRID
   ============================================ */
.tools {
    padding: 2rem 0 5rem;
}

.tools__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    transition: all var(--t-smooth);
    animation: fadeInUp 0.5s ease both;
}

.tool-card:nth-child(2) {
    animation-delay: 0.08s;
}

.tool-card:nth-child(3) {
    animation-delay: 0.16s;
}

.tool-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(99, 102, 241, 0.22);
    box-shadow: var(--shadow-card-hover);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, var(--c-surface) 100%);
}

.tool-card:hover .tool-card__icon {
    transform: scale(1.08);
}

.tool-card:hover .tool-card__title {
    color: #fff;
}

.tool-card:hover .tool-card__btn {
    box-shadow: 0 6px 28px rgba(21, 101, 216, 0.35);
}

/* Disabled / coming soon cards */
.tool-card--disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.2);
}

.tool-card--disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--c-border);
    background: var(--c-surface);
}

.tool-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(11, 60, 145, 0.15);
    color: var(--c-accent);
    border-radius: 999px;
}

.tool-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: transform var(--t-normal);
}

.tool-card__icon--blue {
    background: rgba(21, 101, 216, 0.10);
    color: var(--tc-blue);
}

.tool-card__icon--purple {
    background: rgba(11, 60, 145, 0.10);
    color: var(--tc-purple);
}

.tool-card__icon--green {
    background: rgba(34, 197, 94, 0.10);
    color: var(--tc-green);
}

.tool-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    transition: color var(--t-fast);
}

.tool-card__desc {
    font-size: 0.88rem;
    color: var(--c-text-muted);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1.5rem;
}

.tool-card__btn {
    width: 100%;
    text-align: center;
    transition: all var(--t-normal);
}

/* ============================================
   FEATURES
   ============================================ */
.features {
    padding: 2rem 0 4rem;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature {
    text-align: center;
    padding: 1.75rem 1.25rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    transition: all var(--t-smooth);
}

.feature:hover {
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.feature__icon {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
    display: block;
}

.feature__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature__desc {
    font-size: 0.82rem;
    color: var(--c-text-muted);
    line-height: 1.5;
}

/* ============================================
   ABOUT / CONTENT
   ============================================ */
.about {
    padding: 3rem 0 4rem;
}

.about__content {
    max-width: 780px;
    margin: 0 auto;
}

.about__content p {
    font-size: 0.95rem;
    color: var(--c-text-muted);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about__content p:last-child {
    margin-bottom: 0;
}

.about__content strong {
    color: var(--c-text);
    font-weight: 600;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    padding: 2rem 0 4rem;
}

.faq__list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq__item {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color var(--t-normal);
}

.faq__item:hover {
    border-color: rgba(99, 102, 241, 0.12);
}

.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    background: none;
    border: none;
    color: var(--c-text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color var(--t-fast);
}

.faq__question:hover {
    color: var(--c-primary-light);
}

.faq__chevron {
    flex-shrink: 0;
    transition: transform var(--t-normal);
    color: var(--c-text-muted);
}

.faq__item.open .faq__chevron {
    transform: rotate(180deg);
    color: var(--c-primary-light);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-smooth), padding var(--t-smooth);
}

.faq__item.open .faq__answer {
    max-height: 300px;
}

.faq__answer p {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.88rem;
    color: var(--c-text-muted);
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--c-border);
    margin-top: 1rem;
}

.footer__inner {
    text-align: center;
}

.footer p {
    font-size: 0.82rem;
    color: var(--c-text-muted);
}

.footer a {
    color: var(--c-primary-light);
    transition: color var(--t-fast);
}

.footer a:hover {
    color: var(--c-text);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {

    .tools__grid,
    .features__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .header__nav {
        display: none;
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--c-surface);
        border-bottom: 1px solid var(--c-border);
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .header__nav.open {
        display: flex;
    }

    .header__menu-btn {
        display: flex;
    }

    .hero {
        padding: 7rem 0 3.5rem;
    }

    .hero__title {
        font-size: 2rem;
    }

    .tools__grid,
    .features__grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--c-text-muted);
    transition: all var(--t-normal);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
    transform: scale(1.08);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform var(--t-smooth);
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Sun icon shown in light mode, moon icon in dark */
.theme-toggle .icon-sun {
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* Light-mode: tool-card hover text stays dark */
.tool-card:hover .tool-card__title {
    color: var(--c-text);
}

[data-theme="dark"] .tool-card:hover .tool-card__title {
    color: #fff;
}

/* Light-mode: mobile nav background */
@media (max-width: 640px) {
    .header__nav {
        background: var(--c-surface);
    }
}