/* ==========================================================================
   Popety.io Landing Page — Brand Tokens & Global Styles
   Colors: Dark Blue #132b3b, Light Blue #2babe3, Browns #6c3e42 #b3594f #b69082
   Font: Poppins (300 light, 400 regular, 500 medium, 600 semibold)
   ========================================================================== */

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

:root {
    --dark-blue: #132b3b;
    --light-blue: #2babe3;
    --light-blue-hover: #1e96cc;
    --dark-brown: #6c3e42;
    --medium-brown: #b3594f;
    --light-brown: #b69082;
    --white: #ffffff;
    --off-white: #f0e9e6;
    --gray-100: #f0e9e6;
    --gray-200: #e4eaee;
    --gray-300: #ccd5db;
    --gray-600: #5a6b77;
    --gray-700: #3d4f5c;
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 1px 3px rgba(19,43,59,0.08);
    --shadow-md: 0 4px 12px rgba(19,43,59,0.1);
    --shadow-lg: 0 8px 30px rgba(19,43,59,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.25s ease;
}

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

body {
    font-family: var(--font);
    font-weight: 300;
    color: var(--gray-700);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    background: var(--white);
}

h1, h2, h3, h4 { font-weight: 500; color: var(--dark-blue); line-height: 1.3; }

a { color: var(--light-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--light-blue-hover); }

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(19,43,59,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--light-blue);
    transition: background var(--transition);
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo img,
.nav-logo svg { display: block; height: 32px; width: auto; }

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

.nav-links a {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 400;
    transition: color var(--transition);
}

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

.nav-cta {
    background: var(--light-blue) !important;
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500 !important;
    transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--medium-brown) !important; }

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--dark-blue) 0%, #1a3a4f 50%, #0f2230 100%);
    color: var(--white);
    padding: 140px 24px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(43,171,227,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-container { max-width: 800px; margin: 0 auto; position: relative; }

.hero-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--light-blue);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.15;
}

.hero-title .highlight {
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 10px;
    background: rgba(182,144,130,0.3);
    border-radius: 4px;
    z-index: -1;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 300;
    color: rgba(255,255,255,0.75);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

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

/* ==========================================================================
   Key Metrics Bar
   ========================================================================== */

/* Hero DXF Viewer */
.hero-viewer {
    margin-top: 40px;
}
.hero-viewer .viewer-panel {
    display: block;
}
.hero-viewer .viewer-canvas-wrap {
    max-height: 520px;
    border: none;
    border-radius: 0;
    background: transparent;
}
@media (max-width: 768px) {
    .hero-viewer { margin-top: 24px; }
    .hero-viewer .viewer-canvas-wrap {
        max-height: 340px;
    }
}

.section-metrics {
    background: var(--dark-blue);
    border-top: 1px solid rgba(43,171,227,0.15);
    border-bottom: 1px solid rgba(43,171,227,0.15);
    padding: 28px 0;
}

.metrics-grid {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.metric-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--light-blue);
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 768px) {
    .metrics-grid {
        gap: 24px;
    }
    .metric-value {
        font-size: 20px;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--light-blue);
    color: var(--white);
    border-color: var(--light-blue);
}

.btn-primary:hover {
    background: var(--medium-brown);
    border-color: var(--medium-brown);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.35);
}

.btn-secondary:hover {
    border-color: var(--white);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

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

.btn-lg { padding: 14px 36px; font-size: 16px; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 80px 0; }

.section-gray { background: var(--off-white); }

.section-title {
    text-align: center;
    font-size: 34px;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--gray-600);
    max-width: 640px;
    margin: 0 auto 48px;
}

/* ==========================================================================
   Feature Cards
   ========================================================================== */

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

.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--light-brown);
}

.feature-icon {
    width: 48px;
    height: 48px;
    color: var(--light-blue);
    margin-bottom: 16px;
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-600);
}

/* ==========================================================================
   Format Cards
   ========================================================================== */

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

.format-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.format-header { margin-bottom: 12px; }

.format-ext {
    display: inline-block;
    background: var(--dark-brown);
    color: var(--white);
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.format-card h3 {
    font-size: 16px;
    margin-bottom: 0;
}

.format-card p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.format-software {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.format-software span {
    font-size: 11px;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 400;
}

/* ==========================================================================
   How It Works — Steps
   ========================================================================== */

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-bottom: 48px;
}

.step-card {
    flex: 0 1 280px;
    text-align: center;
    padding: 24px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--light-blue);
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.step-card h3 { font-size: 18px; margin-bottom: 10px; }
.step-card p { font-size: 14px; color: var(--gray-600); }

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--light-brown);
    margin-top: 46px;
    flex-shrink: 0;
}

/* Code Example */
.code-example {
    background: var(--dark-blue);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
}

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

