/* ============================
   NANAMI 3D Scroll Experience
   Trading Theme — Premium Design
   ============================ */

/* --- Loading Screen --- */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a2e;
    letter-spacing: -0.05em;
    margin-bottom: 30px;
}

.loader-title span {
    color: #10B981;
}

.loader-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(16, 185, 129, 0.15);
    border-top: 3px solid #10B981;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

/* --- CSS Variables --- */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-dark: #0a0a0a;
    --text-primary: #111111;
    --text-secondary: #666666;
    --text-light: #f5f5f5;
    --text-muted: #999999;

    /* Trading Colors */
    --gold: #d4a012;
    --gold-light: #f5d060;
    --gold-dark: #9a7209;
    --emerald: #10b981;
    --emerald-dark: #059669;
    --deep-blue: #1a2942;
    --navy: #0f1a2e;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    --gradient-trading: linear-gradient(135deg, var(--gold), var(--emerald));
    --gradient-premium: linear-gradient(135deg, #d4a012, #f5d060, #10b981);

    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: default;
}

::selection {
    background: var(--gold);
    color: var(--bg-dark);
}

/* --- Loading Screen --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(212, 160, 18, 0.15);
    border-top-color: var(--gold);
    border-right-color: var(--emerald);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-family: var(--font-secondary);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 6px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.loader-sub {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* --- Navigation --- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.5s ease;
}

/* Nav transitions to dark when scrolled */
#nav.nav-dark {
    background: rgba(10, 10, 15, 0.85);
    border-bottom-color: rgba(212, 160, 18, 0.15);
}

#nav.nav-dark .nav-logo {
    color: var(--text-light);
}

#nav.nav-dark .nav-links a {
    color: rgba(255, 255, 255, 0.5);
}

#nav.nav-dark .nav-links a:hover {
    color: var(--gold-light);
}

.nav-logo {
    font-family: var(--font-secondary);
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--text-primary);
    transition: color 0.5s ease;
}

.nav-bold {
    font-weight: 700;
}

.nav-dot {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-family: var(--font-secondary);
}

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

.nav-btn {
    padding: 10px 24px;
    border-radius: 50px;
    background: var(--gradient-trading);
    color: var(--bg-dark);
    border: none;
    font-family: var(--font-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(212, 160, 18, 0.35);
}

/* --- Scroll Progress Bar --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-trading);
    z-index: 9999;
    transition: width 0.05s linear;
    box-shadow: 0 0 12px rgba(212, 160, 18, 0.5);
}

/* --- 3D Canvas Container --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#three-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Scroll Content (Over Canvas) --- */
#scroll-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

#scroll-content a,
#scroll-content button {
    pointer-events: auto;
}

/* --- Sections --- */
.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
}

.section-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* --- Text Blocks --- */
.text-block {
    max-width: 650px;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
    margin-left: auto;
}

.text-center {
    text-align: center;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-secondary);
    font-size: 13px;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* First section (hero area) has dark text */
#section-hero .section-title,
#section-hero .section-label {
    color: var(--text-primary);
}

/* About section — still on light-ish background, use dark text */
#section-about .section-title {
    font-family: 'Cairo', sans-serif;
    color: #1a1a2e;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

#section-about .section-label {
    color: var(--gold-dark);
}

.about-desc {
    font-family: 'Cairo', sans-serif;
    color: rgba(30, 30, 50, 0.75) !important;
    font-size: clamp(20px, 2.5vw, 26px) !important;
    font-weight: 500 !important;
    line-height: 2 !important;
    text-align: right;
    margin-left: auto;
}

/* --- Animated Candlesticks --- */
.candlesticks {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    margin: 30px 20px 0 auto;
    height: 120px;
    direction: ltr;
    width: 100%;
}

.candle {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: candleBounce 2.5s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.candle .wick,
.candle .wick-bottom {
    width: 2px;
    height: 12px;
    background: #2a2a3e;
    border-radius: 1px;
}

.candle .body {
    width: 18px;
    height: var(--height, 40px);
    border-radius: 3px;
    transition: height 0.5s ease;
}

.candle.green .body {
    background: #0fa67a;
    box-shadow: 0 0 10px rgba(15, 166, 122, 0.3);
}

.candle.green .wick,
.candle.green .wick-bottom {
    background: #0d8a65;
}

.candle.red .body {
    background: #e23636;
    box-shadow: 0 0 10px rgba(226, 54, 54, 0.3);
}

.candle.red .wick,
.candle.red .wick-bottom {
    background: #b52a2a;
}

@keyframes candleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(8px);
    }
}

