/* Apexdev. - Neumorphism */

/* --- TEMA DARK (default) --- */
:root,
[data-theme="dark"] {
    --bg: #0d0f12;
    --surface: #16191d;
    --surface-raised: #1b1f24;
    --text: #e8eaed;
    --muted: #8a919b;
    --accent: #e63946;
    --accent-contrast: #ffffff;
    --green: #2ec46a;
    --green-contrast: #08130c;
    --border: rgba(255, 255, 255, 0.05);

    --shadow-dark: #05060a;
    --shadow-light: #252b31;
    --edge-light: rgba(255, 255, 255, 0.08);
    --edge-dark: rgba(0, 0, 0, 0.6);
    --surface-border: rgba(255, 255, 255, 0.05);

    --radius: 18px;
    --radius-sm: 10px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --- TEMA LIGHT --- */
[data-theme="light"] {
    --bg: #e4e8ee;
    --surface: #eef1f6;
    --surface-raised: #f5f7fa;
    --text: #1c2128;
    --muted: #5f6872;
    --accent: #c82f3d;
    --accent-contrast: #ffffff;
    --green: #1f9e55;
    --green-contrast: #ffffff;
    --border: rgba(20, 28, 38, 0.06);

    --shadow-dark: #c0c7d1;
    --shadow-light: #ffffff;
    --edge-light: rgba(255, 255, 255, 0.95);
    --edge-dark: rgba(20, 28, 38, 0.14);
    --surface-border: rgba(20, 28, 38, 0.05);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

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

::selection {
    background: var(--accent);
    color: var(--accent-contrast);
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* --- Neumorphic surface (raised) --- */
.neumorph {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow:
        6px 6px 14px var(--shadow-dark),
        -4px -4px 12px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 20px;
}

.logo {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.14em;
}
.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 28px;
    font-size: 0.9rem;
    color: var(--muted);
}
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

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

/* Theme toggle */
.theme-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    box-shadow:
        3px 3px 7px var(--shadow-dark),
        -3px -3px 7px var(--shadow-light),
        inset 0 1px 0 var(--edge-light);
    transition: color 0.25s, box-shadow 0.25s var(--ease), transform 0.2s var(--ease);
}
.theme-toggle:hover {
    color: var(--text);
    transform: translateY(-1px);
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light),
        inset 0 1px 0 var(--edge-light);
}
.theme-toggle:active {
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light),
        inset 0 1px 0 var(--edge-dark);
    transform: none;
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 19px;
    height: 19px;
    grid-area: 1 / 1;
    transition: opacity 0.25s, transform 0.3s var(--ease);
}
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0); }

/* BUTTONS (Neumorphic) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--surface-border);
    cursor: pointer;
    box-shadow:
        4px 4px 10px var(--shadow-dark),
        -3px -3px 8px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
    transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), color 0.25s, background 0.25s;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -4px -4px 10px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}
.btn:active {
    box-shadow:
        inset 5px 5px 10px var(--shadow-dark),
        inset -5px -5px 10px var(--shadow-light),
        inset 0 1px 0 var(--edge-dark);
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: color-mix(in srgb, var(--accent) 80%, transparent);
    box-shadow:
        4px 4px 10px var(--shadow-dark),
        -3px -3px 8px var(--shadow-light),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
    background: color-mix(in srgb, var(--accent) 88%, white);
    color: var(--accent-contrast);
}
.btn-primary:active {
    box-shadow:
        inset 5px 5px 10px rgba(0, 0, 0, 0.28),
        inset -5px -5px 10px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(0, 0, 0, 0.25);
}

.btn-ghost {
    background: transparent;
    box-shadow:
        inset 0 0 0 1.5px color-mix(in srgb, var(--text) 22%, transparent);
}
.btn-ghost:hover {
    background: var(--surface);
    box-shadow:
        4px 4px 10px var(--shadow-dark),
        -3px -3px 8px var(--shadow-light),
        inset 0 1px 0 var(--edge-light);
}

.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-lg { padding: 15px 40px; font-size: 1.05rem; }

/* HERO */
.hero {
    position: relative;
    padding: 132px 0 96px;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: -20% 0 auto;
    height: 520px;
    background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
    pointer-events: none;
}

