/* ======================================================================
   imranalam.in — shared design system
   Used by all pages (homepage links it; sub-pages + location pages rely on it).
   Palette: blue 600 primary / violet 600 secondary / teal 600 accent.
   Text + accent pairings chosen to hold WCAG AA contrast on each background.
   ====================================================================== */

:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --surface: rgba(255, 255, 255, 0.66);
    --surface-hover: rgba(255, 255, 255, 0.92);
    --border: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.18);
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.45);
    --btn-glow: rgba(37, 99, 235, 0.25);
    --btn-glow-hover: rgba(37, 99, 235, 0.45);
    --grid-line: rgba(15, 23, 42, 0.05);
    --grad-from: #1d4ed8;
    --grad-mid: #7c3aed;
    --grad-to: #0d9488;
    --tag-bg: rgba(37, 99, 235, 0.07);
    --tag-border: rgba(37, 99, 235, 0.25);
    --tag-text: #1d4ed8;
    --tag-bg-hover: rgba(37, 99, 235, 0.14);
    --tag-border-hover: rgba(37, 99, 235, 0.45);
    --tag-text-hover: #1e40af;
    --scrollbar-thumb: rgba(37, 99, 235, 0.4);
    --card-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    --halo: rgba(37, 99, 235, 0.13);
    --section-tint: rgba(37, 99, 235, 0.045);
    --input-bg: rgba(255, 255, 255, 0.75);
    --input-border: rgba(15, 23, 42, 0.12);
    --accent-ring: rgba(37, 99, 235, 0.15);
    --placeholder: #94a3b8;
}

html.dark {
    --bg: #0b1120;
    --text: #e2e8f0;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.15);
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.5);
    --btn-glow: rgba(37, 99, 235, 0.45);
    --btn-glow-hover: rgba(59, 130, 246, 0.65);
    --grid-line: rgba(255, 255, 255, 0.025);
    --grad-from: #e2e8f0;
    --grad-mid: #a78bfa;
    --grad-to: #2dd4bf;
    --tag-bg: rgba(96, 165, 250, 0.1);
    --tag-border: rgba(96, 165, 250, 0.2);
    --tag-text: #93c5fd;
    --tag-bg-hover: rgba(96, 165, 250, 0.18);
    --tag-border-hover: rgba(96, 165, 250, 0.4);
    --tag-text-hover: #bfdbfe;
    --scrollbar-thumb: rgba(96, 165, 250, 0.35);
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    --halo: rgba(37, 99, 235, 0.16);
    --section-tint: rgba(96, 165, 250, 0.04);
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(255, 255, 255, 0.1);
    --accent-ring: rgba(96, 165, 250, 0.2);
    --placeholder: #475569;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    transition: background-color .3s ease, color .3s ease;
}

/* Soft ambient halo at the top of the page */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(1100px 600px at 70% -10%, var(--halo), transparent 65%);
}

.section-alt { background: var(--section-tint); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
    position: absolute;
    left: 1rem; top: -3.5rem;
    z-index: 100;
    padding: .6rem 1.1rem;
    border-radius: .75rem;
    background: var(--accent);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    transition: top .2s;
}
.skip-link:focus { top: 1rem; }

#scrollProgress {
    position: fixed;
    top: 0; left: 0;
    height: 3px; width: 0;
    z-index: 60;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #2dd4bf);
    transition: width .1s linear;
}

/* ---- Glass ---- */
.glass {
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background .25s, border-color .25s, box-shadow .25s;
}
.glass:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.glass-card { box-shadow: var(--card-shadow); }
#siteHeader.scrolled .glass { box-shadow: var(--card-shadow); }

/* ---- Gradient text ---- */
.grad-text {
    background: linear-gradient(120deg, var(--grad-from) 0%, var(--grad-mid) 45%, var(--grad-to) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Glow button ---- */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 0 28px var(--btn-glow);
    transition: box-shadow .3s, transform .2s;
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 0 48px var(--btn-glow-hover); transform: translateY(-2px); }

/* ---- Grid background ---- */
.grid-bg {
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 52px 52px;
}

/* ---- Tag ---- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 500;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--tag-text);
    transition: background .2s, border-color .2s, color .2s;
    cursor: default;
}
.tag:hover { background: var(--tag-bg-hover); border-color: var(--tag-border-hover); color: var(--tag-text-hover); }

/* ---- Form inputs ---- */
.input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: .75rem;
    padding: .8rem 1rem;
    font-size: .875rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--placeholder); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
textarea.input { resize: vertical; min-height: 120px; }

/* ---- Nav links ---- */
.nav-link { position: relative; transition: color .2s; }
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 100%; height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.nav-link:hover::after, .nav-link.nav-active::after { transform: scaleX(1); }
.nav-link.nav-active { color: var(--accent); }

/* ---- Theme toggle ---- */
.theme-btn svg { transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.theme-btn:hover svg { transform: rotate(25deg) scale(1.1); }

/* ---- Back to top ---- */
#toTop {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .3s, transform .3s, box-shadow .3s;
}
#toTop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---- WhatsApp floating button ---- */
.whatsapp-float {
    position: fixed;
    right: 1.25rem; bottom: 5.5rem;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem; height: 3.75rem;
    border-radius: 9999px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 24px 40px rgba(37, 211, 102, 0.18);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    animation: whatsapp-pulse 2.8s ease-in-out infinite;
}
.whatsapp-float:hover, .whatsapp-float:focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 30px 50px rgba(37, 211, 102, 0.28);
    opacity: .98;
    animation-play-state: paused;
}
.whatsapp-float svg { width: 1.5rem; height: 1.5rem; }
@keyframes whatsapp-pulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-3px) scale(1.04); }
}

/* ---- FAQ ---- */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { display: none; }
details[open] .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform .25s; }
details[open] { border-color: var(--border-hover); }

/* ---- Prose (privacy / terms content) ---- */
.prose h2 { font-family: '"Space Grotesk"', system-ui, sans-serif; font-size: 1.4rem; font-weight: 700; margin: 2.25rem 0 .85rem; color: var(--text); }
.prose h3 { font-weight: 600; font-size: 1.05rem; margin: 1.5rem 0 .5rem; color: var(--text); }
.prose p, .prose li { color: var(--text); opacity: .82; line-height: 1.75; margin-bottom: .85rem; font-size: .95rem; }
.prose ul { padding-left: 1.25rem; margin-bottom: 1rem; list-style: disc; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose strong { font-weight: 600; opacity: 1; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float { animation: none !important; }
    html { scroll-behavior: auto; }
}
