/* iNotariz Core Custom Styles — extracted for maintainability */
/* For single-file production build, inline this content back into <style> or use the build script. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', system_ui, -apple-system, sans-serif;
    line-height: 1.5;
    background-image: linear-gradient(rgba(74,111,165,0.008) 1px, transparent 1px);
    background-size: 3px 3px;
}

.heading-serif { font-family: 'Inter', system_ui, -apple-system, sans-serif; font-weight: 600; font-feature-settings: "tnum"; }

.premium-nav {
    backdrop-filter: blur(20px);
    background: rgba(248, 245, 240, 0.85);
    border-bottom: 1px solid rgba(74,111,165,0.12);
}
.dark-nav {
    background: rgba(11, 20, 33, 0.92);
    backdrop-filter: blur(20px);
}

.section-header {
    font-size: clamp(2.35rem, 5.2vw, 3.45rem);
    line-height: 1.02;
    letter-spacing: -0.032em;
}
.nav-link { position: relative; }
.nav-link:after {
    content: '';
    position: absolute;
    width: 0; height: 1px; bottom: -2px; left: 0;
    background: linear-gradient(to right, #4A6FA5, #4A6FA5);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.premium-card {
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease;
    border: 1px solid rgba(74,111,165,0.08);
    background: #FFFEFA;
    box-shadow: 0 2px 4px rgba(0,0,0,0.025);
    padding: 2.5rem 2.75rem;
    border-radius: 20px;
    background-image: linear-gradient(rgba(74,111,165,0.012) 1px, transparent 1px);
    background-size: 4px 4px;
}
.luxury-input, .primary-button, .booking-service-option { border-radius: 16px; }
.service-icon { border-radius: 12px; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.premium-card:hover .service-icon { transform: scale(1.05); }

.premium-card:hover {
    transform: translateY(-7px);
    border-color: rgba(74,111,165,0.45);
    box-shadow: 0 30px 60px -15px rgb(0 0 0 / 0.14), 0 12px 12px -8px rgb(0 0 0 / 0.08);
}

/* Mobile (chat + tighter cards) */
@media (max-width: 640px) {
    .premium-card { padding: 1.75rem 1.5rem; border-radius: 18px; }
    .section-header { font-size: 2.05rem; letter-spacing: -0.028em; }
    #grok-chat-window {
        width: calc(100vw - 2rem) !important; right: 1rem !important; left: 1rem !important; bottom: 1rem !important;
    }
}

.premium-card:active { transform: translateY(-2px); }

.primary-button {
    background: #4A6FA5;
    color: #0B1421;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 16px;
}
.primary-button:hover {
    background: #3A5A85;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(74 111 165 / 0.25), 0 8px 10px -6px rgb(74 111 165 / 0.25);
}
.primary-button:active { transform: translateY(0); }