/* Features section — Arabic styled */
.features-block .section-title {
    font-family: 'Cairo', sans-serif;
}

.features-badge {
    margin: 12px 0 8px;
}

.badge-text {
    display: inline-block;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-light);
    background: rgba(212, 160, 18, 0.15);
    border: 1px solid rgba(212, 160, 18, 0.3);
    border-radius: 50px;
    padding: 6px 20px;
}

.features-subtitle {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    color: var(--emerald);
    margin: 10px 0 16px;
}

.features-desc {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(18px, 2.2vw, 22px) !important;
    font-weight: 500 !important;
    line-height: 2.2 !important;
    color: rgba(30, 30, 50, 0.7) !important;
    text-align: right;
    margin-left: auto;
}

/* --- Trading Chart Animation --- */
.trading-chart {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 160px;
    margin: 35px 0 0 auto;
    padding: 15px 20px;
    overflow: hidden;
}

.chart-grid {
    position: absolute;
    inset: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-grid .grid-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.chart-candles {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    height: 100%;
    z-index: 2;
    direction: ltr;
}

.tc {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: chartPulse 3s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

.tc .tw {
    width: 1.5px;
    height: 8px;
    border-radius: 1px;
}

.tc .tb {
    width: 10px;
    height: var(--h, 30px);
    border-radius: 2px;
}

/* Cyan (bullish) candles */
.tc.cyan .tb {
    background: #00e6c8;
    box-shadow: 0 0 8px rgba(0, 230, 200, 0.4);
}
.tc.cyan .tw {
    background: #00b89e;
}

/* Magenta (bearish) candles */
.tc.magenta .tb {
    background: #e040a0;
    box-shadow: 0 0 8px rgba(224, 64, 160, 0.4);
}
.tc.magenta .tw {
    background: #b03080;
}

/* SVG Trend Line */
.chart-line {
    position: absolute;
    inset: 15px 20px;
    width: calc(100% - 40px);
    height: calc(100% - 30px);
    z-index: 1;
}

.trend-line {
    fill: none;
    stroke: rgba(0, 230, 200, 0.35);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawLine 3s ease forwards, glowLine 4s ease-in-out infinite 3s;
}

@keyframes chartPulse {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    70% { transform: translateY(4px); }
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes glowLine {
    0%, 100% { stroke: rgba(0, 230, 200, 0.35); }
    50% { stroke: rgba(0, 230, 200, 0.65); }
}

/* Skills section — Arabic styled */
.skills-title {
    font-family: 'Cairo', sans-serif;
}

/* --- Voice to Analysis Animation --- */
.voice-analysis {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 700px;
    height: 250px;
    margin: 20px auto 0;
    direction: ltr;
}

.va-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Phase 1: Microphone */
.va-mic {
    opacity: 0;
    transform-origin: 350px 60px;
    animation: micAppear 8s ease infinite;
}

@keyframes micAppear {
    0% { opacity: 0; transform: scale(0.5); }
    5% { opacity: 1; transform: scale(1); }
    20% { opacity: 1; transform: scale(1); }
    25% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 0; }
}

/* Phase 2: Sound Waves */
.wave {
    stroke: #22C55E;
    stroke-width: 4;
    stroke-linecap: round;
    opacity: 0;
    animation: waveAppear 8s ease infinite;
}

.w1 { animation-delay: 0.0s; }
.w2 { animation-delay: 0.08s; }
.w3 { animation-delay: 0.16s; }
.w4 { animation-delay: 0.24s; }
.w5 { animation-delay: 0.32s; }
.w6 { animation-delay: 0.32s; }
.w7 { animation-delay: 0.24s; }
.w8 { animation-delay: 0.16s; }
.w9 { animation-delay: 0.08s; }
.w10 { animation-delay: 0.0s; }

@keyframes waveAppear {
    0%, 12% { opacity: 0; }
    15% { opacity: 0; }
    20% { opacity: 1; }
    25% { opacity: 1; transform: scaleY(1); }
    28% { transform: scaleY(0.6); }
    31% { transform: scaleY(1.2); }
    34% { transform: scaleY(0.7); }
    37% { transform: scaleY(1.1); }
    40% { transform: scaleY(0.8); }
    43% { opacity: 1; transform: scaleY(1); }
    48% { opacity: 0; }
    100% { opacity: 0; }
}

/* Phase 3: Chart Line */
.va-chart {
    fill: none;
    stroke: #10B981;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: chartDraw 8s ease infinite;
}

@keyframes chartDraw {
    0%, 45% { stroke-dashoffset: 1200; opacity: 0; }
    50% { stroke-dashoffset: 1200; opacity: 1; }
    70% { stroke-dashoffset: 0; opacity: 1; }
    85% { stroke-dashoffset: 0; opacity: 1; }
    95% { opacity: 0; }
    100% { opacity: 0; stroke-dashoffset: 1200; }
}

/* Phase 4: Buy/Sell Signals */
.va-signal {
    opacity: 0;
    animation: signalPop 8s ease infinite;
}

.va-buy {
    animation-delay: 0s;
}

.va-sell {
    animation-delay: 0.4s;
}

@keyframes signalPop {
    0%, 68% { opacity: 0; transform: scale(0); }
    72% { opacity: 1; transform: scale(1.3); }
    75% { transform: scale(1); }
    78%, 82% { opacity: 1; transform: scale(1); }
    83% { transform: scale(1.15); }
    84% { transform: scale(1); }
    85% { opacity: 1; }
    92% { opacity: 0; }
    100% { opacity: 0; transform: scale(0); }
}

.va-buy circle {
    animation: pulseGreen 8s ease infinite;
}

.va-sell circle {
    animation: pulseRed 8s ease infinite;
    animation-delay: 0.4s;
}

@keyframes pulseGreen {
    0%, 68% { filter: none; }
    72%, 85% { filter: drop-shadow(0 0 6px rgba(22, 163, 74, 0.6)); }
    92% { filter: none; }
}

@keyframes pulseRed {
    0%, 68% { filter: none; }
    72%, 85% { filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6)); }
    92% { filter: none; }
}

