/* ================================================================
   LOFFELY CLOUD — BASE (shared design system)
   Silver & Black edition.
   Dipakai oleh / (style.css) dan /tos (tos/style.css).
   Isi: token desain, reset, aksesibilitas, header + navigasi, tombol.
   ================================================================ */

/* ----------------------------------------------------------------
   1. DESIGN TOKENS
   Hitam = dominan. Silver = identitas (hierarki, aksi utama, border
   aktif, ikon). Warna status hanya dipakai untuk makna semantik.
   ---------------------------------------------------------------- */
:root {
    color-scheme: dark;

    /* Permukaan */
    --color-bg: #08090B;
    --color-bg-alt: #0D0F12;
    --color-surface: #121519;
    --color-surface-elevated: #181C21;
    --color-surface-alt: #20252B;

    /* Silver */
    --color-silver: #D8DCE2;
    --color-silver-bright: #F1F3F5;
    --color-silver-secondary: #A8AFB8;
    --color-silver-muted: #747D88;
    --color-silver-dark: #454C55;

    /* Border */
    --color-border-subtle: rgba(216, 220, 226, 0.10);
    --color-border: rgba(216, 220, 226, 0.17);
    --color-border-active: rgba(216, 220, 226, 0.35);

    /* Teks (muted dinaikkan sedikit dari #7F8792 agar lolos kontras 4.5:1 di semua permukaan) */
    --color-text: #F2F4F7;
    --color-text-secondary: #B4BAC3;
    --color-text-muted: #8A929D;
    --color-text-on-silver: #0A0C0F;

    /* Status semantik (bukan dekorasi) */
    --color-success: #6FB68A;
    --color-warning: #D9A441;
    --color-error: #E5484D;
    --color-info: var(--color-silver-secondary);

    /* Tipografi */
    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;

    /* Layout */
    --container: 1160px;
    --gutter: clamp(1rem, 4vw, 1.5rem);
    --content-w: min(100% - (2 * var(--gutter)), var(--container));
    --header-h: 60px;

    /* Efek */
    --shadow-raised: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --dur-fast: 0.15s;
    --dur: 0.25s;
}

/* ----------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-color: var(--color-silver-dark) var(--color-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

::selection { background: rgba(216, 220, 226, 0.28); color: var(--color-silver-bright); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
    background: var(--color-silver-dark);
    border-radius: 10px;
    border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-silver-muted); }

/* ----------------------------------------------------------------
   3. AKSESIBILITAS
   ---------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--color-silver-bright);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 300;
    padding: 0.625rem 1rem;
    background: var(--color-silver-bright);
    color: var(--color-text-on-silver);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    transform: translateY(-200%);
    transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
}

/* ----------------------------------------------------------------
   4. HEADER & NAVIGASI
   Satu <nav id="siteNav"> untuk desktop dan mobile. Di mobile menjadi
   panel dropdown yang dibuka/tutup oleh tombol .nav-toggle (header.js).
   ---------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-subtle);
}

.site-header__inner {
    width: var(--content-w);
    height: var(--header-h);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: 0.01em;
    color: var(--color-silver-bright);
}

.brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-silver);
}

/* Logo: potongan emblem dari logo.jpg, warna asli (tanpa filter/blend/mask). */
.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    object-fit: cover;
    display: block;
    flex: none;
    box-shadow: 0 0 0 1px rgba(216, 220, 226, 0.32);
}
.brand-logo--sm { width: 28px; height: 28px; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}

/* Penanda aktif berupa garis silver (bukan hanya perubahan warna) */
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0.875rem;
    right: 0.875rem;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-silver);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
}

.site-nav a:hover { color: var(--color-silver-bright); }
.site-nav a:hover::after { transform: scaleX(0.4); }
.site-nav a.is-active,
.site-nav a[aria-current="page"],
.site-nav a[aria-current="location"] { color: var(--color-silver-bright); }
.site-nav a.is-active::after,
.site-nav a[aria-current="page"]::after,
.site-nav a[aria-current="location"]::after { transform: scaleX(1); }

/* Tombol hamburger — digambar dengan CSS (tanpa ketergantungan ikon eksternal) */
.nav-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--radius-md);
    color: var(--color-silver);
}
.nav-toggle:hover { color: var(--color-silver-bright); background: rgba(216, 220, 226, 0.06); }

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    position: absolute;
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--dur) var(--ease), background-color var(--dur-fast) var(--ease);
}
.nav-toggle__bars { top: 50%; left: 50%; margin: -1px 0 0 -10px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
    .nav-toggle { display: inline-block; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.25rem var(--gutter) 1rem;
        background: var(--color-bg-alt);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-raised);
    }
    .site-nav.is-open { display: flex; }

    .site-nav a {
        min-height: 52px;
        padding: 0 0.25rem;
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--color-border-subtle);
    }
    .site-nav a:last-child { border-bottom: 0; }
    .site-nav a::after { display: none; }
    .site-nav a.is-active,
    .site-nav a[aria-current="page"],
    .site-nav a[aria-current="location"] {
        padding-left: 0.875rem;
        box-shadow: inset 2px 0 0 var(--color-silver);
    }
}

/* ----------------------------------------------------------------
   5. TOMBOL
   .btn / .btn--primary / .btn--secondary dipakai di hero & komponen
   baru. .btn-action (+ .btn-wa / .btn-discord) adalah markup tombol
   pemesanan yang sudah ada — memakai gaya yang sama.
   ---------------------------------------------------------------- */
.btn,
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.625rem 1.125rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        background-color var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease),
        color var(--dur-fast) var(--ease),
        transform 0.1s var(--ease);
}
.btn:active,
.btn-action:active { transform: translateY(1px); }

.btn i,
.btn-action i { font-size: 1rem; line-height: 1; }

/* Aksi utama: silver solid */
.btn--primary,
.btn-wa {
    background: linear-gradient(180deg, #E6E9ED 0%, #C9CED5 100%);
    color: var(--color-text-on-silver);
    border-color: rgba(241, 243, 245, 0.55);
}
.btn--primary:hover,
.btn-wa:hover {
    background: linear-gradient(180deg, #F8F9FA 0%, #D8DCE2 100%);
    border-color: var(--color-silver-bright);
}

/* Aksi sekunder: outline silver */
.btn--secondary,
.btn-discord {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--secondary:hover,
.btn-discord:hover {
    background: rgba(216, 220, 226, 0.06);
    border-color: var(--color-border-active);
    color: var(--color-silver-bright);
}
