/* ============================================
   Proapplis — Award Edition v3
   ============================================ */

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

/* ---- TOKENS ---- */
:root {
    --c: #10B981;
    --c-light: #34D399;
    --c-50: #ECFDF5;
    --c-100: #D1FAE5;
    --c-600: #059669;
    --text: #0F172A;
    --text-2: #475569;
    --text-3: #94A3B8;
    --bg: #F4F6F8;
    --bg-card: #FFFFFF;
    --bg-alt: #EDF0F4;
    --border: rgba(0,0,0,0.13);
    --shadow: 0 2px 12px rgba(0,0,0,0.09), 0 0 0 1px rgba(0,0,0,0.04);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.13);
    --r: 16px;
    --ease: cubic-bezier(.4,0,.2,1);
    --ease-out: cubic-bezier(0,.6,.4,1);
    color-scheme: light;
}

[data-theme="dark"] {
    --c: #34D399;
    --c-light: #6EE7B7;
    --c-50: rgba(52,211,153,0.06);
    --c-100: rgba(52,211,153,0.12);
    --c-600: #6EE7B7;
    --text: #F1F5F9;
    --text-2: #94A3B8;
    --text-3: #64748B;
    --bg: #0B1121;
    --bg-card: #131C2E;
    --bg-alt: #0F1729;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.3);
    color-scheme: dark;
}

/* ---- BASE ---- */
html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background .5s var(--ease), color .5s var(--ease);
}

::selection { background: var(--c); color: #fff; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

section { padding: 120px 0; }

h1, h2, h3, h4 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

h2 { font-size: clamp(2rem, 4vw, 2.8rem); text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-2); max-width: 540px; line-height: 1.7; }
a { color: inherit; text-decoration: none; }

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

/* ---- SCROLL PROGRESS ---- */
.scroll-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--c), var(--c-light));
    z-index: 200;
    transition: width .05s linear;
    pointer-events: none;
}

/* ---- NAVBAR ---- */
.navbar {
    position: fixed; top: 3px; left: 0; right: 0; z-index: 100;
    transition: background .5s var(--ease), border-color .3s, box-shadow .3s;
}

.navbar::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--bg);
    opacity: 0;
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    transition: opacity .3s;
    z-index: -1;
}

.navbar.scrolled::before { opacity: .85; }
.navbar.scrolled { border-bottom: 1px solid var(--border); }

.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 72px;
}

.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-links {
    display: flex; align-items: center; gap: 4px;
    list-style: none;
}

.nav-links a {
    padding: 8px 18px;
    font-size: .875rem; font-weight: 500;
    color: var(--text-2);
    border-radius: 99px;
    transition: color .2s, background .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--c); background: var(--c-50); }

.nav-cta {
    background: var(--c) !important; color: #fff !important;
    font-weight: 600 !important;
}
.nav-cta:hover { background: var(--c-600) !important; }
.nav-cta.active { background: var(--c) !important; }

/* Toggle */
.theme-toggle {
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.08); border: 1.5px solid rgba(0,0,0,0.12);
    padding: 0; cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    transition: background .2s var(--ease), border-color .2s var(--ease);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}

.theme-toggle:hover { background: var(--c-100); border-color: var(--c); }

.toggle-track { display: none; }

.theme-toggle .toggle-icon-btn {
    width: 20px; height: 20px;
    color: var(--text);
    transition: color .3s var(--ease), transform .3s var(--ease);
    pointer-events: none;
}

.theme-toggle:hover .toggle-icon-btn { color: var(--c); }
.theme-toggle:active .toggle-icon-btn { transform: scale(.85); }

.icon-sun-btn { display: block; }
.icon-moon-btn { display: none; }
[data-theme="dark"] .icon-sun-btn { display: none; }
[data-theme="dark"] .icon-moon-btn { display: block; }

/* Mobile menu */
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: 6px; width: 36px; height: 36px;
    flex-direction: column; justify-content: center; gap: 5px;
}