/* Closing section — Arabic styled */
.closing-block {
    text-align: right;
    margin-left: auto;
    margin-right: 0;
    max-width: 400px;
    padding-top: calc(25vh + 300px);
}

.closing-title {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(28px, 3.5vw, 42px) !important;
    line-height: 1.3 !important;
}

.closing-desc {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(15px, 1.8vw, 19px) !important;
    font-weight: 500 !important;
    line-height: 2 !important;
    color: rgba(30, 30, 50, 0.7) !important;
    text-align: right;
    margin-top: 20px;
}

/* --- Road with Light Animation --- */
.road-animation {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 100px;
    margin: 30px 0 0 auto;
    perspective: 400px;
    z-index: 10;
    overflow: hidden;
}

.road {
    position: relative;
    width: 100%;
    height: 100%;
    transform: rotateX(50deg);
    transform-origin: center bottom;
}

/* Dashed road lines */
.road-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background: rgba(16, 185, 129, 0.25);
    border-radius: 2px;
    animation: roadLineMove 2s linear infinite;
}

.road-line:nth-child(1) { top: 0%; animation-delay: 0s; }
.road-line:nth-child(2) { top: 14%; animation-delay: 0.28s; }
.road-line:nth-child(3) { top: 28%; animation-delay: 0.56s; }
.road-line:nth-child(4) { top: 42%; animation-delay: 0.84s; }
.road-line:nth-child(5) { top: 56%; animation-delay: 1.12s; }
.road-line:nth-child(6) { top: 70%; animation-delay: 1.4s; }
.road-line:nth-child(7) { top: 84%; animation-delay: 1.68s; }

@keyframes roadLineMove {
    0% {
        opacity: 0;
        transform: translateX(-50%) scaleX(0.3);
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scaleX(1.8) translateY(20px);
    }
}

/* Light orb */
.light-orb {
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.8),
                0 0 40px rgba(16, 185, 129, 0.4),
                0 0 60px rgba(16, 185, 129, 0.2);
    transform: translateX(-50%);
    animation: orbMove 3s ease-in-out infinite;
    z-index: 5;
}

@keyframes orbMove {
    0% {
        top: 90%;
        opacity: 0;
        width: 16px;
        height: 16px;
    }
    10% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        top: -10%;
        opacity: 0;
        width: 6px;
        height: 6px;
    }
}

/* Light trail behind orb */
.light-trail {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: linear-gradient(to top, transparent, rgba(16, 185, 129, 0.5), transparent);
    animation: trailMove 3s ease-in-out infinite;
    z-index: 4;
}

