/* ==========================================================================
   MERIDIAN PRIM SOLUTIONS - Bright & Clean Corporate Theme with Rolling Chain Widget
   ========================================================================== */

:root {
    /* Bright Color Palette */
    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-alt: #F1F5F9;
    --bg-input: #FFFFFF;
    
    /* Brand Accents (Emerald & Oceanic Blue) */
    --emerald-primary: #059669;
    --emerald-hover: #047857;
    --emerald-light: #ECFDF5;
    --emerald-border: #A7F3D0;

    --blue-primary: #0284C7;
    --blue-hover: #0369A1;
    --blue-light: #F0F9FF;
    --blue-border: #BAE6FD;

    --brand-gradient: linear-gradient(135deg, #059669 0%, #0284C7 100%);
    
    /* Text */
    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;

    --border-color: #E2E8F0;
    --card-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
    --hover-shadow: 0 20px 40px -10px rgba(5, 150, 105, 0.14);

    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-page);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(5, 150, 105, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.05) 0%, transparent 40%);
    color: var(--text-body);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Top Header */
.header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-names {
    display: flex;
    flex-direction: column;
}

.brand-primary {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-heading);
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--emerald-primary);
}

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem;
    background: var(--emerald-light);
    border: 1px solid var(--emerald-border);
    border-radius: 50px;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--emerald-primary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--emerald-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* Main Section */
.main-wrapper {
    max-width: 1040px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.hero-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3.5rem 3rem;
    box-shadow: var(--card-shadow);
    text-align: center;
}

/* ⚙️ Rolling Chain Mechanical Mechanism */
.rolling-chain-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.25rem;
}

.chain-mechanism {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 10px 20px rgba(5, 150, 105, 0.15));
}

.chain-svg {
    width: 100%;
    height: 100%;
}

.sprocket-gear {
    transform-origin: 100px 100px;
    animation: rotateSprocket 16s linear infinite;
}

.rolling-chain-ring {
    transform-origin: 100px 100px;
    animation: rotateChainRing 10s linear infinite reverse;
}

.animated-chain-dash {
    animation: rollChainDash 1.2s linear infinite;
}

.inner-spin {
    transform-origin: 100px 100px;
    animation: rotateSprocket 8s linear infinite;
}

@keyframes rotateSprocket {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateChainRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rollChainDash {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -18; }
}

.chain-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-heading);
}

.chain-status-dot {
    width: 7px;
    height: 7px;
    background-color: var(--emerald-primary);
    border-radius: 50%;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.25;
    margin-bottom: 1.25rem;
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-body);
    max-width: 760px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.7;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2.5rem 0;
}

/* Contact Grid */
.contact-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}

.contact-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.75rem;
    text-align: left;
    margin-bottom: 2.5rem;
}

.info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--emerald-primary);
    box-shadow: var(--hover-shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.info-icon {
    background: var(--emerald-light);
    color: var(--emerald-primary);
    border: 1px solid var(--emerald-border);
}

.accounting-icon {
    background: var(--blue-light);
    color: var(--blue-primary);
    border: 1px solid var(--blue-border);
}

.card-tag {
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--emerald-primary);
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
}

.card-body {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.email-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
}

.email-text {
    font-family: monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-heading);
    word-break: break-all;
}

.email-actions {
    display: flex;
    gap: 0.4rem;
}

.action-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--emerald-primary);
    color: white;
    border-color: var(--emerald-primary);
}

.cta-wrapper {
    display: flex;
    justify-content: center;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: var(--brand-gradient);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.9rem 2.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.25);
    transition: all 0.25s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(5, 150, 105, 0.38);
    filter: brightness(1.05);
}

.primary-btn.full-width {
    width: 100%;
}

.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Modal Overlay */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--text-heading);
    color: white;
}

.modal-head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.modal-badge {
    width: 54px;
    height: 54px;
    background: var(--emerald-light);
    color: var(--emerald-primary);
    border: 1px solid var(--emerald-border);
    border-radius: 50%;
    margin: 0 auto 0.85rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-head h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}

.modal-head p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.form-group label {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--text-heading);
}

.form-input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: var(--text-heading);
    font-family: var(--font-body);
    font-size: 0.925rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-heading);
    color: white;
    padding: 0.85rem 1.35rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 200;
    transform: translateY(120px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast i {
    color: #34D399;
    font-size: 1.2rem;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .hero-card {
        padding: 2.25rem 1.5rem;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}
