/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES
   ========================================================================== */
:root {
    /* Fonts */
    --font-serif-display: 'Cinzel', Georgia, serif;
    --font-serif-body: 'Lora', Georgia, serif;
    --font-sans: 'Montserrat', sans-serif;

    /* Green Velvet Palette */
    --velvet-base: #06170e;
    --velvet-dark: #030a06;
    --velvet-light: #0d2c1c;
    --velvet-glow: rgba(30, 140, 80, 0.15);
    --lamp-reflection: rgba(180, 255, 200, 0.12);

    /* Copper & Brass Palette */
    --copper-base: #b87333;
    --copper-polished: #d27d2d;
    --copper-light: #f4a261;
    --copper-dark: #6e3d15;
    --copper-deep: #3d1f08;
    --copper-glow: rgba(210, 125, 45, 0.3);
    
    /* Paper & Leather Palette */
    --leather-mat: #140d0a;
    --leather-border: #231610;
    --paper-text: #ebd1bc;
    --paper-muted: #a48e82;
    --paper-dim: #7a6b61;
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--velvet-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, var(--lamp-reflection) 0%, transparent 55%),
        radial-gradient(circle at 10% 90%, rgba(210, 125, 45, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(210, 125, 45, 0.04) 0%, transparent 40%),
        linear-gradient(to bottom, var(--velvet-light) 0%, var(--velvet-base) 100%);
    background-attachment: fixed;
    color: var(--paper-text);
    font-family: var(--font-serif-body);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Organic velvet / leather grain overlay */
.texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#velvet-texture);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.75;
}

.bankers-lamp-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 35vh;
    background: radial-gradient(ellipse at top, rgba(74, 222, 128, 0.12) 0%, rgba(22, 101, 52, 0.05) 50%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   LANGUAGE TOGGLE (BRASS SWITCH)
   ========================================================================== */
.top-nav {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 0;
    z-index: 10;
}

.lang-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 6, 4, 0.5);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(210, 125, 45, 0.15);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.lang-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--paper-dim);
    transition: all 0.3s ease;
    user-select: none;
}

/* Mechanical Brass Toggle Button */
.switch {
    background: linear-gradient(to bottom, #59351a, #231206);
    border: 1.5px solid var(--copper-base);
    border-radius: 20px;
    width: 46px;
    height: 22px;
    position: relative;
    cursor: pointer;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.8),
        0 1px 0 rgba(255,255,255,0.05);
    outline: none;
    transition: border-color 0.3s ease;
}

.switch:hover {
    border-color: var(--copper-light);
}

.switch-handle {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffd2a1 0%, var(--copper-polished) 55%, var(--copper-dark) 100%);
    position: absolute;
    top: 2.5px;
    left: 3px;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.8),
        inset 0 1px 0 rgba(255,255,255,0.4);
    transition: transform 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Active language label highlights */
body.lang-es .label-es {
    color: var(--copper-light);
    text-shadow: 0 0 8px rgba(244, 162, 97, 0.3);
}

body.lang-en .label-en {
    color: var(--copper-light);
    text-shadow: 0 0 8px rgba(244, 162, 97, 0.3);
}

body.lang-en .switch-handle {
    transform: translateX(24px);
}

/* ==========================================================================
   BILINGUAL DISPLAY LOGIC
   ========================================================================== */
.lang-content {
    display: none !important;
}

body.lang-es .lang-content.es {
    display: block !important;
}

body.lang-en .lang-content.en {
    display: block !important;
}

body.lang-es span.lang-content.es,
body.lang-es strong.lang-content.es {
    display: inline !important;
}

body.lang-en span.lang-content.en,
body.lang-en strong.lang-content.en {
    display: inline !important;
}

/* ==========================================================================
   MAIN LAYOUT & LEATHER MAT
   ========================================================================== */
.main-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 5;
    perspective: 1000px; /* Enable 3D tilt effects */
}

/* Simulated leather mat on desktop */
.desk-mat {
    background: var(--leather-mat);
    border: 1px dashed var(--copper-dark);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 
        0 35px 70px -15px rgba(0, 0, 0, 0.9),
        inset 0 0 25px rgba(0, 0, 0, 0.85);
    max-width: 580px;
    width: 100%;
    transition: transform 0.3s ease;
    border-top: 2px solid var(--leather-border);
}

/* ==========================================================================
   COPPER PLAQUE CARD
   ========================================================================== */
.plaque-card {
    position: relative;
    background: linear-gradient(135deg, #18120e 0%, #100b08 50%, #0d0906 100%);
    border-radius: 6px;
    padding: 45px 35px;
    text-align: center;
    overflow: hidden;
    box-shadow: 
        0 20px 45px rgba(0,0,0,0.85),
        inset 0 0 35px rgba(0,0,0,0.95);
    transition: box-shadow 0.4s ease;
}

/* Gradient metallic border using modern clip-path / pseudo-element technique */
.plaque-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 6px;
    padding: 2px;
    background: linear-gradient(135deg, 
        var(--copper-polished) 0%, 
        var(--copper-deep) 30%, 
        var(--copper-light) 50%, 
        var(--copper-deep) 70%, 
        var(--copper-polished) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Plaque shine animation overlay */
.plaque-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(244, 162, 97, 0.03) 48%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(244, 162, 97, 0.03) 52%,
        transparent 55%
    );
    transform: rotate(-15deg);
    transition: transform 0.5s ease-out;
    pointer-events: none;
}

.plaque-card:hover .plaque-shine {
    transform: translate(15%, 15%) rotate(-15deg);
}

/* ==========================================================================
   PLAQUE CONTENTS & ENGRAVING EFFECTS
   ========================================================================== */
.plaque-header {
    margin-bottom: 25px;
}

