/* ===========================================
   TabMark Website - Main Stylesheet
   Complete overhaul: refined minimalism with trust
   =========================================== */

/* ===========================================
   CSS VARIABLES & DESIGN SYSTEM
   =========================================== */
:root {
    /* Colors - Simplified, confident palette */
    --bg-primary: #faf9f7;
    --bg-secondary: #f5f3ef;
    --bg-tertiary: #efecea;
    --surface: #ffffff;

    /* Brand - Purple as accent only */
    --purple: #6B4FA2;
    --purple-light: #8B72B8;
    --purple-muted: rgba(107, 79, 162, 0.08);

    /* Action - Green for CTAs */
    --action: #22A45D;
    --action-hover: #1D8E50;
    --action-muted: rgba(34, 164, 93, 0.1);

    /* Text hierarchy */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-tertiary: #767676;
    --text-muted: #9a9a9a;

    /* Utility */
    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing - Tighter, more intentional */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Shadows - Layered, softer, more natural */
    --shadow-sm:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg:
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl:
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 16px 48px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ===========================================
   RESET & BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Respect reduced motion preferences */
@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;
    }
}

/* ===========================================
   HEADER & NAVIGATION
   =========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all var(--transition-base);
    background: transparent;
}

header.scrolled {
    background: rgba(250, 249, 247, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

nav {
    max-width: 1120px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity var(--transition-fast);
}

.nav-brand:hover {
    opacity: 0.7;
}

.nav-brand img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    transition: color var(--transition-fast);
}

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

/* Clean CTA - solid green, no border tricks */
.nav-cta {
    padding: 0.6rem 1.25rem;
    background: var(--action);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
    background: var(--action-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(80px + var(--space-3xl)) var(--space-xl) var(--space-3xl);
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient orb - very light, not distracting */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(107, 79, 162, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 1120px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-4xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInUp 0.6s ease-out;
}

.hero-logo {
    width: 72px;
    height: 72px;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--purple);
    font-weight: 500;
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 480px;
}

/* CTA group with primary button and subtext */
.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    background: var(--action);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    width: fit-content;
}

.hero-cta:hover {
    background: var(--action-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-cta:active {
    transform: translateY(0);
}

.hero-cta-subtext {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.hero-cta-subtext svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.hero-image {
    position: relative;
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* Scroll indicator for large viewports */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 1s forwards;
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 24px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.6; transform: scaleY(1.2); }
}

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

/* ===========================================
   FEATURES SECTION
   =========================================== */
.features {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--bg-secondary);
}

.container {
    max-width: 1120px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 540px;
    margin: 0 auto var(--space-3xl);
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
}

.feature-card {
    background: var(--surface);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.feature-icon.green {
    background: var(--action-muted);
    color: var(--action);
}

.feature-icon.purple {
    background: var(--purple-muted);
    color: var(--purple);
}

.feature-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.feature-icon.gradient {
    background: var(--purple-muted);
    color: var(--purple);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

.features-showcase {
    margin-top: var(--space-2xl);
    text-align: center;
}

.features-showcase img {
    max-width: 720px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* ===========================================
   HOW IT WORKS SECTION
   =========================================== */
.how-it-works {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--bg-primary);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
    position: relative;
}

/* Connector line between steps */
.steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(16.67% + 24px);
    right: calc(16.67% + 24px);
    height: 1px;
    background: var(--border);
    z-index: 0;
}

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

.step-number {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--purple);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    position: relative;
    z-index: 1;
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.step p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    max-width: 280px;
    margin: 0 auto;
}

/* Hide the emoji icon - not needed */
.step-icon {
    display: none;
}

/* Hide individual step images - show single showcase below */
.step img {
    display: none;
}

/* Showcase image below steps */
.steps-showcase {
    text-align: center;
}

.steps-showcase img {
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.markdown-callout {
    background: var(--surface);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: var(--space-3xl);
    box-shadow: var(--shadow-sm);
}

.markdown-callout h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.markdown-callout img {
    max-width: 560px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ===========================================
   PRIVACY SECTION
   =========================================== */
.privacy {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--bg-secondary);
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
}

.privacy-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--purple-muted);
    color: var(--purple);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
    margin-top: var(--space-lg);
}

.privacy-column h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.privacy-column ul {
    list-style: none;
}

.privacy-column li {
    padding: var(--space-xs) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    line-height: 1.5;
}

.privacy-column li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--action);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5em;
}

/* ===========================================
   BLOG CTA SECTION
   =========================================== */
.blog-cta {
    padding: var(--space-3xl) var(--space-xl);
    background: var(--surface);
    text-align: center;
}

.blog-cta .section-subtitle {
    margin-bottom: var(--space-xl);
}

/* ===========================================
   SUPPORT CTA SECTION
   =========================================== */
.support-cta {
    padding: var(--space-3xl) var(--space-xl);
    background: var(--purple);
    text-align: center;
}

.support-cta .section-title {
    color: white;
}

.support-cta .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
}

.support-cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    background: white;
    color: var(--purple);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.support-cta .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===========================================
   FAQ SECTION
   =========================================== */
.faq {
    padding: var(--space-4xl) var(--space-xl);
    background: var(--bg-primary);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-base);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    padding: var(--space-lg) 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--purple);
}

/* Simple +/- toggle */
.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-answer-content {
    padding: 0 0 var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===========================================
   FOOTER
   =========================================== */
footer {
    padding: var(--space-3xl) var(--space-xl);
    background: var(--bg-tertiary);
    text-align: center;
}

.footer-logo {
    width: 36px;
    height: 36px;
    margin: 0 auto var(--space-md);
    border-radius: var(--radius-sm);
    opacity: 0.8;
}

.footer-tagline {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.footer-note {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }

    .hero-text {
        order: 1;
    }

    .hero-image {
        order: 2;
    }

    .hero-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-group {
        align-items: center;
    }

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

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .steps::before {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 768px) {
    nav {
        padding: var(--space-md);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        gap: var(--space-md);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: calc(80px + var(--space-xl)) var(--space-lg) var(--space-2xl);
    }

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

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-logo {
        width: 56px;
        height: 56px;
    }

    .section-title {
        font-size: 1.5rem;
    }

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

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

    /* Fix image overflow on mobile */
    .features-showcase img,
    .markdown-callout img,
    .steps-showcase img {
        max-width: 100%;
        width: 100%;
    }

    /* Reduce section padding for more space */
    .features,
    .how-it-works,
    .privacy,
    .faq {
        padding: var(--space-2xl) var(--space-lg);
    }

    .faq-question {
        font-size: 0.95rem;
    }
}

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

    .hero-cta {
        width: 100%;
        justify-content: center;
    }
}
