/* ==========================================================================
   IKANTIK Premium Digital Business Card Design System
   ========================================================================== */

/* Color Tokens & Variables */
:root {
    --color-bg: #050a18;
    --color-bg-alt: #0a1329;
    --color-card-bg: rgba(14, 27, 56, 0.7);
    --color-border: rgba(212, 175, 55, 0.2);
    --color-border-hover: rgba(212, 175, 55, 0.4);
    
    /* Gold Metallic Palette */
    --color-gold-light: #FFE082;
    --color-gold: #D4AF37;
    --color-gold-dark: #AA7C11;
    --gold-gradient: linear-gradient(135deg, #FFE082 0%, #D4AF37 50%, #AA7C11 100%);
    --gold-glow: 0 0 20px rgba(212, 175, 55, 0.3);
    --gold-glow-hover: 0 0 30px rgba(212, 175, 55, 0.6);

    /* Text Colors */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #E0E4EC;
    --color-text-muted: #8A98A8;
    --color-text-dark: #050a18;

    /* Shadow Styles */
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Fonts */
    --font-main: 'Outfit', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.5;
}

/* Dynamic Mesh Background Glows */
.bg-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(20, 40, 85, 0.35) 0%, rgba(5, 10, 24, 0) 70%);
    z-index: -2;
    pointer-events: none;
    filter: blur(60px);
}

.bg-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(5, 10, 24, 0) 70%);
    z-index: -2;
    pointer-events: none;
    filter: blur(60px);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    z-index: -1;
    pointer-events: none;
}

/* Main Container Layout */
.card-container {
    width: 100%;
    max-width: 460px;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Premium Business Card Container */
.business-card {
    width: 100%;
    background: var(--color-card-bg);
    border: 1px stroke var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium), var(--shadow-inner);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    overflow: hidden;
    animation: cardEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* Card Subtle Rim Shine Effect */
.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(212, 175, 55, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.logo-wrapper {
    width: 90px;
    height: 90px;
    padding: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0.05) 100%);
    box-shadow: var(--shadow-inner);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

/* Pulse glow behind logo */
.logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: var(--radius-full);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
    z-index: -1;
    animation: logoGlowPulse 3s infinite ease-in-out;
}

.company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.company-name {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.company-tagline {
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-weight: 400;
    max-width: 280px;
    margin: 0 auto;
    letter-spacing: 0.5px;
}

.company-badge {
    margin-top: 4px;
    padding: 4px 16px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-gold-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Contact Info Section */
.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-tile {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.info-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--color-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-tile:hover {
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.info-tile:hover::before {
    opacity: 1;
}

.tile-icon-wrapper {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 14px;
    color: var(--color-gold);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.info-tile:hover .tile-icon-wrapper {
    background: var(--gold-gradient);
    color: var(--color-text-dark);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.tile-icon {
    width: 20px;
    height: 20px;
}

.tile-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tile-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.tile-value {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-top: 1px;
}

.tile-arrow {
    color: var(--color-text-muted);
    opacity: 0.5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.tile-arrow svg {
    width: 16px;
    height: 16px;
}

.info-tile:hover .tile-arrow {
    opacity: 1;
    color: var(--color-gold);
    transform: translateX(3px);
}

/* Save Contact Button Section */
.save-contact-section {
    display: flex;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 16px 28px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    border: none;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--color-text-dark);
    box-shadow: var(--gold-glow);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--gold-glow-hover);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Button Shine Sweep Animation */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.13) 100%);
    transform: rotate(30deg);
    transition: all 0.7s ease;
    animation: shineSweep 4s infinite linear;
}

.btn-icon {
    width: 22px;
    height: 22px;
}

/* Animate bounce custom for icon */
.animate-bounce {
    animation: buttonIconBounce 2s infinite ease-in-out;
}

/* Quick Connect Buttons Section */
.quick-connect-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 4px;
}

.section-title::before, .section-title::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.2), transparent);
}

.connect-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.connect-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 16px 8px 12px 8px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
}

.connect-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

.connect-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    color: #FFF;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.connect-btn:hover .connect-icon-box {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.connect-icon-box svg {
    width: 22px;
    height: 22px;
}

/* Brand Specific Quick Button Styling */
.btn-whatsapp .connect-icon-box {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}
.btn-whatsapp:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.15);
}

.btn-call .connect-icon-box {
    background: var(--gold-gradient);
    color: var(--color-text-dark);
}
.btn-call:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
}

.btn-email .connect-icon-box {
    background: linear-gradient(135deg, #FF4B2B 0%, #FF416C 100%);
}
.btn-email:hover {
    box-shadow: 0 6px 20px rgba(255, 75, 43, 0.15);
}

.btn-linkedin .connect-icon-box {
    background: linear-gradient(135deg, #0077B5 0%, #005582 100%);
}
.btn-linkedin:hover {
    box-shadow: 0 6px 20px rgba(0, 119, 181, 0.15);
}

.btn-instagram .connect-icon-box {
    background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #F56040 100%);
}
.btn-instagram:hover {
    box-shadow: 0 6px 20px rgba(253, 29, 29, 0.15);
}

.btn-facebook .connect-icon-box {
    background: linear-gradient(135deg, #1877F2 0%, #0C52A3 100%);
}
.btn-facebook:hover {
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.15);
}

.connect-label {
    font-size: 0.75rem;
    font-weight: 550;
    letter-spacing: 0.3px;
}

/* Secondary Share Section */
.utility-section {
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
    color: var(--color-gold);
}

/* Footer styling */
.card-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text-primary);
}

.footer-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

.copyright {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(5, 10, 24, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #091228;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium), 0 0 30px rgba(212, 175, 55, 0.15);
    padding: 32px 24px;
    width: 100%;
    max-width: 380px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--color-border);
    color: var(--color-gold);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.qr-code-container {
    background: #FFF;
    padding: 16px;
    border-radius: var(--radius-md);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Ensure generated canvas/img fits neatly */
#qrcode {
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode canvas, #qrcode img {
    max-width: 100%;
    height: auto;
}

.modal-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-copy {
    background: var(--gold-gradient);
    color: var(--color-text-dark);
    box-shadow: var(--gold-glow);
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: var(--gold-glow-hover);
}

.btn-copy svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Toast Notification Alert
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast-container.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    background: rgba(14, 27, 56, 0.9);
    border: 1px solid var(--color-gold);
    color: var(--color-text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-premium), 0 0 20px rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-icon {
    width: 18px;
    height: 18px;
    color: #25D366; /* Success green check */
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoGlowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.25;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.45;
    }
}

@keyframes shineSweep {
    0% {
        left: -60%;
    }
    20%, 100% {
        left: 140%;
    }
}

@keyframes buttonIconBounce {
    0%, 100%, 20%, 50%, 80% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: flex-start;
    }
    
    .card-container {
        padding: 0;
    }
    
    .business-card {
        border-radius: 0;
        min-height: 100vh;
        border: none;
        padding: 40px 20px 24px 20px;
        box-shadow: none;
    }
    
    .business-card::before {
        border-radius: 0;
    }
    
    .company-name {
        font-size: 2rem;
    }
    
    .connect-grid {
        gap: 8px;
    }
    
    .connect-btn {
        padding: 12px 4px 10px 4px;
    }
}