.menu-toggle span {
    display: block; width: 20px; height: 1.5px;
    background: var(--text); border-radius: 2px;
    transition: transform .3s, opacity .3s;
    transform-origin: center;
}

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

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px; border-radius: 12px;
    font-weight: 600; font-size: .95rem; font-family: inherit;
    border: none; cursor: pointer;
    transition: all .3s var(--ease);
    text-decoration: none; position: relative; overflow: hidden;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary { background: var(--c); color: #fff; }

.btn-primary::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    transition: left .5s var(--ease);
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:hover {
    background: var(--c-600);
    box-shadow: 0 8px 24px rgba(16,185,129,.25);
    transform: translateY(-2px);
}

.btn-lg { padding: 18px 36px; font-size: 1rem; border-radius: 14px; }

/* ---- HERO ---- */
.hero {
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding-top: 72px;
    position: relative; overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -30%; left: 50%; transform: translateX(-50%);
    width: 1000px; height: 700px;
    background: radial-gradient(ellipse, var(--c-50) 0%, transparent 70%);
    pointer-events: none;
    opacity: .5;
    transition: opacity .5s;
}

[data-theme="dark"] .hero-glow {
    background: radial-gradient(ellipse, rgba(52,211,153,.06) 0%, transparent 70%);
}

.hero-content {
    position: relative; z-index: 1;
    max-width: 880px; padding: 0 24px;
}

/* Hero Mark */
.hero-mark {
    margin-bottom: 36px;
    color: var(--c);
    display: flex; justify-content: center;
}

.hero-mark svg {
    width: 80px; height: 80px;
    filter: drop-shadow(0 4px 24px rgba(16,185,129,.18));
    transition: color .5s var(--ease), filter .5s var(--ease);
}

[data-theme="dark"] .hero-mark svg {
    filter: drop-shadow(0 4px 32px rgba(52,211,153,.15));
}

.hero-eyebrow {
    display: inline-block;
    padding: 6px 18px;
    background: var(--c-100);
    color: var(--c);
    border-radius: 99px;
    font-size: .8rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
    margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(2.8rem, 5.8vw, 4.2rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    word-spacing: 0.12em;
    margin-bottom: 28px;
    color: var(--text);
}

.hero-title em {
    font-style: normal;
    color: var(--c);
    text-decoration: underline;
    text-decoration-color: var(--c-light);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
    text-decoration-skip-ink: none;
}

.hero-title .anim-line { display: block; overflow: hidden; }

.hero-title .anim-line > span {
    display: block;
    transform: translateY(110%);
    transition: transform .8s var(--ease-out);
}

.hero-title.visible .anim-line > span { transform: none; }
.hero-title.visible .anim-line:nth-child(2) > span { transition-delay: .1s; }

.hero-sub {
    font-size: 1.2rem; line-height: 1.75;
    color: var(--text-2);
    max-width: 560px; margin: 0 auto 40px;
}

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

.hero-cta-sub {
    display: block;
    margin-top: 16px;
    font-size: .85rem;
    color: var(--text-3);
    font-weight: 500;
}

/* Scroll hint */
.scroll-hint {
    position: absolute; bottom: 70px; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: scrollBounce 2s var(--ease) infinite;
}

.scroll-hint svg {
    width: 24px; height: 24px;
    color: var(--text-3);
    opacity: .5;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* Hero animations */
.anim-in {
    opacity: 0; transform: translateY(20px);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.anim-in.visible { opacity: 1; transform: none; }
.anim-delay-1 { transition-delay: .1s; }
.anim-delay-2 { transition-delay: .2s; }
.anim-delay-3 { transition-delay: .35s; }

/* Marquee */
.marquee {
    position: absolute; bottom: 0; left: 0; right: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
    padding: 14px 0;
}

.marquee-inner {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.marquee-track {
    display: flex; align-items: center;
    gap: 40px; white-space: nowrap;
    padding-right: 40px;
    flex-shrink: 0;
}

.marquee-track span {
    font-size: .82rem; font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase; letter-spacing: .06em;
}

.marquee-dot {
    display: inline-block; width: 4px; height: 4px;
    background: var(--c); border-radius: 50%;
    flex-shrink: 0;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- NUMBERS STRIP ---- */
.numbers-strip {
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.numbers-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
}

.number-item { text-align: center; }

.number-value {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--c);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
}

.number-label {
    font-size: .85rem;
    color: var(--text-2);
    font-weight: 500;
}

/* ---- SECTION COMMON ---- */
.section-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--c-100); color: var(--c);
    border-radius: 6px;
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: 20px;
}

.section-intro { margin-bottom: 72px; }
.section-intro h2 { margin-bottom: 20px; }

.section-desc {
    font-size: 1.05rem;
    color: var(--text-2);
}

/* ---- SERVICES ---- */
.services { background: var(--bg-alt); }

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 40px 32px;
    position: relative;
    box-shadow: var(--shadow);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}

.card::before {
    content: '';
    position: absolute; inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--c) 0%, var(--c-light) 50%, transparent 70%);
    opacity: 0;
    transition: opacity .4s;
    z-index: -1;
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card:hover { border-color: transparent; }

[data-theme="dark"] .card {
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.03);
}

