/* 
 * AnchorKit Landing Page Styles
 * Modern, Clean, Conversion-Focused
 */

:root {
    /* Colors */
    --color-primary: #0F172A;
    /* Slate 900 */
    --color-primary-light: #1E293B;
    /* Slate 800 */
    --color-accent: #7C3AED;
    /* Violet 600 */
    --color-accent-hover: #6D28D9;
    /* Violet 700 */
    --color-text: #334155;
    /* Slate 700 */
    --color-text-light: #64748B;
    /* Slate 500 */
    --color-bg: #F8FAFC;
    /* Slate 50 */
    --color-surface: #FFFFFF;
    --color-border: #E2E8F0;
    /* Slate 200 */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-primary);
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: white;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-bg);
    border-color: var(--color-text-light);
}

.btn-white {
    background-color: white;
    color: var(--color-accent);
}

.btn-white:hover {
    background-color: #f0f9ff;
}

.btn-outline-white {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #EDE9FE;
    color: #5B21B6;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
    text-decoration: none;
}

.logo:hover {
    color: var(--color-primary);
}

/* Logo animation */

/* Header Styles */
.readsy-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 0.5rem 1.25rem;
    margin-bottom: 1.5rem;
    gap: 16px;
}

/* Animated Square Logo */
.readsy-animated-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.readsy-animated-logo svg {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.readsy-animated-logo svg:hover {
    transform: scale(1.05);
}

/* CSS Keyframe animations for color shifting - Optimized for performance */
@keyframes colorShiftSquare1 {
    0% {
        fill: #BBD0FF;
    }

    /* Light blue */
    25% {
        fill: #E7C6FF;
    }

    /* Light purple */
    50% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    75% {
        fill: #C8B6FF;
    }

    /* Lavender */
    100% {
        fill: #BBD0FF;
    }

    /* Back to light blue */
}

@keyframes colorShiftSquare2 {
    0% {
        fill: #E7C6FF;
    }

    /* Light purple */
    25% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    50% {
        fill: #C8B6FF;
    }

    /* Lavender */
    75% {
        fill: #BBD0FF;
    }

    /* Light blue */
    100% {
        fill: #E7C6FF;
    }

    /* Back to light purple */
}

@keyframes colorShiftSquare3 {
    0% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    25% {
        fill: #C8B6FF;
    }

    /* Lavender */
    50% {
        fill: #BBD0FF;
    }

    /* Light blue */
    75% {
        fill: #E7C6FF;
    }

    /* Light purple */
    100% {
        fill: #B8C0FF;
    }

    /* Back to periwinkle */
}

@keyframes colorShiftSquare4 {
    0% {
        fill: #C8B6FF;
    }

    /* Lavender */
    25% {
        fill: #BBD0FF;
    }

    /* Light blue */
    50% {
        fill: #E7C6FF;
    }

    /* Light purple */
    75% {
        fill: #B8C0FF;
    }

    /* Periwinkle */
    100% {
        fill: #C8B6FF;
    }

    /* Back to lavender */
}

/* Apply animations to each square - Only when not in reduced motion mode */
.readsy-animated-logo svg #readsy-square-1 {
    animation: colorShiftSquare1 20s ease-in-out infinite;
    will-change: auto;
    /* Let browser optimize */
}

.readsy-animated-logo svg #readsy-square-2 {
    animation: colorShiftSquare2 20s ease-in-out infinite;
    will-change: auto;
}

.readsy-animated-logo svg #readsy-square-3 {
    animation: colorShiftSquare3 20s ease-in-out infinite;
    will-change: auto;
}

.readsy-animated-logo svg #readsy-square-4 {
    animation: colorShiftSquare4 20s ease-in-out infinite;
    will-change: auto;
}

/* Pause animation on hover for better UX */
.readsy-animated-logo:hover svg path {
    animation-play-state: paused;
}

