/* ================================================================
   CSS Custom Properties - matches the app's Windows 11 theme
   ================================================================ */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-hover: #4f8efc;
    --primary-pressed: #1d4ed8;
    --accent-purple: #7c3aed;
    --accent-emerald: #059669;
    --accent-orange: #d97706;
    --accent-red: #dc2626;
    --accent-teal: #0f766e;
    --accent-indigo: #4f46e5;

    --text-primary: #0f172a;
    --text-heading: #1e293b;
    --text-body: #334155;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --bg-page: #f3f5f9;
    --bg-surface: #f8fafc;
    --bg-white: #ffffff;
    --bg-info: #e0f2fe;

    --border-default: #cbd5e1;
    --border-muted: #94a3b8;

    --success: #16a34a;
    --warning: #d97706;
    --error: #dc2626;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-body);
    background: #0f172a;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(15,23,42,0.12), rgba(15,23,42,0.28)),
        url("screenshots/webp/email_tools_panel_main.webp") center top / cover no-repeat;
    transform: translateZ(0);
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

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

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

section {
    padding: 84px 0;
}

section[id],
header[id] {
    scroll-margin-top: 88px;
}

/* ================================================================
   Navigation
   ================================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(203,213,225,0.8);
    transition: box-shadow 0.3s, background 0.3s;
}

.nav.scrolled {
    background: rgba(255,255,255,0.96);
    box-shadow: var(--shadow-md);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    min-width: max-content;
}

.nav-brand img {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    background: rgba(241,245,249,0.8);
    border: 1px solid rgba(203,213,225,0.8);
    border-radius: var(--radius-md);
}

.nav-links a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
}

.nav-links a:hover {
    background: var(--bg-white);
    color: var(--primary-dark);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    transition: background 0.2s, transform 0.15s;
    min-width: max-content;
}
.nav-cta:hover { background: var(--primary-dark); color: #fff !important; transform: translateY(-1px); }

/* ================================================================
   Hero
   ================================================================ */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, rgba(15,23,42,0.86) 0%, rgba(30,41,59,0.68) 50%, rgba(15,23,42,0.84) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(59,130,246,0.16);
    border: 1px solid rgba(147,197,253,0.28);
    border-radius: 999px;
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 24px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.42; }
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 20px;
}

.hero h1 .gradient {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
    overflow-wrap: anywhere;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

.btn-outline {
    background: #374151;
    color: #cbd5e1;
    border: 1.5px solid rgba(203,213,225,0.18);
    box-shadow: 0 4px 14px rgba(15,23,42,0.25);
}
.btn-outline:hover {
    color: #fff;
    border-color: rgba(203,213,225,0.34);
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15,23,42,0.34);
}

/* ================================================================
   Section Headers
   ================================================================ */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: #e0f2fe;
    color: #075985;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto;
    overflow-wrap: anywhere;
}

/* ================================================================
   Workspace Explorer
   ================================================================ */
.workspace-section {
    background: rgba(248,250,252,0.82);
    border-top: 1px solid rgba(255,255,255,0.48);
    border-bottom: 1px solid rgba(255,255,255,0.48);
}

.workspace-section:hover,
.workspace-section:focus-within {
    background: rgba(248,250,252,0.9);
}

.workspace-explorer {
    --workspace-0: var(--success);
    --workspace-1: var(--accent-purple);
    --workspace-2: var(--accent-orange);
    --workspace-3: var(--accent-teal);
    --workspace-4: var(--accent-red);
    --workspace-5: var(--primary);
    --workspace-6: var(--accent-indigo);
    --workspace-accent: var(--workspace-0);
    overflow: hidden;
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 0;
}

.workspace-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
    padding: 12px;
    background: rgba(248,250,252,0.82);
    border-bottom: 1px solid var(--border-default);
    scrollbar-width: thin;
}

.workspace-tabs button,
.workspace-shot {
    font: inherit;
    cursor: pointer;
}

