/* ============================================================
   Larry Trustee AI — Site Polish
   Universal design system. Loaded on every page.
   Adds: Larry logo, photo treatments, color depth,
         glass nav, 3D card hovers, animations, typography fixes.
   Designed to enhance — never override page-specific features.
   ============================================================ */

:root {
    --lt-navy-900: #0a1525;
    --lt-navy-800: #0c1a2e;
    --lt-navy-700: #112240;
    --lt-navy-600: #1a365d;
    --lt-navy-500: #2d4a7a;
    --lt-gold-700: #8e7430;
    --lt-gold-600: #a68a3a;
    --lt-gold-500: #c9a84c;
    --lt-gold-400: #d4b85c;
    --lt-gold-300: #e8c866;
    --lt-gold-200: #f0da8a;
    --lt-gold-100: #faf0cc;
    --lt-cream: #faf7f0;
    --lt-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --lt-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --lt-shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
    --lt-shadow-xl: 0 24px 48px rgba(0,0,0,0.18);
    --lt-shadow-gold: 0 8px 24px rgba(201,168,76,0.25);
}

/* ── Smooth scroll + selection ── */
html { scroll-behavior: smooth; }
::selection { background: rgba(201,168,76,0.3); color: var(--lt-navy-800); }

/* ── Body baseline (additive only — does not override page bg) ── */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Larry Logo Image (auto-injected via polish.js) ── */
.lt-brand-photo {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--lt-gold-300);
    box-shadow: 0 2px 8px rgba(201,168,76,0.35);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
    display: inline-block;
    vertical-align: middle;
}
.lt-brand-photo:hover {
    transform: rotate(-6deg) scale(1.08);
    box-shadow: 0 4px 14px rgba(201,168,76,0.5);
}
.lt-brand-photo-sm {
    width: 28px; height: 28px;
    border-width: 1.5px;
}
.lt-brand-photo-lg {
    width: 56px; height: 56px;
    border-width: 3px;
}
.lt-brand-photo-xl {
    width: 96px; height: 96px;
    border-width: 4px;
}

/* ── Polish footer/header brand combo (when injected) ── */
.lt-brand-combo {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none;
}

/* ── Universal hero photo backdrop (opt-in via .lt-hero-photo) ── */
.lt-hero-photo {
    position: relative;
    overflow: hidden;
}
.lt-hero-photo::before {
    content: '';
    position: absolute; inset: 0;
    background-image: var(--lt-hero-img, url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?w=1920&q=80&auto=format&fit=crop'));
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) saturate(1.15);
    z-index: 0;
    animation: lt-hero-zoom 22s ease-in-out infinite alternate;
}
.lt-hero-photo::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 25% 30%, rgba(201,168,76,0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 70%, rgba(26,54,93,0.4) 0%, transparent 55%),
        linear-gradient(180deg, rgba(10,21,37,0.55) 0%, rgba(10,21,37,0.85) 100%);
    z-index: 0;
}
.lt-hero-photo > * { position: relative; z-index: 1; }
@keyframes lt-hero-zoom {
    0%   { transform: scale(1.05); }
    100% { transform: scale(1.18); }
}

/* ── Subtle pattern overlay (opt-in) ── */
.lt-pattern-overlay {
    position: relative;
}
.lt-pattern-overlay::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(201,168,76,0.04) 0px, rgba(201,168,76,0.04) 1px, transparent 1px, transparent 32px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 32px);
    pointer-events: none;
    z-index: 0;
}

/* ── 3D Card Hover ── */
[data-lt-tilt],
.lt-tilt-card {
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
    transform-style: preserve-3d;
    will-change: transform;
}
[data-lt-tilt]:hover,
.lt-tilt-card:hover {
    box-shadow: 0 22px 48px rgba(12,26,46,0.18);
}

/* ── Scroll-in animations ── */
.lt-fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.lt-fade-up.lt-visible {
    opacity: 1;
    transform: translateY(0);
}
.lt-fade-in {
    opacity: 0;
    transition: opacity 0.7s ease;
}
.lt-fade-in.lt-visible {
    opacity: 1;
}

/* ── Gradient text helper ── */
.lt-gold-text,
.lt-text-gold {
    background: linear-gradient(135deg, var(--lt-gold-500), var(--lt-gold-300), var(--lt-gold-200));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ── Floating shapes (decorative) ── */
.lt-floating-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.15;
    filter: blur(40px);
    z-index: 0;
    animation: lt-float 14s ease-in-out infinite alternate;
}
.lt-floating-shape.gold { background: var(--lt-gold-400); }
.lt-floating-shape.navy { background: var(--lt-navy-500); }
@keyframes lt-float {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(1.15); }
}

/* ── Universal photo card ── */
.lt-photo-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--lt-shadow-sm);
}
.lt-photo-card:hover {
    transform: translateY(-6px);
    border-color: var(--lt-gold-400);
    box-shadow: 0 22px 48px rgba(12,26,46,0.14);
}
.lt-photo-card .lt-pc-img {
    width: 100%; height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.lt-photo-card .lt-pc-img::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(10,21,37,0.55) 100%);
}
.lt-photo-card .lt-pc-body {
    padding: 24px 22px 22px;
}

/* ── Smooth focus rings ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--lt-gold-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Print friendliness ── */
@media print {
    .lt-floating-shape, .lt-hero-photo::before, .lt-hero-photo::after { display: none !important; }
}

/* ── Reduce motion preference ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   LOGO INJECTION SLOT (auto-inserted via polish.js)
   Targets common nav-logo containers across the site.
   ============================================================ */

/* Existing site nav uses .nav-logo / .logo / .navbar .logo */
.nav-logo .lt-brand-photo,
.logo .lt-brand-photo,
.navbar .logo .lt-brand-photo,
.foot-brand .lt-brand-photo,
.footer-brand .lt-brand-photo {
    margin-right: 4px;
}