/* Disable animations completely for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .readsy-animated-logo svg path {
        animation: none !important;
    }
}

/* Disable animations on low-end devices or when battery is low */
@media (prefers-reduced-motion: reduce),
(update: slow) {
    .readsy-animated-logo svg path {
        animation: none !important;
    }
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 480px) {
    .readsy-header {
        gap: 12px;
    }

    .readsy-animated-logo svg {
        width: 36px;
        height: 36px;
    }
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a:not(.btn) {
    font-weight: 500;
    color: var(--color-text);
}

.main-nav a:not(.btn):hover {
    color: var(--color-accent);
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(to bottom, var(--color-bg), white);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--spacing-lg);
    row-gap: 1rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

@media (max-width: 425px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
}

.hero-trust {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
}

/* Hero Visual (Mockup) */
.toc-mockup {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    max-width: 480px;
    margin: 0 auto;
    transform: rotate(-2deg);
    transition: transform 0.5s ease;
}

.toc-mockup:hover {
    transform: rotate(0deg) scale(1.02);
}

.toc-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background-color: #EF4444;
}

.dot.yellow {
    background-color: #F59E0B;
}

.dot.green {
    background-color: #10B981;
}

.toc-body h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.toc-body ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-body ul ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.toc-body a {
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.95rem;
}

.toc-body a:hover,
.toc-body a.active {
    background-color: #F5F3FF;
    color: var(--color-accent);
    font-weight: 500;
}

/* Features Section */
.features {
    padding: var(--spacing-xl) 0;
    background-color: white;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--color-text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-text-light);
}

/* Pro Section */
.pro-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg);
}

.pro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.pro-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.pro-text>p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.pro-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pro-list li {
    display: flex;
    gap: 1rem;
}

.check-icon {
    display: flex;
    gap: 1rem;
    align-items: left;
    justify-content: left;
    width: 24px;
    height: 24px;
    background-color: #DCFCE7;
    color: #166534;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.pro-list strong {
    display: block;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.pro-list p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.pro-visual {
    display: flex;
    justify-content: center;
}

.pro-card-visual {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.floating-toc {
    width: 120px;
    background: var(--color-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 20px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}

.toc-line {
    height: 8px;
    background: #CBD5E1;
    border-radius: 4px;
    width: 100%;
}

.toc-line.active {
    background: var(--color-accent);
    width: 80%;
}

.content-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.line {
    height: 12px;
    background: #E2E8F0;
    border-radius: 6px;
}

.line.long {
    width: 100%;
}

.line.medium {
    width: 70%;
}

.line.short {
    width: 40%;
}

/* CTA Section */
.cta-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-accent);
    color: white;
    text-align: center;
}

.cta-box h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.footer-content-centered {
    justify-content: center;
}

.footer-content-centered .footer-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content-centered .footer-brand .logo {
    justify-content: center;
}

.site-footer .logo {
    color: white;
    margin-bottom: 1rem;
    text-decoration: none;
}

.site-footer .logo:hover {
    color: white;
    opacity: 0.9;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
}

.footer-brand p {
    color: #94A3B8;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.link-group a {
    display: block;
    color: #94A3B8;
    margin-bottom: 0.75rem;
}

.link-group a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    color: #64748B;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom p:first-child {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

.footer-bottom a {
    color: #94A3B8;
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: white;
}

/* Ensure proper contrast for selected text in footer */
.site-footer ::selection {
    background-color: #E2E8F0;
    color: #0F172A;
}

.site-footer ::-moz-selection {
    background-color: #E2E8F0;
    color: #0F172A;
}

/* Responsive */
@media (max-width: 1052px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content,
    .pro-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .toc-mockup {
        margin-top: 2rem;
        transform: rotate(0);
    }

    .hero-video {
        margin-top: 2rem;
    }


    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Documentation Page Styles */
.docs-page .site-header {
    background-color: white;
}

.docs-main {
    padding: var(--spacing-xl) 0;
    min-height: 80vh;
}

.docs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--spacing-lg);
    position: relative;
}

/* Sidebar */
.docs-sidebar {
    border-right: 1px solid var(--color-border);
    padding-right: var(--spacing-md);
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.docs-nav h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin: 1.5rem 0 0.75rem;
}

