/* =============================================
   ClickFluent Landing Page
   Brand: Inter, dark navy, blue-to-indigo gradient
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e2e8f0;
    background: #0f172a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Utilities --- */

.gradient-text {
    background: linear-gradient(135deg, #2d89ef, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #60a5fa;
    margin-bottom: 0.75rem;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Buttons --- */

.btn {
    display: inline-block;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #2d89ef, #6366f1);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(45, 137, 239, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(45, 137, 239, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-ghost {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.btn-ghost:hover {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* --- Nav --- */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.logo-icon {
    width: auto;
    height: 36px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.3px;
}

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

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #f1f5f9;
}

.nav-cta {
    background: linear-gradient(135deg, #2d89ef, #6366f1);
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-weight: 600 !important;
    box-shadow: 0 2px 12px rgba(45, 137, 239, 0.25);
    transition: all 0.2s ease-in-out !important;
}

.nav-cta:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* --- Hero --- */

.hero {
    padding: 8rem 1.5rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(45, 137, 239, 0.12);
    color: #60a5fa;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(45, 137, 239, 0.2);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 480px;
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

/* Browser Frame */
.browser-frame {
    background: #1e293b;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.browser-dots {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.browser-dots span:first-child { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:nth-child(3) { background: #22c55e; }

.browser-frame img {
    width: 100%;
    display: block;
}

/* --- Demo Animation --- */

.demo-browser {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.demo-browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-dots {
    display: flex;
    gap: 6px;
}

.demo-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.demo-url {
    flex: 1;
    padding: 5px 12px;
    background: #0f172a;
    border-radius: 8px;
    font-size: 12px;
    color: #64748b;
    font-family: 'SF Mono', 'Menlo', monospace;
}

.demo-content {
    position: relative;
    padding: 24px 20px;
    background: #ffffff;
    min-height: 140px;
}

.demo-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.demo-text {
    font-size: 15px;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 14px;
    min-height: 26px;
}

.demo-line {
    height: 10px;
    width: 90%;
    background: #f1f5f9;
    border-radius: 4px;
    margin-bottom: 8px;
}

.demo-line-short {
    width: 65%;
}

/* Selection highlight */
.tr-selection {
    background: #bfdbfe;
    border-radius: 2px;
}

/* Shimmer effect */
.tr-shimmer {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Translated words */
.tr-word {
    padding: 1px 3px;
    border-radius: 2px;
    border-left: 2px solid;
    animation: fadeInWord 0.3s ease-out;
    font-weight: 500;
}

.tr-past {
    background: #DBEAFE;
    border-left-color: #3B82F6;
}

.tr-present {
    background: #DCFCE7;
    border-left-color: #22C55E;
}

.tr-future {
    background: #FEF3C7;
    border-left-color: #F59E0B;
}

@keyframes fadeInWord {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Floating toolbar */
.demo-toolbar {
    position: absolute;
    bottom: 20px;
    left: 20px;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.demo-toolbar.visible {
    opacity: 1;
    transform: translateY(0);
}

.demo-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #2d89ef, #6366f1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Step indicators */
.demo-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 14px;
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.35;
    transition: opacity 0.3s;
}

.demo-step.active {
    opacity: 1;
}

.demo-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: #475569;
    transition: background 0.3s;
}

.demo-step.active .demo-step-num {
    background: linear-gradient(135deg, #2d89ef, #6366f1);
}

.demo-step span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* Animated cursor */
.demo-cursor {
    position: absolute;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transition: top 0.5s ease-in-out, left 0.5s ease-in-out, opacity 0.2s ease;
    top: 0;
    left: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.demo-cursor.visible {
    opacity: 1;
}

/* Hover tooltip (matches real extension) */
.demo-tooltip {
    position: absolute;
    z-index: 10;
    max-width: 320px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    top: 0;
    left: 20px;
}

.demo-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.demo-tooltip-inner {
    background: #1f2937;
    color: #f9fafb;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.demo-tooltip-original {
    font-weight: 600;
    margin-bottom: 0;
}

.demo-tooltip-tense {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.demo-tooltip-tense.tt-past { background: #3B82F6; color: white; }
.demo-tooltip-tense.tt-present { background: #22C55E; color: white; }
.demo-tooltip-tense.tt-future { background: #F59E0B; color: white; }

.demo-tooltip-arrow {
    position: absolute;
    top: -5px;
    left: 16px;
    width: 10px;
    height: 10px;
    background: #1f2937;
    transform: rotate(45deg);
}

/* Tense legend */
.demo-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px 14px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.demo-legend-swatch {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    border-left: 2px solid;
}

.demo-legend-past {
    background: #DBEAFE;
    border-left-color: #3B82F6;
}

.demo-legend-present {
    background: #DCFCE7;
    border-left-color: #22C55E;
}

.demo-legend-future {
    background: #FEF3C7;
    border-left-color: #F59E0B;
}

/* --- Pain Section --- */

.pain {
    padding: 6rem 1.5rem;
    text-align: center;
}

.pain-inner {
    max-width: 750px;
    margin: 0 auto;
}

.pain-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ef4444;
    margin-bottom: 1rem;
}

.pain h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.5px;
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.pain-sub {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- How It Works --- */

.how-it-works {
    padding: 6rem 0;
}

.how-it-works h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 3.5rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 720px;
    margin: 0 auto;
}

.step {
    background: #1e293b;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2d89ef, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.step-image {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
}

.step-image img {
    width: 100%;
    display: block;
    object-fit: contain;
}

.step-image.placeholder span {
    display: none;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* Placeholder images */
.placeholder {
    background: #0f172a;
    border-radius: 10px;
}

.placeholder:not(:has(img)) {
    border: 2px dashed rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.placeholder span {
    color: #475569;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* --- Vocabulary Review Section --- */

.vocab-section {
    padding: 6rem 0;
}

.vocab-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 1rem;
}

.vocab-intro {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.7;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.vocab-cards {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.vocab-card {
    background: #1e293b;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.vocab-card:hover {
    border-color: rgba(45, 137, 239, 0.2);
    transform: translateY(-2px);
}

.vocab-card img {
    width: 100%;
    display: block;
}

.vocab-card-label {
    padding: 0.75rem 1.25rem 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #60a5fa;
}

.vocab-card p {
    padding: 0.5rem 1.25rem 1.25rem;
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
}

.vocab-arrow {
    font-size: 2rem;
    color: #475569;
    font-weight: 300;
}

@media (max-width: 900px) {
    .vocab-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: 1rem;
    }

    .vocab-arrow {
        transform: rotate(90deg);
        text-align: center;
    }
}

/* --- Simulated Immersion Section --- */

.tense-section {
    padding: 6rem 0;
}

.immersion-heading {
    font-size: 2.25rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.75px;
    text-align: center;
    margin-bottom: 1rem;
}

.immersion-intro {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.7;
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.immersion-pillars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 4rem;
}

.immersion-pillar {
    background: #1e293b;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem 1.75rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.immersion-pillar:hover {
    border-color: rgba(45, 137, 239, 0.2);
    transform: translateY(-2px);
}

.pillar-icon {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.immersion-pillar h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.immersion-pillar p {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* Inline tense tags */
.tense-legend-inline {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tense-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.tense-tag-past {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.tense-tag-present {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.tense-tag-future {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Research section */
.research-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 3rem;
}

.research-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #60a5fa;
    text-align: center;
    margin-bottom: 0.75rem;
}

.research-intro {
    font-size: 1rem;
    color: #94a3b8;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.research-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.research-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.research-card:hover {
    border-color: rgba(45, 137, 239, 0.25);
    transform: translateY(-1px);
}

.research-finding {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.4;
}

.research-source {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* --- Features Grid --- */

.features {
    padding: 6rem 0;
}

.features h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 3rem;
}

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

.feature-card {
    background: #1e293b;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem 1.5rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(45, 137, 239, 0.2);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* --- Final CTA --- */

.final-cta {
    padding: 6rem 0;
    text-align: center;
}

.final-cta h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.75px;
    margin-bottom: 1rem;
}

.final-cta p {
    font-size: 1.05rem;
    color: #64748b;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Footer --- */

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem 1.5rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon-sm {
    width: auto;
    height: 26px;
}

.logo-text-sm {
    font-size: 0.9rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: -0.3px;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.footer-copy {
    color: #475569;
    font-size: 0.8rem;
}

/* --- Responsive --- */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 7rem 1.5rem 3rem;
        text-align: center;
    }

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

    .hero-sub {
        margin: 0 auto 2rem;
    }

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

    .steps {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .immersion-pillars {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 3rem;
    }

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

    .demo-steps {
        gap: 12px;
    }

    .demo-step span {
        font-size: 11px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

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

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 901px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 2.75rem;
    }

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