/* Animation & transition utilities (deduped + helpers) */
.trans-fast { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.trans-premium { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.trans-lift { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

.hover-lift { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px rgb(0 0 0 / 0.15);
}

/* Unified scroll-reveal system (transition-based for performance) */
.fade-in-up, .stagger-item, .section-reveal, .section-fade, .scale-in {
    opacity: 0;
    will-change: transform, opacity;
}
.fade-in-up { transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform: translateY(25px); }
.stagger-item, .section-reveal, .section-fade { transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform: translateY(20px); }
.scale-in { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); transform: scale(0.95); }

.fade-in-up.visible,
.stagger-item.visible,
.section-reveal.visible,
.section-fade.visible,
.scale-in.visible {
    opacity: 1;
    transform: none;
}

.outline-accent {
    border: 1.5px solid #4A6FA5;
    color: #4A6FA5;
    font-weight: 500;
}
.outline-accent, .primary-button, .luxury-input, .nav-link, .step-dot, .faq-question, .subtle-scale {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navy-bg { background-color: #0B1421; }
.cream-bg { background-color: #F8F5F0; }
.subtle-border { border-color: rgba(74,111,165,0.12); }
.premium-shadow { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.15); }

.elegant-divider {
    background: linear-gradient(to right, transparent, #4A6FA5, transparent);
    height: 1px;
    opacity: 0.2;
}

.stat-number { font-feature-settings: "tnum"; }

.modal { animation: modalEnter 0.4s cubic-bezier(0.32, 0.72, 0, 1); }

@keyframes modalEnter {
    from { opacity: 0; transform: translateY(40px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.step-dot { /* grouped trans-fast */ }

.luxury-input { background-color: #FFFFFF; border-radius: 14px; }
.luxury-input:focus {
    outline: none; border-color: #4A6FA5; box-shadow: 0 0 0 3px rgba(74,111,165,0.12);
}

/* Accessibility improvements (focus-visible centralized) */
button:focus-visible,
a:focus-visible,
.luxury-input:focus-visible {
    outline: 2px solid #4A6FA5;
    outline-offset: 2px;
}
.primary-button:focus-visible {
    outline: 2px solid #0B1421;
    outline-offset: 3px;
}

.nav-scrolled {
    box-shadow: 0 1px 0 0 rgba(74,111,165,0.08);
}

/* Card hover lift (used in a few premium cards) */
.card-hover-lift {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgb(0 0 0 / 0.12);
}

.subtle-scale:hover {
    transform: scale(1.015);
}

/* Grok Chat Widget Styles */
#grok-chat-window {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    border-radius: 24px;
}

#grok-chat-window .bg-\\[\\#0B1421\\] {
    border-radius: 24px 24px 0 0;
}

#grok-chat-widget button[aria-label] { transition: transform 0.2s ease; }

/* xNotary chat widget visibility */
#grok-chat-widget {
    transition: opacity 0.35s ease, transform 0.35s ease;
}
#grok-chat-widget.chat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

/* Subtle one-time welcome tooltip styling */
#xnotary-welcome-tooltip {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}
#xnotary-welcome-tooltip.flex {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.grok-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.45;
}

.grok-message.bot {
    background: white;
    border: 1px solid #E5E0D6;
    border-bottom-left-radius: 6px;
}

/* Improved Typing Indicator */
.grok-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #E5E0D6;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    width: fit-content;
}

.grok-typing-dot {
    width: 5px;
    height: 5px;
    background: #4A6FA5;
    border-radius: 50%;
    animation: grokTypingBounce 1.2s infinite ease-in-out;
}
.grok-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.grok-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes grokTypingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
}

.grok-message.user {
    background: #0B1421;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.grok-quick-reply {
    font-size: 12px;
    padding: 6px 12px;
    background: #F8F5F0;
    border: 1px solid #4A6FA5/30;
    border-radius: 9999px;
    white-space: nowrap;
}
.grok-quick-reply:hover {
    background: #4A6FA5;
    color: #0B1421;
    border-color: #4A6FA5;
}

.faq-question { /* inherits .trans-fast from group selector */ }

.glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
}

.metric {
    font-variant-numeric: tabular-nums;
}

.notary-seal {
    filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.1));
}

.trust-badge:hover { transform: translateY(-1px); }

.process-step {
    position: relative;
}

.process-step:not(:last-child):after {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 3.25rem;
    bottom: -1rem;
    width: 1.5px;
    background: linear-gradient(to bottom, #4A6FA5, transparent);
    opacity: 0.25;
}

@media (min-width: 768px) {
    .process-step:not(:last-child):after {
        display: none;
    }
}

.pricing-toggle { box-shadow: 0 1px 3px rgb(0 0 0 / 0.1); }

/* Mobile refinements */
@media (max-width: 767px) {
    .premium-card { padding: 1.5rem; }
    .section-header { font-size: 2.1rem; line-height: 1.05; }
    #booking-modal .max-w-2xl { padding-left: 1rem; padding-right: 1rem; }
    .luxury-input { padding-top: 0.875rem; padding-bottom: 0.875rem; }
    section { scroll-margin-top: 60px; }
    #booking-modal .grid { gap: 0.75rem; }
    #booking-modal .step-indicator { font-size: 0.7rem; padding: 0.35rem 0.5rem; }
    #booking-modal .text-xl { font-size: 1.15rem; }
    #booking-modal .p-8 { padding: 1.25rem; }
    .service-card, .option-card { padding: 1rem !important; }
    #progress-bar { height: 4px !important; }
}

/* Back to top */
#back-to-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 90;
    width: 44px; height: 44px; border-radius: 9999px;
    background: #0B1421; color: #4A6FA5;
    border: 1px solid rgba(74,111,165,0.3);
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2);
    transition: all 0.2s ease;
}
#back-to-top.visible {
    display: flex;
}
#back-to-top:hover {
    background: #4A6FA5;
    color: #0B1421;
}
