/* ============================================
   my DHARMAID — Shared CSS
   Premium Design System
   ============================================ */

/* --- XL Heading Override --- */
@media (min-width: 1280px) {
    .xl\:text-7xl {
        font-size: 4rem;
        line-height: 1;
    }
}

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

body {
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #FDFCF8;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.025'/%3E%3C/svg%3E");
}

::selection {
    background: rgba(184, 148, 30, 0.25);
    color: #0A110D;
}

/* --- Logo & Text Gradients --- */
.logo-gradient {
    background: linear-gradient(to right, #0A110D 0%, #8B4513 35%, #B8941E 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient {
    background: linear-gradient(135deg, #8B4513 0%, #B8941E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Glass Card --- */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(1.8);
    -webkit-backdrop-filter: blur(16px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* --- Mesh Background --- */
.mesh-bg {
    background-color: #FDFCF8;
    background-image:
        radial-gradient(at 80% 0%, hsla(38, 62%, 75%, 0.2) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(24, 72%, 31%, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 50%, hsla(45, 62%, 52%, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(38, 62%, 75%, 0.2) 0px, transparent 50%);
}

/* --- Gold Shimmer Animation --- */
.gold-shimmer {
    background: linear-gradient(110deg, #D4AF37 45%, #F5E6A3 50%, #D4AF37 55%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s infinite ease-in-out;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }

    50% {
        background-position: -100% 0;
    }

    100% {
        background-position: 100% 0;
    }
}

/* --- Bronze Divider --- */
.bronze-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 69, 19, 0.15), rgba(184, 148, 30, 0.2), rgba(139, 69, 19, 0.15), transparent);
}

/* --- Bento Card Hover --- */
.bento-card {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.6s ease;
    background-color: #FFFFFF;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3),
        0 4px 6px -1px rgba(0, 0, 0, 0.01),
        0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3),
        0 20px 40px -12px rgba(139, 69, 19, 0.08),
        0 8px 16px -8px rgba(0, 0, 0, 0.04);
    border-color: rgba(184, 148, 30, 0.3);
}

/* --- Learn More Reveal on Card Hover --- */
.learn-more {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bento-card:hover .learn-more {
    opacity: 1;
    transform: translateX(0);
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.15s;
}

.reveal-delay-2 {
    transition-delay: 0.30s;
}

.reveal-delay-3 {
    transition-delay: 0.45s;
}

.reveal-delay-4 {
    transition-delay: 0.60s;
}

/* Slide from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up reveal */
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Floating / Pulse Decorative Animations --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(2deg);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.animate-float-delay {
    animation: float 6s ease-in-out 2s infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

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

/* --- Premium Button Effects --- */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(139, 69, 19, 0.35);
}

.btn-gold {
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.8s ease;
}

.btn-gold:hover::before {
    left: 100%;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(212, 175, 55, 0.35);
}

/* --- Link Underline Animation --- */
.link-animated {
    position: relative;
    display: inline-block;
}

.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8B4513, #D4AF37);
    border-radius: 1px;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* --- Nav Enhancements --- */
.site-nav {
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.site-nav.scrolled {
    background: rgba(253, 252, 248, 0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03),
        0 4px 12px rgba(0, 0, 0, 0.01);
    border-color: rgba(232, 228, 218, 0.9);
}

/* Nav link hover with underline */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #8B4513;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateX(-50%);
}

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

.nav-link.active {
    color: #8B4513;
}

/* --- Card 3D Tilt / Depth --- */
.card-hover {
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3),
        0 24px 48px -12px rgba(0, 0, 0, 0.06),
        0 12px 24px -8px rgba(139, 69, 19, 0.04);
}

/* --- Icon Containers Animation --- */
.icon-box {
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.group:hover .icon-box {
    transform: scale(1.05);
    box-shadow: 0 8px 16px -4px rgba(139, 69, 19, 0.08);
}

/* --- Decorative Dot Grid Pattern --- */
.dot-pattern {
    background-image: radial-gradient(rgba(139, 69, 19, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* --- Gradient Border Effect --- */
.gradient-border {
    position: relative;
    border: none;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3), rgba(212, 175, 55, 0.3), rgba(139, 69, 19, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* --- Glow Effects --- */
.glow-accent {
    box-shadow: 0 0 40px -8px rgba(212, 175, 55, 0.25);
}

.glow-primary {
    box-shadow: 0 0 40px -8px rgba(139, 69, 19, 0.2);
}

/* --- Section Separator Ornament --- */
.section-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-ornament::before,
.section-ornament::after {
    content: '';
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(184, 148, 30, 0.3));
}

.section-ornament::after {
    background: linear-gradient(90deg, rgba(184, 148, 30, 0.3), transparent);
}

/* --- Badge Pulse --- */
@keyframes badge-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.3);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(212, 175, 55, 0);
    }
}

.badge-pulse {
    animation: badge-pulse 2.5s ease-in-out infinite;
}

/* --- Stat Counter Enhancement --- */
.stat-number {
    background: linear-gradient(180deg, #0A110D 0%, #6B6352 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Form Input Focus Enhancement --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.08),
        0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* --- Smooth Image/Card Reveal --- */
@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Hide Scrollbar --- */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Skip to Content (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #8B4513;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: 600;
    z-index: 100;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* --- Form Validation States --- */
.field-error {
    border-color: #DC2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.field-success {
    border-color: #16A34A !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}

.error-message {
    color: #DC2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: error-shake 0.4s ease;
}

@keyframes error-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.toast-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* --- Mobile Menu Transition --- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        padding 0.3s ease,
        border-color 0.3s ease;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-color: transparent;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    border-color: #E8E4DA;
}

/* --- Premium Typography Refinements --- */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* --- Decorative Ring --- */
.ring-decorative {
    position: relative;
}

.ring-decorative::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid rgba(212, 175, 55, 0.15);
    pointer-events: none;
}

/* --- Smooth Background Transition for Sections --- */
.section-fade {
    position: relative;
}

.section-fade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(253, 252, 248, 1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* --- Parallax-ready --- */
.parallax-bg {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* --- Footer link hover --- */
.footer-link {
    position: relative;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #8B4513;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: #8B4513;
    transition: width 0.3s ease;
}

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

/* --- Typographical Fine Details --- */
.drop-cap::first-letter {
    font-family: "Playfair Display", serif;
    float: left;
    font-size: 3.5rem;
    line-height: 1;
    margin-right: 0.35rem;
    padding-top: 0.15rem;
    font-weight: 700;
    color: #8B4513;
}

/* ============================================
   Journey Timeline
   ============================================ */

.journey-timeline {
    position: relative;
    padding-left: 2.5rem;
}

@media (min-width: 768px) {
    .journey-timeline {
        padding-left: 0;
    }
}

.journey-track {
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E8E4DA;
    z-index: 0;
}

@media (min-width: 768px) {
    .journey-track {
        left: 50%;
        transform: translateX(-50%);
    }
}

.journey-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #8B4513 0%, #D4AF37 50%, #8B4513 100%);
    border-radius: 1px;
    transition: height 0.15s linear;
}

.journey-node {
    position: absolute;
    left: -2.5rem;
    top: 0;
    z-index: 10;
    transform: translateX(calc(-50% + 9px));
}

@media (min-width: 768px) {
    .journey-node {
        left: 50%;
        transform: translateX(-50%);
    }
}

.journey-node-inner {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B4513, #D4AF37);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.25);
    border: 3px solid #FDFCF8;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.5s ease;
}

.journey-step.active .journey-node-inner {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.2),
                0 4px 12px rgba(139, 69, 19, 0.3);
}

.journey-visual {
    background: #FFFFFF;
    border: 1px solid #E8E4DA;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02),
                0 2px 4px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.journey-visual::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6rem;
    height: 6rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0 0 0 100%;
    pointer-events: none;
}

/* ============================================
   India Temple Network Map
   ============================================ */

.india-state {
    fill: rgba(212, 175, 55, 0.06);
    stroke: rgba(212, 175, 55, 0.25);
    stroke-width: 0.7;
    transition: fill 0.3s ease;
}

.india-state:hover {
    fill: rgba(212, 175, 55, 0.15);
}

.india-path path {
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.india-path.drawn path {
    stroke-dashoffset: 0 !important;
}

.india-states-group {
    opacity: 0;
    transition: opacity 1s ease 0.8s;
}

.india-states-group.visible {
    opacity: 1;
}

.network-lines {
    transition: opacity 0.6s ease 0.3s;
}

.network-lines.visible {
    opacity: 1 !important;
}

.network-lines line {
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.network-lines.visible line {
    stroke-dashoffset: 0 !important;
}

/* Animated mesh pulse — lines glow subtly after draw-in */
@keyframes mesh-pulse {
    0%, 100% { stroke-opacity: var(--line-base-opacity, 0.15); }
    50% { stroke-opacity: calc(var(--line-base-opacity, 0.15) + 0.12); }
}

.network-lines.visible line {
    animation: mesh-pulse 4s ease-in-out infinite;
    animation-delay: var(--pulse-delay, 0s);
}

/* Traveling data particle along connection lines */
@keyframes data-travel {
    0% { offset-distance: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

.network-lines .data-particle {
    r: 1.5;
    fill: #D4AF37;
    filter: url(#node-glow);
    opacity: 0;
}

.network-lines.visible .data-particle {
    animation: data-travel var(--travel-duration, 3s) linear infinite;
    animation-delay: var(--travel-delay, 0s);
}

.temple-node {
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.temple-node.visible {
    opacity: 1 !important;
}

@keyframes node-pulse-alt {
    0%, 100% {
        transform: scale(1);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.8);
        opacity: 0.02;
    }
}

.temple-node.visible .node-pulse-ring {
    transform-origin: center;
    transform-box: fill-box;
    animation: node-pulse-alt 3s ease-in-out infinite;
}

.map-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(26, 24, 20, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}

.map-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.map-tooltip-temple {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 12px;
    color: #D4AF37;
}

.map-tooltip-state {
    font-family: "Manrope", sans-serif;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1px;
}