.card-number {
    display: block;
    font-size: .72rem; font-weight: 800; letter-spacing: .1em;
    color: var(--c); opacity: .5;
    margin-bottom: 20px;
}

.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--c-50);
    display: flex; align-items: center; justify-content: center;
    color: var(--c); margin-bottom: 20px;
    transition: background .3s, color .3s, transform .3s;
}

.card:hover .card-icon { background: var(--c); color: #fff; transform: scale(1.05); }

.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .9rem; line-height: 1.7; }

.card-example {
    font-size: .82rem;
    color: var(--c);
    margin-top: 10px;
    opacity: .8;
}

.card-example em { font-style: italic; }

.card-tags {
    display: flex; flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.card-tags span {
    font-size: .72rem; font-weight: 600;
    color: var(--c);
    background: var(--c-50);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: .02em;
}

/* ---- ABOUT ---- */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.about-left h2 { margin-bottom: 24px; }

.about-photo {
    width: 100px; height: 100px;
    object-fit: contain;
    margin-bottom: 28px;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.about-left p { margin-bottom: 16px; }
.about-left p:last-child { margin-bottom: 0; }

.about-right { display: flex; flex-direction: column; gap: 16px; }

.value {
    display: flex; gap: 20px;
    padding: 24px;
    border-radius: var(--r);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    box-shadow: var(--shadow);
    transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}

.value:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-left-color: var(--c);
}

[data-theme="dark"] .value { background: var(--bg-card); }

.value-marker {
    font-size: .72rem; font-weight: 800; letter-spacing: .1em;
    color: var(--c); opacity: .6;
    padding-top: 2px; flex-shrink: 0;
    width: 28px;
}

.value h4 { margin-bottom: 6px; }
.value p { font-size: .88rem; }

/* ---- CONTACT ---- */
.contact { background: var(--bg-alt); }

.contact-block { max-width: 600px; margin: 0 auto; }

.contact-header { text-align: center; margin-bottom: 32px; }
.contact-header h2 { margin-bottom: 12px; }
.contact-header p { margin: 0 auto; font-size: 1.05rem; }

.contact-badges {
    display: flex; justify-content: center;
    gap: 24px; margin-bottom: 32px; flex-wrap: wrap;
}

.contact-badge {
    display: flex; align-items: center; gap: 8px;
    font-size: .82rem; font-weight: 600; color: var(--c);
}

.contact-badge svg { width: 16px; height: 16px; }

.form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 40px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field { margin-bottom: 16px; }

.form-field label {
    display: block; font-size: .82rem; font-weight: 600;
    margin-bottom: 6px; color: var(--text);
}

.form-field input,
.form-field textarea {
    width: 100%; padding: 13px 16px;
    border: 1.5px solid #B0BEC5; border-radius: 10px;
    font-family: inherit; font-size: .92rem;
    color: var(--text); background: var(--bg);
    outline: none;
    transition: border-color .25s, box-shadow .25s, background .3s;
}

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field textarea {
    border-color: var(--border);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--c);
    box-shadow: 0 0 0 4px var(--c-50);
}

