/* ⚓️ Context Anchor (🤖 AI Instructions)
   Purpose: Medianoche Landing Page V3 Styling
   Aesthetic: Warm Minimal / Adult Modern
   Design: Theme-aware absolute-palette (#1B1C1D / #D47A08)
   Font: 'Outfit' (Premium Sans)
   Structure: Hero → Pillars (Read Later / Feed Reader / AI)
             → Privacy/BYOK → Features (8) → Integrations → Pricing → CTA
   Animation: Subtle, high-fidelity CSS-only motion
*/

:root {
    /* Colors - Dark palette (default) */
    --bg-primary: #1B1C1D;
    --bg-secondary: #222324;
    --bg-tertiary: #2a2b2c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-primary: #D9D9D9;
    --text-secondary: #a0a0b0;
    --text-tertiary: #606070;
    --border-color: rgba(255, 255, 255, 0.08);
    --accent: #D47A08; /* Exact Logo Orange */
    --accent-hover: #b45309;
    --accent-light: rgba(212, 122, 8, 0.1);
    --logo-invert: invert(1) brightness(0.9);

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

    /* Spacing */
    --nav-height: 72px;
    --section-padding: 80px;
    --container-max: 1000px;
}

/* Light Theme (Anthropic-inspired) */
[data-theme="light"] {
    --bg-primary: #FAFAFA;
    --bg-secondary: #F5F5F3; /* Slightly warmer/greyer */
    --bg-tertiary: #EFEFEB;
    --bg-card: #F5F5F3;      /* Explicit light grey for cards */
    --text-primary: #404040; /* Exact match for 75% opacity black */
    --text-secondary: #5A5A5A;
    --text-tertiary: #8A8A8A;
    --border-color: #E5E5E2;
    --accent: #D47A08;
    --accent-hover: #b45309;
    --accent-light: rgba(212, 122, 8, 0.1);
    --logo-invert: opacity(0.75);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.75rem 1rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 8px;
    text-decoration: none;
    z-index: 1000;
    transform: translateY(-200%);
    transition: transform 0.2s;
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 28px;
    width: auto;
    filter: var(--logo-invert);
}

/* Text Logo - Outfit */
.logo-text {
    font-family: var(--font-sans);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    /* No transform needed for Outfit */
}

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