@keyframes trailMove {
    0% {
        top: 90%;
        opacity: 0;
        height: 30px;
    }
    10% {
        opacity: 0.7;
    }
    80% {
        opacity: 0.5;
    }
    100% {
        top: -10%;
        opacity: 0;
        height: 80px;
    }
}

/* Ambient glow at the end of road */
.light-glow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 30px;
    background: radial-gradient(ellipse, rgba(16, 185, 129, 0.3), transparent);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
    z-index: 3;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.2); }
}

/* Sections text — dark text on white background */
#section-features .section-title,
#section-skills .section-title,
#section-closing .section-title {
    color: #1a1a2e;
    text-shadow: none;
}

#section-features .section-label,
#section-skills .section-label,
#section-closing .section-label {
    color: var(--gold-dark);
}

.large-title {
    font-size: clamp(48px, 7vw, 90px);
}

.section-desc {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(30, 30, 50, 0.6);
    font-weight: 300;
    max-width: 500px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.center-content {
    display: flex;
    justify-content: center;
}

.center-desc {
    margin: 0 auto;
}

/* --- Visible State (GSAP triggers) --- */
.section.is-visible .section-label {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

.section.is-visible .section-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.section.is-visible .section-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* --- Gradient Text --- */
.gradient-text {
    background: var(--gradient-premium);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Hero Section --- */
#section-hero {
    flex-direction: column;
    justify-content: center;
}

.hero-content {
    width: 100%;
    position: relative;
}

/* --- KFOO BOT AI Hero Title --- */
.kfoo-hero-title {
    position: absolute;
    top: calc(20% - 125px);
    left: 30%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kfoo-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.05em;
    line-height: 1.25;
    color: #1a1a2e;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.kfoo-highlight {
    color: #00e676;
    text-shadow: 0 0 20px rgba(0, 230, 118, 0.5);
}

/* When in dark sections, switch to light text */
.nav-dark ~ #scroll-content .kfoo-title {
    color: #e8eaf6;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.kfoo-logo {
    display: block;
    width: 120px;
    height: auto;
    margin: 15px auto 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    transition: filter 0.5s ease;
}

.nav-dark ~ #scroll-content .kfoo-logo {
    filter: drop-shadow(0 2px 12px rgba(0, 230, 118, 0.3));
}

/* --- Ambient Glow Effects --- */
.section::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

#section-about::before {
    background: radial-gradient(circle, rgba(212, 160, 18, 0.2), transparent);
    left: -100px;
    top: 30%;
}

#section-features::before {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent);
    right: -100px;
    top: 30%;
}

#section-skills::before {
    background: radial-gradient(circle, rgba(212, 160, 18, 0.15), transparent);
    left: -100px;
    top: 30%;
}

#section-closing::before {
    background: radial-gradient(circle, rgba(245, 208, 96, 0.15), rgba(16, 185, 129, 0.1), transparent);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
}

.section.is-visible::before {
    opacity: 0.7;
}
/* --- Responsive --- */

/* Tablet (iPad) */
@media (max-width: 1024px) {
    .section-inner {
        padding: 0 40px;
    }

    .kfoo-hero-title {
        left: 25%;
    }

    .kfoo-title {
        font-size: 2.5rem;
    }

    .kfoo-logo {
        width: 100px;
    }

    .section-title {
        font-size: clamp(28px, 4.5vw, 52px);
    }

    .large-title {
        font-size: clamp(36px, 6vw, 70px);
    }

    .features-subtitle {
        font-size: clamp(20px, 2.5vw, 28px);
    }

    /* Closing section - reduce padding on tablet */
    .closing-block {
        padding-top: calc(20vh + 100px) !important;
        max-width: 350px !important;
    }

    /* Trading chart smaller */
    .trading-chart {
        max-width: 400px;
        height: 130px;
    }

    /* Voice analysis smaller */
    .voice-analysis {
        max-width: 500px;
        height: 200px;
    }
}