.docs-nav h4:first-child {
    margin-top: 0;
}

.docs-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.docs-nav a {
    display: block;
    font-size: 0.95rem;
    color: var(--color-text);
    padding: 0.25rem 0;
}

.docs-nav a:hover {
    color: var(--color-accent);
}

/* Docs Content */
.docs-content {
    padding-left: var(--spacing-md);
    max-width: 800px;
}

.docs-header {
    margin-bottom: var(--spacing-md);
}

.docs-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--color-text-light);
}

.docs-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.docs-content h2:first-of-type {
    margin-top: 32px;
}

.docs-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.docs-content h4 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}

.docs-content p {
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.docs-content ul,
.docs-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.docs-content li {
    margin-bottom: 0.5rem;
}

.docs-content ul {
    list-style: disc;
}

.docs-content ol {
    list-style: decimal;
}

.docs-content code {
    background-color: #F1F5F9;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.875em;
    color: #D946EF;
    /* Pink-ish for code */
}

.docs-content pre {
    background-color: #0F172A;
    /* Dark slate */
    color: #F8FAFC;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.docs-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9em;
}

.note {
    background-color: #EFF6FF;
    border-left: 4px solid var(--color-accent);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

/* Responsive Docs */
@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding-right: 0;
        padding-bottom: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }

    .sidebar-sticky {
        position: static;
        max-height: none;
    }

    .docs-content {
        padding-left: 0;
    }
}

/* --- 2025 Update Styles --- */

/* Hero Updates */
.hero-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    grid-column: 1 / -1;
}

@media (max-width: 1052px) {
    .hero-badges {
        justify-content: center;
    }
}