.hero-content { position: relative; }

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
}

.hero-content p {
    max-width: 560px;
    margin: 0 auto 34px;
    color: var(--muted);
    font-size: 1.05rem;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 720px;
    margin: 72px auto 0;
}

.stat-item {
    padding: 28px 20px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow:
        5px 5px 12px var(--shadow-dark),
        -4px -4px 10px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.stat-item:hover {
    transform: translateY(-3px);
    box-shadow:
        7px 7px 15px var(--shadow-dark),
        -5px -5px 12px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}
.stat-item:active {
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light),
        inset 0 1px 0 var(--edge-dark);
    transform: none;
}

.stat-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.stat-item span { color: var(--muted); font-size: 0.85rem; }

/* SECTIONS */
.about, .focus, .access { padding: 96px 0; }

.section-subtitle {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 18px;
}

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
    align-items: center;
}

.about-text p { color: var(--muted); margin-top: 16px; }
.about-text p strong { color: var(--text); }

.quote-box {
    margin-top: 26px;
    padding: 22px 26px;
    border-left: 3px solid var(--accent);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-left-color: var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text);
    box-shadow:
        4px 4px 10px var(--shadow-dark),
        -3px -3px 8px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}

/* Badge "Powered by Jourstudio." - inner shadow, red accent, theme-aware border */
.badge {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.04em;
    box-shadow:
        inset 0 2px 4px var(--edge-dark);
    transition: box-shadow 0.25s var(--ease);
}
.badge:hover {
    box-shadow:
        inset 0 3px 6px var(--edge-dark);
}

.about-visual {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 420px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}
.about-visual .visual-core,
.about-visual .visual-ring {
    position: absolute;
    border-radius: 12px;
}
.about-visual .visual-core {
    width: 30%;
    aspect-ratio: 1;
    border: 2.5px solid var(--accent);
    transform: rotate(45deg);
    box-shadow:
        0 0 24px color-mix(in srgb, var(--accent) 30%, transparent),
        inset 0 0 12px color-mix(in srgb, var(--accent) 12%, transparent);
    animation: turn 16s linear infinite;
}
.about-visual .visual-ring {
    width: 52%;
    aspect-ratio: 1;
    border: 1.5px solid color-mix(in srgb, var(--text) 16%, transparent);
    transform: rotate(45deg);
    animation: turn 22s linear infinite reverse;
}

@keyframes turn {
    to { transform: rotate(405deg); }
}

/* --- Focus cards --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
    margin-top: 44px;
}

.card {
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow:
        5px 5px 12px var(--shadow-dark),
        -4px -4px 10px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s;
}
.card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 28%, var(--surface-border));
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -6px -6px 13px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}
.card:active {
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light),
        inset 0 1px 0 var(--edge-dark);
    transform: none;
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.card li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    margin-bottom: 10px;
    font-size: 0.94rem;
}
.card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* --- Access --- */
.access-box {
    position: relative;
    text-align: center;
    padding: 66px 40px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    box-shadow:
        6px 6px 14px var(--shadow-dark),
        -5px -5px 12px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}
