/* Custom site styles moved from inline <style> in index.html */

body {
    font-family: 'Inter', sans-serif;
    background-color: #fafaf9; /* Stone-50 */
    color: #1e293b; /* Slate-800 */
    overflow-x: hidden; /* Prevent accidental horizontal scroll from wide media */
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

/* Prevent anchor targets from hiding under the fixed nav */
section[id] {
    scroll-margin-top: 5rem;
}
@media (min-width: 768px) {
    section[id] { scroll-margin-top: 6.5rem; }
}

/* Responsive hero heading */
.hero-title {
    font-size: clamp(2.35rem, 4vw + 1.25rem, 3.9rem);
    line-height: 1.1;
    text-wrap: balance;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Ensure gradient text works in all browsers */
.text-transparent.bg-clip-text {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    height: 300px;
    max-height: 400px;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #4338ca;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.tab-active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.tab-inactive {
    color: #64748b;
    background: white;
    border: 2px solid #e2e8f0;
}

.tab-inactive:hover {
    color: #334155;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.tab-inactive:hover {
    color: #334155;
}

/* Custom scrollbar for cleanliness */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Responsive adjustments */
img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive video/iframe blocks */
.media-embed {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 14rem;
}
@media (min-width: 768px) {
    .media-embed { min-height: 18rem; }
}
.media-embed iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* Hero chips */
.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
}

/* Hero photo system */
.hero-photo-wrap {
    width: 16rem;
    height: 16rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 768px) { .hero-photo-wrap { width: 20rem; height: 20rem; } }
@media (min-width: 1024px) { .hero-photo-wrap { width: 22rem; height: 22rem; } }

.hero-portrait {
    position: relative;
    z-index: 2;
    width: 90%;
    height: 90%;
    border-radius: 9999px;
    object-fit: cover;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.4), 0 10px 24px rgba(15, 23, 42, 0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    /* Gentle edge dissolve into background */
    -webkit-mask-image: radial-gradient(circle at center, #000 72%, transparent 100%);
    mask-image: radial-gradient(circle at center, #000 72%, transparent 100%);
}
.hero-photo-wrap:hover .hero-portrait {
    transform: scale(1.02);
    box-shadow: 0 30px 70px rgba(14, 165, 233, 0.28), 0 12px 30px rgba(15, 23, 42, 0.32);
}

.hero-orbit {
    position: absolute;
    inset: -8%;
    border-radius: 9999px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    animation: hero-spin 18s linear infinite;
    z-index: 1;
}
.hero-orbit-1 { animation-duration: 18s; }
.hero-orbit-2 { inset: -14%; animation-duration: 24s; opacity: 0.5; }
.hero-orbit-3 { inset: -20%; animation-duration: 30s; opacity: 0.35; border-style: solid; border-color: rgba(14, 165, 233, 0.18); }

@keyframes hero-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Make hero padding smaller on mobile and scale up on medium+ */
header {
    padding-top: 4rem; /* mobile */
    padding-bottom: 3rem;
}
@media (min-width: 768px) {
    header {
        padding-top: 12rem; /* matches pt-32 on larger screens */
        padding-bottom: 6rem;
    }
}

/* Reduce chart height on small screens for better fit */
.chart-container {
    height: 220px;
}
@media (min-width: 1024px) {
    .chart-container { height: 300px; }
}

/* Tweak spacing for stacked sections on small screens */
@media (max-width: 767px) {
    .max-w-6xl { padding-left: 1rem; padding-right: 1rem; }
}

/* Custom animations for modern UI */
@keyframes gradient-x {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

.animate-gradient-x {
    animation: gradient-x 3s ease infinite;
    background-size: 200% 200%;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Glassmorphism effect */
.glass {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Speaking Section Marquee */
.marquee-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.marquee-content {
    display: flex;
    min-width: max-content;
    animation: scroll 45s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.poster-thumb {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
    width: clamp(8.5rem, 28vw, 14rem);
    height: clamp(11rem, 36vw, 18rem);
}

.poster-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-orbit,
    .marquee-content,
    .animate-gradient-x,
    .hover-lift,
    .hero-photo-wrap:hover .hero-portrait {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Funnel gradient colors */
:root {
    --funnel-color1: #2563eb;
    --funnel-color2: #60a5fa;
    --funnel-color3: #93c5fd;
}

#funnel-gradient stop {
    transition: stop-color 0.7s ease-out;
}

/* Accessibility: focus styles and skip link */
:focus-visible {
    outline: 3px solid #6366f1; /* Indigo-500 */
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    color: #1e293b;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Infinite scrolling animation for marquees */
@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll {
    animation: infiniteScroll 20s linear infinite;
    will-change: transform;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* Blog styling for n8n-generated content */
.blog-content {
    display: block;
}

.blog-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    margin-top: 0;
    color: #1e293b;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.blog-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.blog-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
    line-height: 1.3;
}

.blog-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: #334155;
    font-size: 1rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    margin-left: 2rem;
    padding: 0;
}

.blog-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: #334155;
    font-size: 1rem;
}

.blog-content em {
    font-style: italic;
    color: #312e81;
}

.blog-content strong {
    font-weight: 700;
    color: #1e293b;
}

.lead-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.375rem;
    line-height: 1.8;
    color: #334155;
    font-weight: 500;
    margin-bottom: 2rem;
    font-style: italic;
}

.text-gradient {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.framework-stage {
    margin-bottom: 3rem;
    padding: 0;
}

.strategy-card {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.8) 0%, rgba(245, 243, 255, 0.8) 100%);
    border: 1px solid #e0e7ff;
    border-left: 4px solid #312e81;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.strategy-card:hover {
    box-shadow: 0 4px 12px rgba(49, 46, 129, 0.1);
    transform: translateY(-2px);
}

.strategy-card h3 {
    color: #312e81;
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.strategy-card h4 {
    color: #312e81;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
}

.strategy-card ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.strategy-card ol {
    margin: 1rem 0;
    margin-left: 1.5rem;
}

.strategy-card li {
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.7;
    color: #334155;
}

.strategy-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #4f46e5;
    font-weight: bold;
    width: 1.5rem;
}

.strategy-card ul ul {
    margin: 0.75rem 0 0.75rem 1rem;
}

.strategy-card li ul li {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
