/* ===== Shared Styles for Tab ReTitler Docs ===== */

:root {
    --primary: #4A6CF7;
    --primary-dark: #3B5DE7;
    --primary-light: #6B8AFF;
    --secondary: #7B68EE;
    --accent: #FF6B6B;
    --success: #10B981;
    --warning: #F59E0B;
    --dark-bg: #0F172A;
    --dark-surface: #1E293B;
    --dark-text: #F1F5F9;
    --light-bg: #FFFFFF;
    --light-surface: #F8FAFC;
    --light-border: #E2E8F0;
    --light-text: #1E293B;
    --light-text-secondary: #64748B;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--light-text);
    background: var(--light-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Skip to content (A11y) ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 var(--radius) var(--radius);
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s;
}

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

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 800px;
}

/* ===== Hero / Header ===== */
.hero {
    background: linear-gradient(135deg, #4A6CF7 0%, #7B68EE 50%, #9F5CF7 100%);
    color: white;
    text-align: center;
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero__logo {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hero__logo img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===== Buttons ===== */
.btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn--primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn--outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn--solid {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn--solid:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn i, .btn svg {
    font-size: 1.1em;
    flex-shrink: 0;
}

/* ===== Main content area ===== */
.main-content {
    background: var(--light-bg);
    border-radius: 32px 32px 0 0;
    margin-top: -60px;
    position: relative;
    z-index: 1;
}

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

.section--alt {
    background: var(--light-surface);
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
}

.section__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section__subtitle {
    font-size: 1.1rem;
    color: var(--light-text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ===== Feature Cards ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--light-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--light-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 14px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.feature-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--light-text);
}

.feature-card__desc {
    color: var(--light-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Steps ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    counter-reset: step;
}

.step {
    text-align: center;
    position: relative;
}

.step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.step__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--light-text);
}

.step__desc {
    color: var(--light-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== CTA Section ===== */
.cta-section {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.cta-section__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-section__subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark-bg);
    color: var(--dark-text);
    padding: 48px 0 32px;
}

.footer__grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer__brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.footer__links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer__links a:hover {
    color: var(--primary-light);
}

.footer__copy {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ===== Buy Me a Coffee ===== */
.bmc-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.bmc-fab:hover {
    transform: translateY(-4px);
}

.bmc-fab a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
}

.bmc-fab img {
    height: 48px;
    width: auto;
}

/* ===== Privacy Policy specific ===== */
.policy-content {
    background: var(--light-surface);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.policy-content h2 {
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 600;
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-border);
}

.policy-content h2:first-child {
    margin-top: 0;
}

.policy-content h3 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 24px 0 12px;
}

.policy-content p {
    margin-bottom: 14px;
    color: var(--light-text);
    line-height: 1.8;
}

.policy-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.policy-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.callout {
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.06), rgba(123, 104, 238, 0.06));
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.callout h4 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.callout--success {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.03));
}

.callout--success h4 {
    color: var(--success);
}

.badge--updated {
    display: inline-block;
    background: var(--warning);
    color: var(--dark-bg);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    margin-bottom: 32px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.contact-box {
    background: var(--primary);
    color: white;
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 24px;
}

.contact-box h4 {
    color: white;
    margin-bottom: 8px;
}

.contact-box p {
    color: rgba(255, 255, 255, 0.9);
}

.contact-box a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== Dark mode ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #0F172A;
        --light-surface: #1E293B;
        --light-border: #334155;
        --light-text: #F1F5F9;
        --light-text-secondary: #94A3B8;
    }

    .feature-card {
        background: var(--light-surface);
    }

    .policy-content {
        background: var(--light-surface);
    }

    .policy-content h2 {
        border-bottom-color: var(--light-border);
    }

    .contact-box {
        background: var(--primary-dark);
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 100px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .footer__grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer__links {
        justify-content: center;
    }

    .policy-content {
        padding: 28px;
    }

    .bmc-fab {
        bottom: 16px;
        right: 16px;
    }

    .bmc-fab img {
        height: 40px;
    }
}

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

    .bmc-fab {
        bottom: 12px;
        right: 12px;
    }

    .bmc-fab img {
        height: 36px;
    }
}