.form-field input.valid { border-color: var(--c); }
.form-field input.invalid,
.form-field textarea.invalid { border-color: #EF4444; }

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-3); }

.form-field textarea { min-height: 130px; resize: vertical; }

.form-submit { width: 100%; margin-top: 8px; justify-content: center; }

.form-status {
    margin-top: 16px; padding: 14px 18px;
    border-radius: 10px; font-size: .88rem; font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background: var(--c-50); color: var(--c);
    border: 1px solid var(--c-100);
}

.form-status.error {
    display: block;
    background: rgba(239,68,68,.06); color: #EF4444;
    border: 1px solid rgba(239,68,68,.12);
}

/* ---- FOOTER ---- */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
}

.footer-logo {
    height: 22px; opacity: .4;
    transition: filter .5s, opacity .3s;
}

.footer-logo:hover { opacity: .7; }
[data-theme="dark"] .footer-logo { filter: brightness(0) invert(1); }

.footer-nav { display: flex; gap: 28px; }

.footer-nav a {
    font-size: .82rem; color: var(--text-3);
    transition: color .2s;
}
.footer-nav a:hover { color: var(--c); }

.footer-end { text-align: right; }

.footer-tagline {
    display: block;
    font-size: .75rem; color: var(--text-3);
    margin-bottom: 4px;
}

.footer-copy { font-size: .75rem; color: var(--text-3); }

.footer-legal {
    font-size: .75rem;
    color: var(--text-3);
    text-decoration: none;
}
.footer-legal:hover { color: var(--accent); text-decoration: underline; }

/* ---- REVEAL ---- */
.reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.reveal.visible { opacity: 1; transform: none; }

/* Stagger */
.services-grid .reveal:nth-child(2) { transition-delay: .1s; }
.services-grid .reveal:nth-child(3) { transition-delay: .2s; }
.about-right .reveal:nth-child(2) { transition-delay: .12s; }
.about-right .reveal:nth-child(3) { transition-delay: .24s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .about-layout { gap: 60px; }
}

@media (max-width: 768px) {
    section { padding: 100px 0; }
    .container { padding: 0 20px; }

    .nav-links {
        display: none;
        position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
        background: var(--bg);
        flex-direction: column; align-items: center; justify-content: center;
        gap: 16px; z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a {
        font-size: 1.3rem; padding: 18px 32px;
        display: block; width: 100%;
        border-radius: 12px;
    }
    .nav-links .nav-cta {
        max-width: 260px; margin: 8px auto 0;
        border-radius: 14px; padding: 16px 32px;
    }
    .menu-toggle { display: flex; }

    .numbers-grid { gap: 40px; }

    .services-grid { grid-template-columns: 1fr; gap: 16px; }

    .about-layout { grid-template-columns: 1fr; gap: 48px; }

    .form-row { grid-template-columns: 1fr; }
    .form { padding: 28px 20px; }

    .footer-inner {
        flex-direction: column; gap: 20px; text-align: center;
    }
    .footer-end { text-align: center; }
    .footer-nav { flex-wrap: wrap; justify-content: center; gap: 20px; }

    .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-title { font-size: clamp(1.8rem, 9vw, 2.4rem); }
    .hero-sub { font-size: 1rem; }
    .numbers-grid { flex-direction: column; gap: 24px; }
    .card { padding: 28px 20px; }
    .contact-badges { flex-direction: column; align-items: center; gap: 12px; }
    .section-tag { font-size: .7rem; }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .marquee-inner { animation: none; }
    .scroll-hint { animation: none; }
}

/* ---- SPINNER ---- */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .7s linear infinite; }