/* Mobile Landscape & Small Tablets */
@media (max-width: 768px) {
    /* Sections: text at top, character below */
    .section {
        align-items: flex-start;
        padding-top: 80px;
    }

    .text-block {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .text-right[dir="rtl"] .section-title,
    .text-right[dir="rtl"] .section-desc {
        text-align: center;
    }

    #nav {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .nav-btn {
        padding: 8px 18px;
        font-size: 11px;
        letter-spacing: 2px;
    }

    .section-inner {
        padding: 0 24px;
    }

    /* RTL text stays right-aligned */
    .text-right[dir="rtl"] {
        text-align: right;
    }

    .text-right:not([dir="rtl"]) {
        text-align: left;
        margin-left: 0;
    }

    .text-block {
        max-width: 100%;
    }

    .section-title {
        font-size: clamp(26px, 5vw, 40px);
    }

    .large-title {
        font-size: clamp(32px, 6vw, 50px);
    }

    /* Hero KFOO Title */
    .kfoo-hero-title {
        left: 50%;
        top: calc(var(--nav-height) + 15px);
    }

    .kfoo-title {
        font-size: 2rem;
    }

    .kfoo-logo {
        width: 80px;
        margin-top: 10px;
    }

    /* About section */
    .about-desc {
        font-size: clamp(16px, 3vw, 20px) !important;
    }

    /* Features section */
    .features-subtitle {
        font-size: clamp(18px, 3.5vw, 24px);
    }

    .features-desc {
        font-size: clamp(15px, 2.5vw, 18px) !important;
    }

    /* Closing section */
    .closing-block {
        padding-top: 20px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .closing-title {
        font-size: clamp(22px, 5vw, 32px) !important;
    }

    .closing-desc {
        font-size: clamp(13px, 2.5vw, 17px) !important;
        margin-top: 10px !important;
    }

    /* Trading chart */
    .trading-chart {
        max-width: 320px;
        height: 110px;
    }

    .tc .tb {
        width: 7px;
    }

    /* Voice analysis */
    .voice-analysis {
        max-width: 100%;
        height: 160px;
    }

    /* Candlesticks */
    .candlesticks {
        margin-right: 0 !important;
    }

    /* Ambient glow — smaller on mobile */
    .section::before {
        width: 250px;
        height: 250px;
    }

    #section-closing::before {
        width: 350px;
        height: 350px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    :root {
        --nav-height: 60px;
    }

    #nav {
        padding: 0 16px;
    }

    .nav-logo {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .nav-btn {
        padding: 7px 14px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .section-inner {
        padding: 0 16px;
    }

    .section-title {
        font-size: clamp(22px, 6vw, 32px);
        margin-bottom: 16px;
    }

    .large-title {
        font-size: clamp(28px, 7vw, 42px);
    }

    /* Hero KFOO Title */
    .kfoo-hero-title {
        top: calc(var(--nav-height) + 10px);
    }

    .kfoo-title {
        font-size: 1.5rem;
    }

    .kfoo-logo {
        width: 60px;
        margin-top: 8px;
    }

    /* About */
    #section-about .section-title {
        font-size: clamp(22px, 6vw, 32px);
    }

    .about-desc {
        font-size: clamp(14px, 3.5vw, 18px) !important;
        line-height: 1.8 !important;
    }

    /* Features */
    .features-subtitle {
        font-size: clamp(16px, 4vw, 22px);
        margin: 8px 0 12px;
    }

    .features-desc {
        font-size: clamp(13px, 3vw, 16px) !important;
        line-height: 1.9 !important;
    }

    /* Skills */
    .skills-title {
        font-size: clamp(22px, 6vw, 32px);
    }

    /* Closing */
    .closing-block {
        padding-top: 10px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .closing-title {
        font-size: clamp(18px, 5vw, 26px) !important;
        line-height: 1.4 !important;
    }

    .closing-desc {
        font-size: clamp(12px, 3vw, 15px) !important;
        line-height: 1.8 !important;
        margin-top: 8px !important;
    }

    /* Trading chart - phone size */
    .trading-chart {
        max-width: 250px;
        height: 90px;
        padding: 8px 10px;
    }

    .tc .tb {
        width: 5px;
    }

    .tc .tw {
        height: 5px;
    }

    /* Voice analysis - phone size */
    .voice-analysis {
        max-width: 100%;
        height: 120px;
    }

    /* Candlesticks smaller */
    .candlesticks {
        margin-right: 0 !important;
        height: 80px;
    }

    .candle .body {
        width: 8px;
    }

    /* Scroll progress thinner */
    #scroll-progress {
        height: 2px;
    }

    /* Ambient glow — smaller */
    .section::before {
        width: 180px;
        height: 180px;
        filter: blur(80px);
    }

    #section-closing::before {
        width: 250px;
        height: 250px;
    }
}
