/* -- ProfWorkBench, LLC - Main Stylesheet -- */
:root {
    /* Base Colors */
    --bg-color: #121212;
    --bg-surface: #1a1a1a;
    --bg-elevated: #222222;

    /* Text Colors */
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;

    /* Brand Gradients */
    --overwrite-gradient: linear-gradient(135deg, #ff3b30, #ff2d55);
    --metawrite-gradient: linear-gradient(135deg, #5ac8fa, #007aff);
    --hexwrite-gradient: linear-gradient(135deg, #34c759, #30d158);

    --brand-blue: #0A84FF;

    /* Shadows for Neumorphism (Soft UI on Dark) */
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.8);
    --shadow-inset-light: inset 2px 2px 5px rgba(255, 255, 255, 0.03);
    --shadow-inset-dark: inset -2px -2px 5px rgba(0, 0, 0, 0.5);

    /* Glassmorphism */
    --glass-bg: rgba(26, 26, 26, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Dimensions & Spacing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --max-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* -- Utilities: Neumorphism & Glassmorphism -- */
.neumorphic {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.neumorphic-inset {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* -- Typography -- */
h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* -- Buttons -- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--brand-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(10, 132, 255, 0.3);
}

.btn-primary:hover {
    background: #0070e0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 132, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow:
        4px 4px 10px var(--shadow-dark),
        -4px -4px 10px var(--shadow-light);
}

.btn-secondary:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--glass-border);
}

.btn-full {
    width: 100%;
}

.btn-app-store {
    background: #000000;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-app-store:hover {
    background: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.btn-app-store i {
    font-size: 1.25rem;
}

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

.btn-app-store.large i {
    font-size: 1.5rem;
}

/* -- Navigation -- */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.glass-nav.scrolled {
    padding: 1rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    height: 64px;
    width: auto;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.brand-text {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--brand-blue);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* -- Hero Section -- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
}

.abstract-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--overwrite-gradient);
    top: 10%;
    right: 20%;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--metawrite-gradient);
    bottom: 10%;
    left: 10%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

.hero-preview {
    width: 380px;
    height: 240px;
    z-index: 2;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-bottom: auto;
}

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

.dot.close {
    background: #ff5f56;
}

.dot.minimize {
    background: #ffbd2e;
}

.dot.maximize {
    background: #27c93f;
}

.preview-content {
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
}

.apple-icon {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* -- Products Section -- */
.products-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.product-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--glass-border);
    transition: var(--transition-smooth);
}

.product-card.overwrite-theme::before {
    background: var(--overwrite-gradient);
}

.product-card.metawrite-theme::before {
    background: var(--metawrite-gradient);
    opacity: 0.5;
}

.product-card.hexwrite-theme::before {
    background: var(--hexwrite-gradient);
    opacity: 0.5;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-card.overwrite-theme:hover::before {
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.product-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.product-icon-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.metawrite-gradient {
    background: var(--metawrite-gradient);
}

.hexwrite-gradient {
    background: var(--hexwrite-gradient);
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-active {
    background: rgba(255, 59, 48, 0.15);
    color: #ff4d42;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.badge-upcoming {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.product-title {
    margin-bottom: 1rem;
}

.product-desc {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.feature-list {
    margin-bottom: 2.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-list i {
    color: #34c759;
    font-size: 0.85rem;
}

/* -- About Section / Footer -- */
.about-section {
    padding: 6rem 2rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.about-container {
    padding: 4rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-info p {
    margin-bottom: 0.5rem;
}

.footer-logo {
    height: 160px;
    margin-bottom: 2rem;
    opacity: 0.9;
    border-radius: 36px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.legal-links h3 {
    margin-bottom: 1rem;
}

.legal-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.legal-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* -- Modals -- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: var(--transition-smooth);
    /* Custom scrollbar */
}

.modal-container::-webkit-scrollbar {
    width: 8px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.large-modal {
    max-width: 1000px;
}

.document-modal {
    max-width: 800px;
    padding: 3rem;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Modal Internal Layouts */
.modal-header.overwrite-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 3rem;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(180deg, rgba(255, 59, 48, 0.05) 0%, transparent 100%);
}

.modal-product-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.modal-title-group h2 {
    margin-bottom: 0;
}

.modal-title-group .subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.screenshot-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    justify-content: flex-start;
}

.product-screenshot {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
}

.feature-checklist {
    margin: 1.5rem 0 2.5rem;
}

.feature-checklist li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.feature-checklist li::before {
    content: '•';
    color: #ff3b30;
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1;
    top: -2px;
}

.feature-checklist strong {
    color: var(--text-primary);
}

.pricing-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.pricing-card {
    flex: 1;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.pricing-card h5 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.pricing-card p {
    font-size: 0.875rem;
    margin: 0;
}

.pricing-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-card .period {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: normal;
    display: block;
    margin-top: 4px;
}

.pricing-card.free {
    border-top: 3px solid #8e8e93;
}

.pricing-card.pro {
    border-top: 3px solid #ff9500;
    background: linear-gradient(180deg, rgba(255, 149, 0, 0.05) 0%, transparent 100%);
}

.pricing-card.lifetime {
    border-top: 3px solid #ff2d55;
    background: linear-gradient(180deg, rgba(255, 45, 85, 0.05) 0%, transparent 100%);
}

.app-store-cta {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* Legal Modal Context */
.legal-content h2 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.document-text h3 {
    margin-top: 2rem;
}

.document-text h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.document-text h5 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.document-text p {
    margin-bottom: 1rem;
}

.document-text ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.document-text li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

/* -- Responsive Design -- */
@media (max-width: 900px) {
    .product-showcase {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

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

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .nav-links {
        display: none;
        /* simple mobile hide for now */
    }

    .about-container {
        flex-direction: column;
        padding: 2rem;
    }
}