.hero-trust-badges {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.trust-pill {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: #F1F5F9;
    color: #64748B;
    border-radius: 99px;
    font-weight: 500;
}

.subheadline {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Editor Mockup Window */
.editor-window {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #E2E8F0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
}

.editor-window:hover {
    transform: rotate(0deg) scale(1.02);
}

.window-header {
    background: #F8FAFC;
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: #94A3B8;
    font-weight: 500;
}

.window-body {
    display: flex;
    height: 400px;
}

.sidebar {
    width: 200px;
    background: #F8FAFC;
    border-right: 1px solid #E2E8F0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.control-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fake-select {
    background: white;
    border: 1px solid #CBD5E1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #334155;
}

.checkboxes {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
}

.preview-area {
    flex: 1;
    background: white;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.toggle {
    display: flex;
    background: #E2E8F0;
    border-radius: 4px;
    padding: 2px;
}

.toggle span {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    padding: 4px;
    border-radius: 3px;
    color: #64748B;
}

.toggle span.active {
    background: white;
    color: #0F172A;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.preview-toc {
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 16px;
    background: #F8FAFC;
}

.preview-toc h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #1E293B;
}

.preview-toc ul {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-toc ul ul {
    margin-left: 16px;
    margin-top: 6px;
}

.preview-toc a {
    color: #334155;
    text-decoration: none;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
}

.preview-toc a:hover,
.preview-toc a.active {
    background: #E0E7FF;
    color: #4338CA;
}

/* Hero Video */
.hero-video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #E2E8F0;
    object-fit: contain;
    background: white;
}


/* Problem Solution */
.problem-solution {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #fff, #F8FAFC);
}

.ps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.ps-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

.ps-card.problem .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.ps-card.solution .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.ps-card h3 {
    margin-bottom: 0.5rem;
}

.ps-card p {
    color: #64748B;
}

.ps-arrow {
    font-size: 2rem;
    color: #CBD5E1;
}

.text-size-md {
    font-size: 1.15rem;
}

@media(max-width: 768px) {
    .ps-arrow {
        transform: rotate(90deg);
    }
}

/* Preview Video */
.preview-video {
    display: block;
    max-width: 900px;
    width: 100%;
    margin: 2rem auto 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    object-fit: contain;
}

@media (max-width: 768px) {
    .preview-video {
        max-width: 100%;
        border-radius: var(--radius-md);
    }
}


/* Features Grid 3x3 */
.features-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.feature-item {
    background: #F8FAFC;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid transparent;
    /* Align border */
}

.f-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-item p {
    font-size: 0.95rem;
    color: #64748B;
}

/* Interactive Demo Section */
.demo-section {
    padding: var(--spacing-xl) 0;
    background: #0F172A;
    /* Dark background for contrast */
    color: white;
}

.demo-section .section-header h2 {
    color: white;
}

.demo-section .section-header p {
    color: #94A3B8;
}

.demo-container {
    background: #1E293B;
    border-radius: 16px;
    border: 1px solid #334155;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.demo-controls {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: #0F172A;
    border-bottom: 1px solid #334155;
}

.demo-btn-group {
    display: flex;
    gap: 10px;
}

.demo-viewport {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 400px;
}

@media(max-width: 700px) {
    .demo-viewport {
        grid-template-columns: 1fr;
    }

    .demo-content-placeholder {
        display: none;
    }
}

.toc-demo {
    padding: 24px;
    border-right: 1px solid #334155;
    background: #F8FAFC;
    /* Default background inside mockup */
    color: #334155;
    transition: all 0.3s ease;
}

/* Demo Themes */
.toc-demo.theme-modern {
    background: #FFFFFF;
}

.toc-demo.theme-classic {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    margin: 16px;
    height: fit-content;
}

.toc-demo.theme-dark {
    background: #1E293B;
    color: #E2E8F0;
}

.toc-demo.theme-dark a {
    color: #CBD5E1;
}

.toc-demo.theme-dark a.active {
    color: #818CF8;
    background: rgba(129, 140, 248, 0.1);
}

.toc-header-demo {
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.toc-list-demo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-list-demo ul {
    margin-left: 16px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-list-demo a {
    color: inherit;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    display: block;
}

.toc-list-demo a:hover {
    opacity: 0.8;
}

.toc-list-demo a.active {
    background: #E0E7FF;
    color: #4338CA;
    border-left: 3px solid #4338CA;
}

.theme-dark .toc-list-demo a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.demo-content-placeholder {
    padding: 32px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.d-line {
    background: #E2E8F0;
    border-radius: 4px;
}

.d-line.h1 {
    height: 32px;
    width: 60%;
    margin-bottom: 16px;
}

.d-line.p {
    height: 12px;
    width: 100%;
}

.d-line.h2 {
    height: 24px;
    width: 40%;
    margin-top: 24px;
}

/* Comparison Table */
.comparison-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    text-align: left;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    border-bottom: 1px solid #E2E8F0;
}

.comparison-table th {
    background: #F8FAFC;
    font-weight: 600;
    color: #0F172A;
}

.comparison-table th.highlight {
    background: #F0F9FF;
    color: #0284C7;
    border-bottom: 2px solid #0284C7;
}

.comparison-table td.check {
    color: #166534;
    font-weight: 600;
    background: #F0FDF4;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comparison-table td.check::before {
    content: '✅';
    font-size: 1.1em;
    line-height: 1;
}

.comparison-table td.cross {
    color: #991B1B;
    text-align: left;
    opacity: 0.5;
}

.comparison-table td.warning {
    color: #B45309;
    text-align: left;
}

/* Pricing Section */
.pricing-section {
    padding: var(--spacing-xl) 0;
    background: #F8FAFC;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    border: 2px solid var(--color-accent);
    box-shadow: 0 20px 25px -5px rgba(124, 58, 237, 0.1);
    transform: scale(1.02);
    z-index: 10;
}

.popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.5rem;
}

.pricing-card .price span {
    font-size: 1rem;
    color: #64748B;
    font-weight: 400;
}

.pricing-card .sites {
    color: #64748B;
    margin-bottom: 2rem;
    font-weight: 500;
}

.features-list {
    margin-bottom: 2rem;
    flex: 1;
}

.features-list li {
    margin-bottom: 0.75rem;
    color: #334155;
}

.btn-full {
    width: 100%;
}

/* FAQ */
.faq-section {
    padding: var(--spacing-xl) 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: #64748B;
    font-size: 0.95rem;
}

@media(max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Feature Section Labels --- */
.features-section-label {
    text-align: left;
    margin: 4rem 0 2rem;
}

.features-section-label h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.features-section-label p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.features-section-label.pro-label {
    margin-top: 5rem;
}

/* Pro Feature Items */
.pro-item {
    position: relative;
}

.pro-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Deep Dive Sections */
.deep-dive-section {
    padding: var(--spacing-xl) 0;
    background: white;
}

.deep-dive-section:nth-child(even) {
    background: var(--color-bg);
}

.deep-dive-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.deep-dive-content.reverse {
    direction: rtl;
}

.deep-dive-content.reverse>* {
    direction: ltr;
}

.deep-dive-text h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.deep-dive-text .lead {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Workflow Comparison */
.workflow-comparison {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #F8FAFC;
    border-radius: 12px;
    text-align: left;
}

.workflow-old,
.workflow-new {
    flex: 1;
}

.workflow-comparison h4 {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.workflow-comparison ol {
    list-style: decimal;
    padding-left: 1.5rem;
    color: var(--color-text);
}

.workflow-comparison ol li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.workflow-arrow {
    font-size: 2rem;
    color: var(--color-accent);
    flex-shrink: 0;
}

/* Preview Showcase */
.preview-showcase {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #E2E8F0;
    box-shadow: var(--shadow-lg);
}

.showcase-label {
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.showcase-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #F8FAFC;
    padding: 1.5rem;
    border-radius: 8px;
}

.mini-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ctrl-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
}

.ctrl-select {
    background: white;
    border: 1px solid #CBD5E1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #334155;
    min-width: 120px;
}

.mini-arrow {
    font-size: 2rem;
    color: var(--color-accent);
}

.mini-preview {
    flex: 1;
}

.mini-toc {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 12px;
}

.mini-toc-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #1E293B;
}

.mini-toc-item {
    padding: 4px 8px;
    font-size: 0.85rem;
    margin-bottom: 4px;
    border-radius: 4px;
    color: #334155;
}

.mini-toc-item.active {
    background: #E0E7FF;
    color: #4338CA;
    font-weight: 500;
}

/* Deep Dive Video */
.deep-dive-video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #E2E8F0;
    object-fit: contain;
    background: white;
}

/* Centered Deep Dive Layout */
.deep-dive-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.deep-dive-text-centered {
    text-align: center;
    max-width: 900px;
}

.deep-dive-text-centered h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.deep-dive-text-centered .lead {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.deep-dive-visual-centered {
    width: 100%;
    max-width: 900px;
}


/* Implementation Methods */
.implementation-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.method-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #E2E8F0;
    text-align: center;
}

.method-card.pro {
    border-color: #DDD6FE;
    background: linear-gradient(to bottom, #F5F3FF, white);
}

.method-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.method-card h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.method-card p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.mini-pro-badge {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 4px;
}

/* Benefits List */
.benefits-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefits-list li {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.metric-card {
    background: #F8FAFC;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.metric-icon-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.metric-icon {
    font-size: 2rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Privacy Benefits */
.privacy-benefits {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
}

.privacy-benefits h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.privacy-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.privacy-item:last-child {
    margin-bottom: 0;
}

.check-mark {
    background: #DCFCE7;
    color: #166534;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1rem;
}

.privacy-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--color-primary);
}

.privacy-item p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

/* Comparison Table Updates */
.comparison-intro {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.comparison-table td.limited {
    color: #64748B;
    text-align: left;
    font-style: italic;
}

/* Responsive for Deep Dive Sections */
@media (max-width: 768px) {

    .deep-dive-content,
    .deep-dive-content.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .workflow-comparison {
        flex-direction: column;
        gap: 1rem;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }

    .implementation-methods {
        grid-template-columns: 1fr;
    }

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

    .showcase-box {
        flex-direction: column;
    }
}