/* ================================================================
   SAVVYSAVE — GLOBAL DESIGN SYSTEM
   Tema: Hitam / Putih / Merah — profesional, minim, presisi.
================================================================ */

:root {
    --bg: #060607;
    --bg-alt: #0a0a0b;
    --panel: #121214;
    --panel-2: #0d0d0f;
    --line: #232326;
    --line-soft: rgba(255,255,255,0.07);
    --white: #f7f7f9;
    --muted: #9a9aa1;
    --muted-2: #5c5c63;
    --red: #e8202f;
    --red-dark: #a3121e;
    --red-dim: rgba(232,32,47,0.12);
    --red-glow: rgba(232,32,47,0.4);

    --r-xl: 26px;
    --r-lg: 20px;
    --r-md: 14px;
    --r-sm: 10px;

    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --nav-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--white);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding-top: var(--nav-h);
}

/* subtle engineering grid texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 78%);
}
body::after {
    content: '';
    position: fixed;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(closest-side, var(--red-dim), transparent 72%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

a { text-decoration: none; color: inherit; }

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

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--panel-2); }
::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 10px; }

.wrap {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 var(--red-glow); }
    70% { box-shadow: 0 0 0 8px rgba(232,32,47,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,32,47,0); }
}
@keyframes shimmerLine {
    to { background-position: -200% 0; }
}

/* ================================================================
   NAVBAR
================================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 100;
    background: rgba(6,6,7,0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.navbar-inner {
    max-width: 1040px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(145deg, #1a1113, #0a0a0b);
    border: 1px solid rgba(232,32,47,0.35);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.nav-logo i {
    font-size: 17px;
    background: linear-gradient(135deg, var(--white), var(--red));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-brand .name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
}
.nav-brand .name span { color: var(--red); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links a {
    position: relative;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    padding: 9px 15px;
    border-radius: 30px;
    transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--white); background: var(--red-dim); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 50%; transform: translateX(-50%);
    width: 16px; height: 2px;
    background: var(--red);
    border-radius: 2px;
}
.nav-cta {
    display: flex; align-items: center; gap: 10px;
}
.nav-status {
    display: none;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--muted-2);
    font-family: var(--font-mono);
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 30px;
}
.nav-status .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--red);
    animation: pulseDot 2s infinite;
}
.nav-burger {
    display: none;
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--white);
    align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 16px;
}

@media (min-width: 860px) { .nav-status { display: flex; } }

@media (max-width: 780px) {
    .nav-links {
        position: fixed;
        top: var(--nav-h); left: 0; right: 0;
        background: rgba(8,8,9,0.98);
        border-bottom: 1px solid var(--line-soft);
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px 16px;
        gap: 4px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.28s ease, opacity 0.28s ease;
    }
    .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-links a { padding: 13px 14px; border-radius: var(--r-sm); }
    .nav-burger { display: flex; }
}

/* ================================================================
   BUTTONS
================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14.5px;
    padding: 14px 26px;
    border-radius: var(--r-md);
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.25s, filter 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 6px 26px rgba(163,18,30,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(163,18,30,0.45); filter: brightness(1.07); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--white);
}
.btn-ghost:hover { border-color: var(--red); background: var(--red-dim); }

/* ================================================================
   CARD WRAPPER W/ ROTATING RING
================================================================ */
.ring-wrap {
    position: relative;
    border-radius: var(--r-xl);
    padding: 1.5px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.ring-wrap::before {
    content: '';
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 0deg, transparent 0%, var(--red) 16%, #ffffff 30%, transparent 46%, transparent 100%);
    animation: spin 7s linear infinite;
    opacity: 0.85;
}
.ring-wrap.is-busy::before { animation-duration: 1.5s; }
.panel {
    position: relative;
    background: linear-gradient(160deg, var(--panel), var(--panel-2));
    border-radius: calc(var(--r-xl) - 1.5px);
}

/* ================================================================
   TOAST NOTIFICATIONS
================================================================ */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
    width: calc(100% - 40px);
}
.toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #101011;
    border: 1px solid var(--line);
    border-left: 3px solid var(--red);
    border-radius: var(--r-md);
    padding: 14px 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    animation: toastIn 0.35s cubic-bezier(.2,.8,.3,1) both;
    overflow: hidden;
}
.toast.out { animation: toastOut 0.3s ease forwards; }
.toast.success { border-left-color: #ffffff; }
.toast.warn { border-left-color: #ffb020; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
.toast i.icon { color: var(--red); font-size: 16px; margin-top: 1px; }
.toast.success i.icon { color: var(--white); }
.toast.warn i.icon { color: #ffb020; }
.toast .msg { font-size: 13px; font-weight: 500; color: #e8e8ea; line-height: 1.4; }
.toast .bar {
    position: absolute; left: 0; bottom: 0; height: 2px;
    background: var(--red);
    animation: toastBar 3.4s linear forwards;
}
@keyframes toastBar { from { width: 100%; } to { width: 0%; } }

@media (max-width: 500px) {
    #toastContainer { right: 12px; left: 12px; max-width: unset; width: auto; bottom: 12px; }
}

/* ================================================================
   FOOTER
================================================================ */
.site-footer {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 26px 20px 40px;
    position: relative; z-index: 1;
}
.footer-top {
    padding-top: 26px;
    border-top: 1px solid var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.footer-dev { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-dev .label { font-size: 12.5px; color: var(--muted-2); }
.footer-dev .name { font-family: var(--font-display); font-weight: 700; color: var(--white); font-size: 15px; }

.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-socials a {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 30px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    font-size: 12.5px; font-weight: 500; color: var(--muted);
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.2s;
}
.footer-socials a:hover { background: var(--red-dim); border-color: var(--red); color: var(--white); transform: translateY(-2px); }
.footer-socials a i { font-size: 15px; }

.footer-nav {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    font-size: 13px; color: var(--muted-2); margin-bottom: 18px;
}
.footer-nav a { color: var(--muted); transition: color 0.2s; }
.footer-nav a:hover { color: var(--red); }

.watermark { text-align: center; font-size: 11px; color: #26262a; letter-spacing: 0.3px; }
.watermark a { color: var(--red); }

/* ================================================================
   PAGE HERO (shared across sub pages)
================================================================ */
.page-hero { text-align: center; padding: 44px 0 34px; position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.4px;
    color: var(--red);
    background: var(--red-dim);
    border: 1px solid rgba(232,32,47,0.25);
    padding: 6px 16px; border-radius: 30px; margin-bottom: 16px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulseDot 1.8s infinite; }
.page-hero h1 {
    font-family: var(--font-display);
    font-size: 32px; font-weight: 700; letter-spacing: -0.5px;
    color: var(--white);
    line-height: 1.25;
}
.page-hero h1 .accent { color: var(--red); }
.page-hero p { color: var(--muted); font-size: 14.5px; margin-top: 10px; max-width: 480px; margin-inline: auto; }

@media (max-width: 550px) {
    .page-hero h1 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