.workspace-tabs button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.workspace-tabs button:hover {
    border-color: var(--workspace-accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.workspace-tabs button.active {
    background: var(--workspace-accent);
    border-color: var(--workspace-accent);
    color: #fff;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--workspace-accent) 24%, transparent);
}

.workspace-view {
    display: grid;
    grid-template-columns: minmax(240px, 0.52fr) minmax(0, 1fr);
    gap: 24px;
    padding: 26px;
    align-items: start;
    min-width: 0;
}

.workspace-copy {
    min-width: 0;
    padding-left: 18px;
    border-left: 4px solid var(--workspace-accent);
}

.workspace-eyebrow {
    display: inline-block;
    color: var(--workspace-accent);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.workspace-copy h3 {
    color: var(--text-heading);
    font-size: 1.45rem;
    line-height: 1.22;
    margin-bottom: 10px;
}

.workspace-copy p {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.68;
    overflow-wrap: anywhere;
}

.workspace-details {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.workspace-details li::marker {
    color: var(--workspace-accent);
}

.workspace-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.workspace-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--workspace-accent) 11%, #fff);
    border: 1px solid color-mix(in srgb, var(--workspace-accent) 22%, var(--border-default));
    color: color-mix(in srgb, var(--workspace-accent) 72%, var(--text-heading));
    font-size: 0.75rem;
    font-weight: 700;
}

.workspace-media {
    overflow: hidden;
    margin: 0;
    background: #e2e8f0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), var(--shadow-sm);
    min-width: 0;
}

.workspace-media a {
    display: block;
    aspect-ratio: 16 / 10;
}

.workspace-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}

.workspace-media figcaption {
    padding: 10px 12px;
    background: rgba(255,255,255,0.9);
    border-top: 1px solid var(--border-default);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.workspace-shots {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
    min-width: 0;
}

.workspace-shot {
    overflow: hidden;
    min-width: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.workspace-shot:hover {
    border-color: var(--workspace-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.workspace-shot[aria-pressed="true"] {
    border-color: var(--workspace-accent);
    box-shadow: inset 0 0 0 2px var(--workspace-accent);
}

.workspace-shot img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center top;
    background: #e2e8f0;
}

.workspace-shot span {
    display: block;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
}

.noscript-note {
    padding: 18px 26px 26px;
    color: var(--text-secondary);
}

/* ================================================================
   CTA Section
   ================================================================ */
.cta-section {
    background: linear-gradient(90deg, rgba(15,23,42,0.86), rgba(15,23,42,0.62));
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cta-section h2 {
    font-size: 2.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
}

.cta-section p {
    font-size: 1.08rem;
    color: #cbd5e1;
    margin-bottom: 34px;
    position: relative;
}

.cta-section .btn { position: relative; }
.cta-btn { font-size: 1.05rem; padding: 16px 34px; }

/* ================================================================
   Footer
   ================================================================ */
.footer {
    background: rgba(15,23,42,0.86);
    padding: 42px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    color: #94a3b8;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 22px;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover { color: #e2e8f0; }

/* ================================================================
   Animations
   ================================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { margin: 0 auto 36px; }
    .hero-actions { justify-content: center; }
    .hero-image { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .workspace-view {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .nav-links { display: none; }
    .container { padding: 0 18px; }
    section { padding: 62px 0; }
    .section-header h2 { font-size: 1.8rem; }
    .workspace-shots { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
    .footer-inner { align-items: flex-start; }
}

@media (max-width: 520px) {
    .container {
        width: 100%;
        max-width: 100vw;
    }
    .nav-inner { gap: 12px; }
    .nav-brand { font-size: 1rem; }
    .nav-cta {
        width: 40px;
        min-width: 40px;
        padding: 8px;
    }
    .nav-cta span { display: none; }
    .workspace-view { padding: 18px; }
    .workspace-media a { aspect-ratio: 4 / 3; }
    .cta-section h2 { font-size: 1.75rem; }
    .footer-links { gap: 14px; }
}

@media (max-width: 600px) {
    section { padding: 56px 0; }
    .hero { padding: 120px 0 64px; }
    .hero h1 { font-size: 2rem; }
    .section-header h2 { font-size: 1.75rem; }
    .cta-section h2 { font-size: 1.75rem; }
}

@media (max-width: 520px) {
    .hero h1 {
        max-width: 330px;
        margin-left: auto;
        margin-right: auto;
        font-size: 1.75rem;
    }
    .hero h1 .gradient { display: block; }
    .hero-sub { font-size: 1rem; }
    .section-header h2 {
        max-width: 330px;
        margin-left: auto;
        margin-right: auto;
        font-size: 1.45rem;
    }
    .section-header p {
        max-width: 330px;
    }
    .workspace-copy h3 { font-size: 1.15rem; }
}