/* Footer Text Logo */
.footer-brand .logo-text {
    font-size: 20px;
    display: block;
    margin-bottom: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.7;
    background: var(--accent);
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Icons */
.icon-sm {
    width: 16px;
    height: 16px;
}

/* Theme Toggle Icons */
#theme-toggle {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark mode: show moon (to switch to light), hide sun */
.theme-icon-light,
#theme-toggle .theme-icon-light,
#theme-toggle svg.theme-icon-light { display: none !important; }

.theme-icon-dark,
#theme-toggle .theme-icon-dark,
#theme-toggle svg.theme-icon-dark { display: block !important; }

/* Light mode: show sun (to switch to dark), hide moon */
[data-theme="light"] .theme-icon-light,
[data-theme="light"] #theme-toggle .theme-icon-light,
[data-theme="light"] #theme-toggle svg.theme-icon-light { display: block !important; }

[data-theme="light"] .theme-icon-dark,
[data-theme="light"] #theme-toggle .theme-icon-dark,
[data-theme="light"] #theme-toggle svg.theme-icon-dark { display: none !important; }

.icon-lg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

/* Hero Section */
.hero {
    padding-top: calc(var(--nav-height) + 72px);
    padding-bottom: 32px;
    text-align: center;
}

.hero-icon {
    display: block;
    width: 200px;
    height: 200px;
    margin: 0 auto 48px;
    filter: brightness(0.85);
}

[data-theme="light"] .hero-icon {
    filter: invert(1) opacity(0.75);
}

.hero-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.highlight-text {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Social Proof */
.social-proof {
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.proof-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.proof-logos {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.proof-item {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-tertiary);
    opacity: 0.7;
}

/* Three Pillars (Read Later / Feed Reader / AI) */
.value-prop {
    padding-top: 32px;
    padding-bottom: 64px;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pillar-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 28px 44px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.pillar-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.pillar-icon svg {
    width: 26px;
    height: 26px;
    color: var(--accent);
}

.pillar-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.pillar-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 280px;
    margin: 0 auto;
}

/* Privacy & BYOK Section */
.privacy-section {
    padding: 64px 0;
    background: var(--bg-tertiary);
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.privacy-card {
    padding: 40px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.privacy-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.privacy-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.privacy-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 14px;
}

.privacy-card > p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

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

.privacy-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.privacy-list li svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Features Section */
.features {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.feature-item {
    padding: 24px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.feature-item h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Testimonials */
.testimonials {
    padding: var(--section-padding) 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.testimonial-item {
    padding: 32px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.testimonial-author strong {
    font-size: 15px;
    font-weight: 600;
}

.testimonial-author span {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Integrations */
.integrations {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.integration-item {
    padding: 32px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.integration-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.integration-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.integration-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.integration-item p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* CTA Section */
/* Pricing */
.pricing {
    background: var(--bg-primary); /* Stand out from secondary bg */
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.pricing-card.pro-card {
    border: 2px solid var(--accent);
    background: linear-gradient(to bottom, var(--bg-card) 0%, rgba(217, 119, 6, 0.03) 100%);
    box-shadow: 0 8px 16px rgba(217, 119, 6, 0.1);
}

.pricing-card.pro-card:hover {
    box-shadow: 0 16px 32px rgba(217, 119, 6, 0.2);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.pricing-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.currency {
    font-size: 24px;
    margin-right: 4px;
    color: var(--text-secondary);
    font-weight: 500;
}

.period {
    font-size: 15px;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-left: 8px;
    letter-spacing: 0;
}

.plan-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-list {
    list-style: none;
    margin-bottom: 32px;
    flex-grow: 1; /* Pushes button to bottom */
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: left;
}

.feature-list li strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Disabled/Missing features style for Free plan comparison */
.feature-list li.disabled {
    opacity: 0.5;
    text-decoration: line-through; /* Optional: strike-through for emphasis */
}

.feature-list li svg {
    color: var(--accent);
    flex-shrink: 0;
}

.feature-list li.disabled svg {
    color: var(--text-tertiary);
}

/* Responsive Pricing */
@media (max-width: 768px) {
    .pricing-grid {
        flex-direction: column;
        max-width: 480px;
    }
}

/* CTA Section */
.cta {
    padding: var(--section-padding) 0;
    text-align: center;
}

.cta h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    height: 24px;
    margin-bottom: 16px;
    filter: var(--logo-invert);
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 64px;
}

.link-group h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: var(--text-tertiary);
}

.link-group a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.link-group a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Responsive - Pillars & Features (tablet) */
@media (max-width: 768px) {
    .pillars-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pillar-card {
        padding: 32px 24px;
    }
}

/* Tablet - 2 columns for features */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .feature-grid,
    .integration-grid,
    .testimonial-grid,
    .privacy-grid,
    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 48px;
    }

    .nav-links a:not(.btn) {
        display: none;
    }

    .proof-logos {
        gap: 24px;
    }


}


/* ===================================
   MINIMAL INTERACTIONS
   =================================== */

/* Global link reset */
a {
    color: inherit;
    text-decoration: none;
}

/* Button hover */
.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

/* ===================================
   DOWNLOAD SECTION
   =================================== */

.download-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 32px;
}

.other-platforms {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.other-platforms a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.other-platforms a:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-tertiary);
}

.other-platforms span {
    color: var(--text-tertiary);
    user-select: none;
}

.version-tag {
    font-size: 12px;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    letter-spacing: 0.02em;
}

#hero-download-group .version-tag {
    margin-top: 8px;
}
