/* ══════════════════════════════════════════════════════════════
   FOREST - RHAMA COLLECTION
   Style modulare estratto per scalabilità futura
   ══════════════════════════════════════════════════════════════ */

/* === VARIABLES === */
:root {
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-rhama: 'Lora', serif;
    
    --bg-core: #000000;
    --bg-card: #0A0A0A;
    --bg-hover: #111111;
    
    --text-primary: #FFFFFF;
    --text-secondary: #888888;
    --text-muted: #555555;
    --text-subtle: #333333;
    
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.05);
    
    --in1-accent: #22C55E;
    --in1-glow: rgba(34, 197, 94, 0.15);
    
    --radius-card: 16px;
}

/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-core);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* === NAVIGATION - Ghost Portal === */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    pointer-events: none; /* Lascia cliccare attraverso la barra vuota */
}

/* Brand IN-1 a sinistra */
.nav-brand {
    font-family: var(--font-display);
    font-weight: 700;
    color: #333; /* Molto scuro, quasi spento */
    text-decoration: none;
    font-size: 14px;
    pointer-events: auto;
    transition: color 0.4s ease;
}

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

/* --- FOREST (Centro - Identico a IN-1) --- */
.forest-portal {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    
    /* Identico a .nav-brand */
    font-family: var(--font-display);
    font-weight: 700;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    pointer-events: auto;
    transition: color 0.4s ease;
}

/* HOVER: Solo verde */
.forest-portal:hover {
    color: var(--in1-accent); /* Verde IN-1 */
}

/* Animazione NEON pulse (respiro del glow) */

/* === HERO === */
.hero {
    min-height: 100vh;
    padding: 120px 24px 100px; /* Bottom padding per footer fixed */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === RHAMA GRID === */
.rhama-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1000px;
}

/* === RHAMA CARDS WITH BILINGUAL HOVER === */
.rhama-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 48px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    transition: all 0.3s ease;
    cursor: pointer; /* Changed: now clickable for mobile */
    position: relative;
    overflow: hidden;
}

/* Glow effect verde (come IN-1 card su BlackTrails) */
.rhama-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--in1-glow) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.rhama-card:hover::before,
.rhama-card.active::before {
    opacity: 1;
}

.rhama-card:hover,
.rhama-card.active {
    border-color: var(--text-muted);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.6);
}

/* === BILINGUAL TEXT LAYERS === */
.rhama-content {
    display: grid;
    grid-template-areas: "stack";
    width: 100%;
    min-height: 200px;
    align-items: center;
    justify-items: center;
}

.text-layer {
    grid-area: stack;
    font-family: var(--font-rhama);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(18px, 2.5vw, 22px);
    line-height: 1.8;
    color: var(--text-primary);
    text-align: center;
    padding: 0 1rem;
    transition: opacity 0.5s ease-in-out;
    width: 100%;
}

/* Base state: original visible, translation hidden */
.text-layer.original {
    opacity: 1;
    z-index: 2;
}

.text-layer.translation {
    opacity: 0;
    z-index: 1;
}

/* Hover/Active state: cross-fade to translation */
.rhama-card:hover .text-layer.original,
.rhama-card.active .text-layer.original {
    opacity: 0;
}

.rhama-card:hover .text-layer.translation,
.rhama-card.active .text-layer.translation {
    opacity: 1;
}

.text-layer .green {
    color: var(--in1-accent);
    text-shadow: 0 0 30px var(--in1-glow);
}

/* === LANGUAGE BADGE === */
.lang-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    opacity: 0.3;
    transition: opacity 0.3s ease, color 0.3s ease;
    pointer-events: none;
}

.rhama-card:hover .lang-badge,
.rhama-card.active .lang-badge {
    opacity: 0.8;
    color: var(--text-secondary);
}

/* === FOOTER === */
.footer-minimal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
}

.footer-minimal a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .top-nav {
        padding: 30px 20px;
    }
    
    .nav-brand {
        font-size: 12px;
    }
    
    .forest-portal {
        font-size: 10px;
        letter-spacing: 0.15em;
    }
    
    .forest-portal:hover {
        letter-spacing: 0.4em;
    }
    
    .hero {
        padding: 100px 20px 40px;
    }
    
    .rhama-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rhama-card {
        padding: 40px 28px;
        min-height: 260px;
    }
    
    .rhama-text {
        font-size: 20px;
    }
    
    .footer-minimal {
        padding: 20px;
        font-size: 12px;
    }
}