.name-engraved {
    font-family: var(--font-serif-display);
    font-size: 2.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: linear-gradient(to bottom, #ffffff 0%, var(--paper-text) 40%, var(--copper-polished) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
    margin-bottom: 12px;
}

.subtitle-engraved {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--copper-light);
    filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.8));
    line-height: 1.6;
}

.plaque-divider {
    height: 1px;
    border: none;
    background: linear-gradient(to right, 
        transparent 0%, 
        var(--copper-dark) 20%, 
        var(--copper-light) 50%, 
        var(--copper-dark) 80%, 
        transparent 100%);
    margin: 25px 0;
    opacity: 0.65;
}

/* ==========================================================================
   PLAQUE BODY (BIO & STATUS)
   ========================================================================== */
.plaque-body {
    text-align: center;
    margin-bottom: 20px; /* Reduced to place the badge closer to the email button */
}

.bio-lead {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--paper-text);
    font-weight: 400;
    margin-bottom: 16px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.highlight-copper {
    color: var(--copper-light);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted rgba(244, 162, 97, 0.4);
}

/* High-End Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 75, 38, 0.45); /* Richer emerald green background */
    border: 1px solid rgba(52, 211, 153, 0.35); /* Brighter green border */
    color: #a7f3d0; /* Mint green text */
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 12px auto 0 auto; /* Centered explicitly and brought closer to bottom button */
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse 2s infinite alternate;
}

.bio-text {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--paper-muted);
    margin-bottom: 18px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.bio-warning {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--paper-dim);
    border-left: 2px solid var(--copper-dark);
    padding-left: 12px;
    font-style: italic;
    margin-top: 20px;
}

/* ==========================================================================
   EMAIL PLAQUE ACTION BUTTON
   ========================================================================== */
.plaque-footer {
    display: flex;
    justify-content: center;
}

.email-plaque {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1b120c 0%, #0c0704 100%);
    border: 1px solid rgba(210, 125, 45, 0.25);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    outline: none;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.03),
        0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.email-plaque::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 5px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(210, 125, 45, 0.4), transparent, rgba(210, 125, 45, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.seal-icon {
    font-size: 1.4rem;
    color: var(--copper-polished);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(184, 115, 51, 0.08);
    border-radius: 4px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(184, 115, 51, 0.15);
}

.email-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
    margin-left: 14px;
}

.email-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--paper-dim);
    margin-bottom: 2px;
}

.email-address {
    font-family: var(--font-serif-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--copper-light);
    letter-spacing: 0.04em;
    transition: color 0.3s ease;
}

.copy-hint {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--copper-base);
    border: 1px solid rgba(184, 115, 51, 0.25);
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Hover & Active States */
.email-plaque:hover {
    border-color: rgba(210, 125, 45, 0.5);
    background: linear-gradient(135deg, #23170f 0%, #120a06 100%);
    box-shadow: 
        inset 0 1px 3px rgba(255, 255, 255, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.65),
        0 0 10px rgba(210, 125, 45, 0.15);
    transform: translateY(-2px);
}

.email-plaque:hover .seal-icon {
    color: var(--copper-light);
    background: rgba(210, 125, 45, 0.15);
    transform: scale(1.05);
}

.email-plaque:hover .email-address {
    color: #ffffff;
}

.email-plaque:hover .copy-hint {
    border-color: var(--copper-light);
    color: var(--copper-light);
    background: rgba(210, 125, 45, 0.1);
}

.email-plaque:active {
    transform: translateY(0);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Copied Success State */
.email-plaque.copied {
    border-color: #10b981;
    background: linear-gradient(135deg, #091c14 0%, #040d09 100%);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.email-plaque.copied .seal-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.email-plaque.copied .email-address {
    color: #a7f3d0;
}

.email-plaque.copied .copy-hint {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   HALLMARKS & FOOTER
   ========================================================================== */
.page-footer {
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 30px 0 10px 0;
    z-index: 10;
}

.hallmarks {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 15px;
}

.hallmark-stamp {
    font-size: 1.25rem;
    opacity: 0.2;
    cursor: default;
    filter: sepia(1) saturate(3) hue-rotate(330deg); /* Warm copper/brass patina */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hallmark-stamp:hover {
    opacity: 0.7;
    transform: scale(1.15) translateY(-3px);
    filter: sepia(1) saturate(5) hue-rotate(330deg) drop-shadow(0 4px 6px var(--copper-glow));
}

.footer-note {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #495e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes pulse {
    0% {
        opacity: 0.6;
        box-shadow: 0 0 4px #22c55e;
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 10px #22c55e, 0 0 15px rgba(34, 197, 94, 0.4);
    }
}

/* ==========================================================================
   RESPONSIVE LAYOUTS
   ========================================================================== */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .top-nav {
        padding: 5px 0 15px 0;
    }

    .desk-mat {
        padding: 12px;
        border-radius: 8px;
    }

    .plaque-card {
        padding: 30px 18px;
        border-radius: 4px;
    }

    .name-engraved {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }

    .subtitle-engraved {
        font-size: 0.7rem;
    }

    .bio-lead {
        font-size: 1.02rem;
        line-height: 1.6;
    }

    .bio-text {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .email-plaque {
        padding: 12px 14px;
    }

    .seal-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .email-details {
        margin-left: 10px;
    }

    .email-address {
        font-size: 0.88rem;
        word-break: break-all;
    }
    
    .copy-hint {
        padding: 3px 6px;
        font-size: 0.6rem;
    }

    .hallmarks {
        gap: 16px;
    }
}

@media (max-width: 360px) {
    /* Handle extremely small phones */
    .name-engraved {
        font-size: 1.7rem;
    }
    
    .email-address {
        font-size: 0.8rem;
    }
    
    .copy-hint {
        display: none; /* Hide hint to conserve space */
    }
}
