/* ============================================================
   ARAMSES2 — REDESIGN CORE
   Design tokens + base + reusable components
   ============================================================ */

:root {
    /* —— surfaces —— */
    --bg-base:        #0a0807;
    --bg-elevated:    #14100d;
    --bg-card:        #1a1410;
    --bg-card-hover:  #221a14;
    --bg-overlay:     rgba(10, 8, 7, 0.92);
    --bg-glass:       rgba(20, 16, 13, 0.72);

    /* —— borders —— */
    --border:         rgba(198, 165, 122, 0.10);
    --border-strong:  rgba(198, 165, 122, 0.22);
    --border-accent:  rgba(255, 140, 60, 0.45);

    /* —— text —— */
    --text:           #e8dcc4;
    --text-strong:    #fff5e0;
    --text-muted:     #968875;
    --text-faint:     #6b6056;

    /* —— accents —— */
    --accent:         #ff8c42;
    --accent-bright:  #ffa040;
    --accent-deep:    #b35a20;
    --gold:           #ffd587;
    --gold-deep:      #c89d4a;

    /* —— empire —— */
    --shinsoo:        #4a90d9;
    --chunjo:         #d04545;
    --jinno:          #f0c040;

    /* —— rarity —— */
    --r-common:       #b8b8b8;
    --r-uncommon:     #6dd06d;
    --r-rare:         #4a90d9;
    --r-epic:         #b04ad9;
    --r-legendary:    #ff7a00;
    --r-mythic:       #ff3060;

    /* —— effects —— */
    --shadow-sm:      0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md:      0 6px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg:      0 18px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow:    0 0 28px rgba(255, 140, 60, 0.32);

    --radius-sm:      4px;
    --radius-md:      8px;
    --radius-lg:      14px;
    --radius-pill:    999px;

    /* —— typography —— */
    --font-display:   'Cinzel', 'Times New Roman', serif;
    --font-body:      'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:      'JetBrains Mono', ui-monospace, monospace;

    /* —— layout —— */
    --container:      1280px;
    --nav-h:          72px;

    /* —— motion —— */
    --ease:           cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESET + BASE
   ============================================================ */

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

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 140, 60, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 100% 100%, rgba(74, 144, 217, 0.04) 0%, transparent 60%),
        linear-gradient(180deg, #0a0807 0%, #050403 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-bright); }

img, video, svg { display: block; max-width: 100%; height: auto; }

button { font-family: inherit; cursor: pointer; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-deep), var(--accent));
    border-radius: 999px;
    border: 2px solid var(--bg-elevated);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-bright); }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */

.font-display { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; }
.font-mono    { font-family: var(--font-mono); }

.title-xxl { font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px); font-weight: 900; line-height: 1.05; letter-spacing: 0.02em; }
.title-xl  { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); font-weight: 700; line-height: 1.15; letter-spacing: 0.03em; }
.title-lg  { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; letter-spacing: 0.04em; }
.title-md  { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 12px;
}

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

.text-glow {
    text-shadow: 0 0 18px rgba(255, 140, 60, 0.6);
}

/* ============================================================
   LAYOUT
   ============================================================ */

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

.section {
    padding: 80px 0;
    position: relative;
}

.section-tight {
    padding: 48px 0;
}

@media (max-width: 768px) {
    .section { padding: 56px 0; }
    .section-tight { padding: 32px 0; }
    .container { padding: 0 16px; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
    background: transparent;
    color: var(--text);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: #fff5e0;
    border-color: var(--accent-bright);
    box-shadow: 0 4px 16px rgba(255, 140, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
    box-shadow: 0 8px 24px rgba(255, 140, 60, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border-strong);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    color: var(--text-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: transparent;
}
.btn-ghost:hover {
    color: var(--accent-bright);
    background: rgba(255, 140, 60, 0.05);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 14px;
    letter-spacing: 2px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 11px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    transition: all 0.25s var(--ease);
}

.card:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong);
}

.card-elevated {
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.04);
}

.badge-empire-shinsoo { color: var(--shinsoo); }
.badge-empire-chunjo  { color: var(--chunjo); }
.badge-empire-jinno   { color: var(--jinno); }

.badge-class {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text);
    border-color: var(--border-strong);
}

/* ============================================================
   STATUS DOT
   ============================================================ */

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-faint);
    box-shadow: 0 0 6px currentColor;
    transition: all 0.4s var(--ease);
}

.status-dot.online {
    background: #6dd06d;
    color: #6dd06d;
    animation: pulse-dot 1.6s ease-in-out infinite;
}
.status-dot.offline {
    background: #d04545;
    color: #d04545;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 6px currentColor, 0 0 12px rgba(109, 208, 109, 0.4); }
    50%      { box-shadow: 0 0 14px currentColor, 0 0 28px rgba(109, 208, 109, 0.7); }
}

/* ============================================================
   REVEAL ANIMATION (intersection observer hooks)
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.is-visible > *:nth-child(n+8) { transition-delay: 0.54s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
