/* ============================================================
   assets/css/main.css — Shreeji Eye Centre Global Stylesheet
   ============================================================ */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
    --color-brand:  #1e40af;
    --color-amber:  #f59e0b;
    --color-wood:   #92400e;
    --color-white:  #ffffff;
    --color-slate:  #1e293b;
    --radius-card:  1rem;
    --shadow-card:  0 4px 24px rgba(0,0,0,.08);
    --transition:   all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Base resets ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; }
img  { display: block; max-width: 100%; height: auto; }

/* ── Utility: section padding ────────────────────────────────── */
.section-pad { padding-top: 5rem; padding-bottom: 5rem; }
@media (max-width: 640px) { .section-pad { padding-top: 3rem; padding-bottom: 3rem; } }

/* ── Gradient text ───────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 60%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.35);
    transition: transform 8s ease-in-out;
}
.hero:hover .hero-bg { transform: scale(1.03); }

/* ── Glass card ──────────────────────────────────────────────── */
.glass-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-card);
}

/* ── Service card ────────────────────────────────────────────── */
.service-card {
    background: #fff;
    border-radius: var(--radius-card);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af, #f59e0b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(30,64,175,.13); }
.service-card:hover::before { transform: scaleX(1); }

/* ── Icon box ─────────────────────────────────────────────────── */
.icon-box {
    width: 3.25rem; height: 3.25rem;
    border-radius: 0.875rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    margin-bottom: 1rem;
    transition: var(--transition);
}
.service-card:hover .icon-box {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}
.service-card:hover .icon-box svg { color: #fff; }

/* ── CTA Button ──────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .875rem 2rem;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
    font-weight: 600; font-size: .95rem;
    border-radius: .875rem;
    box-shadow: 0 8px 24px rgba(30,64,175,.35);
    transition: var(--transition);
    border: none; cursor: pointer; text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(30,64,175,.45); }

.btn-secondary {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .875rem 2rem;
    background: transparent;
    color: #fff;
    font-weight: 600; font-size: .95rem;
    border-radius: .875rem;
    border: 2px solid rgba(255,255,255,.55);
    transition: var(--transition);
    cursor: pointer; text-decoration: none;
}
.btn-secondary:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* ── Section headings ────────────────────────────────────────── */
.section-label {
    display: inline-block;
    font-size: .75rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-amber);
    background: #fef3c7;
    padding: .3rem .9rem; border-radius: 999px;
    margin-bottom: 1rem;
}

/* ── Doctor card ─────────────────────────────────────────────── */
.doctor-card {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(30,64,175,.15);
}

/* ── Animated counter ─────────────────────────────────────────── */
.stat-card {
    background: #fff; border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
    text-align: center;
}

/* ── Contact form ─────────────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: .875rem 1.125rem;
    border: 1.5px solid #e2e8f0;
    border-radius: .75rem;
    font-family: 'Inter', sans-serif;
    font-size: .925rem;
    color: #1e293b;
    background: #f8fafc;
    transition: var(--transition);
    outline: none;
}
.form-input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-input::placeholder { color: #94a3b8; }

/* ── VTO page ─────────────────────────────────────────────────── */
#vto-canvas-wrapper {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0; /* removes inline gap below video */
}
#vto-video, #vto-photo-preview {
    width: 100%;
    border-radius: 1.25rem;
    object-fit: cover;
    aspect-ratio: 4/3;
    background: #0f172a;
}
#vto-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 1.25rem;
    cursor: grab;
    touch-action: none; /* prevent scroll while dragging on mobile */
    /* We now process the white background out of the PNGs via JavaScript
       so we don't need mix-blend-mode: multiply here anymore. */
    will-change: transform; /* GPU-composited for smooth 60fps */
}
#vto-canvas:active { cursor: grabbing; }
.frame-thumb {
    cursor: pointer;
    border-radius: .875rem;
    border: 3px solid transparent;
    transition: var(--transition);
    overflow: hidden;
    background: #f8fafc;
}
.frame-thumb:hover { border-color: #2563eb; transform: scale(1.03); }
.frame-thumb.selected { border-color: #1e40af; box-shadow: 0 0 0 4px rgba(30,64,175,.2); }
.frame-thumb img { width: 100%; height: 110px; object-fit: contain; padding: .5rem; }

/* ── Range slider custom ──────────────────────────────────────── */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    outline: none;
    width: 100%;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,.4);
    transition: var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* ── Scroll animation utility ─────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Loading pulse ────────────────────────────────────────────── */
.pulse-ring {
    animation: pulse-ring 1.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.5); }
    70%  { box-shadow: 0 0 0 12px rgba(37,99,235,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

/* ── Notification toast ───────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    background: #1e293b; color: #fff;
    padding: .875rem 1.5rem;
    border-radius: .875rem;
    font-size: .875rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { background: #166534; }
#toast.error   { background: #991b1b; }