.access-box h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
}
.access-box p {
    max-width: 560px;
    margin: 0 auto 32px;
    color: var(--muted);
}
.access-note {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Testimonial marquee (running right to left, looping) */
.testimonial-marquee {
    position: relative;
    margin-top: 44px;
    padding: 10px 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}
.marquee-group {
    display: flex;
    gap: 18px;
    padding-right: 18px;
}
.testimonial-card {
    width: min(320px, 78vw);
    flex: 0 0 auto;
    padding: 22px 24px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow:
        4px 4px 10px var(--shadow-dark),
        -3px -3px 8px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
}
.testimonial-card blockquote {
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 16px;
}
.testimonial-card figcaption {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}
.testimonial-card .avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 16%, var(--surface));
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.testimonial-marquee:hover .marquee-track { animation-play-state: paused; }

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 38px;
    background: var(--bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.footer-brand img {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--shadow-dark) 75%, transparent));
}
.footer-brand span {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
    display: block;
}
.footer-brand p { color: var(--muted); font-size: 0.85rem; }

.footer-col h5 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text);
    margin-bottom: 14px;
}
.footer-col ul { display: grid; gap: 8px; }
.footer-col a {
    font-size: 0.88rem;
    color: var(--muted);
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }

.copyright {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.active { opacity: 1; transform: none; }

/* SPLIT-SCREEN INTRO CURTAIN */
.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
    overflow: hidden;
}
.intro-half {
    position: relative;
    display: grid;
    place-items: center;
    padding: 60px 40px;
    background:
        radial-gradient(120% 90% at 50% 50%, var(--surface-raised), var(--bg) 78%);
    transition: transform 1.1s var(--ease);
    will-change: transform;
}
.intro-left { transform-origin: left center; box-shadow: inset -12px 0 16px -12px var(--shadow-dark); }
.intro-right { transform-origin: right center; box-shadow: inset 10px 0 16px -12px var(--shadow-dark); }

.intro-half::after {
    content: '';
    position: absolute;
    top: 8%;
    bottom: 8%;
    width: 1px;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 50%, transparent), transparent);
}
.intro-left::after { right: 0; }
.intro-right::after { left: 0; }

.intro-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 5;
}

.intro-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 168px;
    height: 168px;
    padding: 0;
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -6px -6px 14px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    animation: logoPulse 3s ease-in-out infinite;
}
.intro-logo img {
    width: 58%;
    height: 58%;
    object-fit: contain;
}
.intro-logo:hover {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow:
        10px 10px 20px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light),
        inset 0 1px 0 var(--edge-light),
        inset 0 -1px 0 var(--edge-dark),
        0 0 0 10px color-mix(in srgb, var(--accent) 8%, transparent);
}
.intro-logo:active {
    box-shadow:
        inset 7px 7px 14px var(--shadow-dark),
        inset -7px -7px 14px var(--shadow-light),
        inset 0 1px 0 var(--edge-dark);
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 8px 8px 16px var(--shadow-dark), -6px -6px 14px var(--shadow-light), inset 0 1px 0 var(--edge-light), inset 0 -1px 0 var(--edge-dark), 0 0 0 0 color-mix(in srgb, var(--accent) 20%, transparent); }
    50%      { box-shadow: 8px 8px 16px var(--shadow-dark), -6px -6px 14px var(--shadow-light), inset 0 1px 0 var(--edge-light), inset 0 -1px 0 var(--edge-dark), 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.intro-screen.is-open .intro-left { transform: translateX(-101%); }
.intro-screen.is-open .intro-right { transform: translateX(101%); }
.intro-screen.is-open .intro-logo {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
    animation: none;
    pointer-events: none;
}
.intro-screen.is-gone { display: none; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-visual { max-height: 340px; aspect-ratio: auto; height: 340px; order: -1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .nav-links { display: none; }
    .hero { padding: 88px 0 64px; }
    .hero-stats { grid-template-columns: 1fr; margin-top: 48px; }
    .about, .focus, .access { padding: 68px 0; }
    .access-box { padding: 48px 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .copyright { justify-content: center; text-align: center; }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .about-visual .visual-core,
    .about-visual .visual-ring { animation: none; }
    .btn, .card, .stat-item { transition: none; }
    .intro-half { transition: none; }
    .intro-logo { animation: none; transition: none; }
    .marquee-track { animation: none; }
    .testimonial-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