.code-dot:nth-child(1) { background: #b3594f; }
.code-dot:nth-child(2) { background: #b69082; }
.code-dot:nth-child(3) { background: #6c3e42; }

.code-title {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-left: 8px;
}

.code-example pre {
    padding: 20px 24px;
    overflow-x: auto;
    margin: 0;
}

.code-example code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    white-space: pre;
}

.code-comment { color: rgba(43,171,227,0.6); }

/* ==========================================================================
   Audience Cards
   ========================================================================== */

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

.audience-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    border-top: 3px solid var(--medium-brown);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.audience-card h3 { font-size: 18px; margin-bottom: 10px; }
.audience-card p { font-size: 14px; color: var(--gray-600); line-height: 1.7; }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

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

.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--white);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-item summary {
    padding: 18px 24px;
    font-weight: 500;
    font-size: 15px;
    color: var(--dark-blue);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; content: ''; }

.faq-item summary::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: var(--medium-brown);
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item[open] {
    border-left: 3px solid var(--medium-brown);
}

.faq-answer {
    padding: 0 24px 18px;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */

.pricing-card {
    max-width: 520px;
    margin: 0 auto;
    background: var(--white);
    border: 2px solid var(--light-blue);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.pricing-price {
    font-size: 42px;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 4px;
    line-height: 1.2;
}

.pricing-price span {
    font-size: 18px;
    font-weight: 400;
    color: var(--gray-600);
}

.pricing-range {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 28px;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: 0 0 32px;
    padding: 0;
}

.pricing-features li {
    font-size: 14px;
    color: var(--gray-700);
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: '\2713';
    color: var(--light-blue);
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.pricing-cta {
    margin-bottom: 20px;
}

.pricing-upsell {
    font-size: 13px;
    color: var(--gray-600);
}

.pricing-upsell a {
    color: var(--light-blue);
    font-weight: 500;
}

@media (max-width: 768px) {
    .pricing-card {
        padding: 28px 24px;
    }
    .pricing-price {
        font-size: 34px;
    }
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.section-cta {
    background: linear-gradient(135deg, var(--dark-blue) 0%, #1a3a4f 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.section-cta h2 {
    color: var(--white);
    font-size: 32px;
    margin-bottom: 16px;
}

.section-cta p {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto 32px;
}

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

/* ==========================================================================
   Upsell / Need More
   ========================================================================== */

.section-upsell {
    background: var(--white);
    padding: 64px 0;
    text-align: center;
}

.upsell-box {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 32px;
    border: 1px solid rgba(43, 171, 227, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(43, 171, 227, 0.04) 0%, rgba(43, 171, 227, 0.01) 100%);
}

.upsell-box h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark-blue);
}

.upsell-box p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 24px;
}

.upsell-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.upsell-links a {
    color: var(--light-blue);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid rgba(43, 171, 227, 0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.upsell-links a:hover {
    background: rgba(43, 171, 227, 0.08);
    border-color: var(--light-blue);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--dark-blue);
    color: rgba(255,255,255,0.6);
    padding: 60px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(182,144,130,0.2);
}

.footer-brand img,
.footer-brand svg { display: block; height: 28px; width: auto; margin-bottom: 16px; }

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4 {
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin-bottom: 10px;
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--light-blue); }

.footer-bottom {
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
}

/* ==========================================================================
   Keyword Underline (brand accent)
   ========================================================================== */

.keyword {
    position: relative;
    display: inline;
}

.keyword::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(182,144,130,0.2);
    border-radius: 4px;
    z-index: -1;
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */

.nav-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.nav-lang a {
    color: rgba(255,255,255,0.5) !important;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    transition: color var(--transition), background var(--transition);
}

.nav-lang a:hover {
    color: var(--white) !important;
}

.nav-lang a.active {
    color: var(--white) !important;
    background: rgba(255,255,255,0.15);
}

/* ==========================================================================
   Download Examples
   ========================================================================== */

.download-examples {
    margin-top: 40px;
    text-align: center;
}

.download-examples-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.download-examples-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 28px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
    min-width: 140px;
}

.download-card:hover {
    border-color: var(--light-blue);
    background: rgba(43, 171, 227, 0.04);
    transform: translateY(-2px);
}

.download-icon {
    font-size: 20px;
    color: var(--light-blue);
}

.download-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-blue);
}

.download-ext {
    font-size: 12px;
    color: var(--gray-400);
}

/* ==========================================================================
   Animations
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .formats-grid { grid-template-columns: repeat(3, 1fr); }
    .audience-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--dark-blue);
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 16px;
        border-bottom: 2px solid var(--light-blue);
    }

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

    .nav-lang { margin-left: 0; }

    .hero { padding: 120px 24px 72px; }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }

    .section { padding: 56px 0; }
    .section-title { font-size: 26px; }

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

    .steps-grid { flex-direction: column; align-items: center; }
    .step-connector { width: 2px; height: 32px; margin: 0; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }

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

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