/* ============================================================
   DREMT — Asset Management Wallet
   Design System & Global Styles
   ============================================================ */

/* --- CUSTOM PROPERTIES --- */
:root {
    --bg-primary: #060606;
    --bg-secondary: #0A0A0A;
    --bg-card: #0E0E0E;
    --bg-elevated: #141414;

    --text-primary: #F2F0EB;
    --text-secondary: #9A9A94;
    --text-tertiary: #5A5A55;

    --gold: #D4C4A8;
    --gold-dim: rgba(212, 196, 168, 0.15);
    --gold-glow: rgba(212, 196, 168, 0.06);
    --ember: #C44B2F;
    --ember-dim: rgba(196, 75, 47, 0.12);

    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.14);

    --font-display: 'Clash Display', sans-serif;
    --font-body: 'Satoshi', sans-serif;

    --ease-smooth: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    --nav-height: 80px;
    --section-pad: clamp(80px, 12vh, 160px);
    --content-max: 1280px;
    --content-wide: 1440px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

::selection {
    background: var(--gold);
    color: var(--bg-primary);
}

/* --- NOISE OVERLAY --- */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- AMBIENT MESH --- */
.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    filter: blur(100px);
    opacity: 0.5;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    animation: drift 25s infinite alternate ease-in-out;
}

.ambient-orb:nth-child(1) {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #151A14 0%, transparent 70%);
    top: -15%;
    left: -5%;
}

.ambient-orb:nth-child(2) {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, #0B1520 0%, transparent 70%);
    bottom: -15%;
    right: -5%;
    animation-delay: -8s;
}

.ambient-orb:nth-child(3) {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, #1A1510 0%, transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -15s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8vw, -8vh) scale(1.08); }
}

/* --- NAVIGATION --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 4vw, 4rem);
    z-index: 1000;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background: rgba(6, 6, 6, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-brand .dot {
    color: var(--ember);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
}

.nav-link {
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    position: relative;
    padding: 0.3rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    transform: scaleX(1);
    background: var(--ember);
}

.nav-cta-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.6rem 1.6rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.nav-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text-primary);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-smooth);
}

.nav-cta-btn:hover {
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.nav-cta-btn:hover::before {
    transform: translateY(0);
}

.nav-cta-btn span {
    position: relative;
    z-index: 2;
}

/* Mobile hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- PAGE WRAPPER --- */
.page {
    position: relative;
    z-index: 10;
    min-height: 100vh;
}

/* --- SECTION LAYOUT --- */
.section {
    padding: var(--section-pad) clamp(1.5rem, 4vw, 4rem);
}

.section-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

.section-wide {
    max-width: var(--content-wide);
    margin: 0 auto;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.section-label::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--ember);
}

.section-label span {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ember);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 500;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.section-desc {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 560px;
    line-height: 1.7;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2.2rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: none;
    transition: all 0.4s var(--ease-smooth);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(242, 240, 235, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.btn-gold {
    background: var(--gold);
    color: var(--bg-primary);
}

.btn-gold:hover {
    background: #E0D0B2;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 196, 168, 0.2);
}

.btn-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
    transform: translateX(3px);
}

/* --- CARDS --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.5rem;
    transition: border-color 0.4s ease, transform 0.4s var(--ease-smooth);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
}

/* --- GRID HELPERS --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* --- DIVIDER --- */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0 clamp(1.5rem, 4vw, 4rem);
}

/* --- FOOTER --- */
.footer {
    padding: clamp(4rem, 8vh, 8rem) clamp(1.5rem, 4vw, 4rem) 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.footer-brand-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
}

.footer-columns {
    display: flex;
    gap: clamp(3rem, 5vw, 6rem);
}

.footer-col-title {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

.footer-bottom a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--text-primary);
}

/* --- PHONE MOCKUP --- */
.phone-mockup {
    width: 280px;
    height: 570px;
    background: #1A1A1A;
    border-radius: 40px;
    border: 3px solid #2A2A2A;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1A1A1A;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.phone-screen {
    position: absolute;
    inset: 8px;
    border-radius: 34px;
    overflow: hidden;
    background: var(--bg-primary);
}

/* --- APP SCREEN CONTENT --- */
.app-header {
    padding: 40px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-greeting {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.app-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
}

.app-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-dim);
    border: 1px solid var(--gold);
}

.app-balance-card {
    margin: 12px 16px;
    padding: 20px;
    background: linear-gradient(135deg, #1A1815 0%, #0F0D0B 100%);
    border-radius: 16px;
    border: 1px solid rgba(212, 196, 168, 0.12);
}

.app-balance-label {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.app-balance-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 8px;
}

.app-balance-change {
    font-size: 0.65rem;
    color: #6BBF7A;
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
}

.app-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.app-action-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-action-label {
    font-size: 0.55rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-assets-title {
    padding: 12px 20px 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

.app-asset-row {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 12px;
}

.app-asset-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.app-asset-icon.gold-bg {
    background: var(--gold-dim);
    color: var(--gold);
}

.app-asset-icon.ember-bg {
    background: var(--ember-dim);
    color: var(--ember);
}

.app-asset-icon.teal-bg {
    background: rgba(80, 180, 170, 0.12);
    color: #50B4AA;
}

.app-asset-info {
    flex: 1;
}

.app-asset-name {
    font-size: 0.75rem;
    font-weight: 500;
}

.app-asset-cat {
    font-size: 0.58rem;
    color: var(--text-tertiary);
}

.app-asset-val {
    text-align: right;
}

.app-asset-price {
    font-size: 0.75rem;
    font-weight: 500;
}

.app-asset-pct {
    font-size: 0.58rem;
    color: #6BBF7A;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 196, 168, 0.1); }
    50% { box-shadow: 0 0 40px rgba(212, 196, 168, 0.2); }
}

.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-in.delay-1 { transition-delay: 0.1s; }
.animate-in.delay-2 { transition-delay: 0.2s; }
.animate-in.delay-3 { transition-delay: 0.3s; }
.animate-in.delay-4 { transition-delay: 0.4s; }
.animate-in.delay-5 { transition-delay: 0.5s; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-top { flex-direction: column; }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }

    .nav-menu { display: none; }
    .nav-hamburger { display: flex; }

    .nav-menu.open {
        display: flex;
        position: fixed;
        inset: 0;
        background: rgba(6, 6, 6, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-menu.open .nav-link {
        font-size: 1.2rem;
    }

    .footer-columns {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .phone-mockup {
        width: 220px;
        height: 448px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }
}
