/* ============================================================================
   Tawleef — Vibrant Layer (v4)
   Adds life: gradients, motion, ornaments, section dividers, hover energy
============================================================================ */

/* ────────────── Page-level subtle texture ────────────── */
body {
    background:
        radial-gradient(ellipse 800px 600px at 10% 0%, rgba(122,29,45,0.04), transparent 60%),
        radial-gradient(ellipse 700px 500px at 90% 30%, rgba(92,122,149,0.04), transparent 60%),
        radial-gradient(ellipse 900px 700px at 50% 100%, rgba(184,146,84,0.03), transparent 60%),
        var(--cream);
    background-attachment: fixed;
}

/* ────────────── Hero — way more alive ────────────── */
.hero-large {
    padding: var(--sp-32) 0 var(--sp-24);
    position: relative;
}
.hero h1 {
    background: linear-gradient(135deg, var(--ink) 0%, var(--burgundy-dark) 60%, var(--burgundy) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    line-height: 1.6;
    padding-block-start: 0.5em;
    padding-block-end: 0.15em;
    letter-spacing: 0;
    overflow: visible;
    animation: heroTitleIn 1.2s var(--ease) both;
}
.hero h1 .accent {
    background: linear-gradient(135deg, var(--burgundy), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    position: relative;
    display: inline-block;
    padding-inline: 0.1em;
}
.hero h1 .accent::after {
    content: '';
    position: absolute;
    bottom: 0.02em;
    inset-inline-start: 10%;
    inset-inline-end: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--burgundy), var(--gold), transparent);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    animation: drawLine 1.6s var(--ease) 600ms forwards;
}

@keyframes heroTitleIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: none; }
}
@keyframes drawLine {
    to { transform: scaleX(1); }
}

/* Add floating decorative dots in hero */
.hero::after {
    content: '';
    position: absolute;
    top: 25%;
    inset-inline-end: 10%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow:
        -120px 80px 0 -2px var(--burgundy),
        80px 200px 0 -1px var(--blue-soft),
        -60px 320px 0 -3px var(--gold),
        180px 60px 0 -2px var(--burgundy-soft),
        -200px 180px 0 -2px var(--blue);
    animation: drift 6s ease-in-out infinite;
}

/* Hero CTAs — extra glow on primary */
.hero-actions .btn-primary {
    box-shadow: 0 12px 32px rgba(122,29,45,0.30);
    animation: glowPulse 3s ease-in-out infinite 1.2s;
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 12px 32px rgba(122,29,45,0.30); }
    50%      { box-shadow: 0 16px 48px rgba(122,29,45,0.45); }
}

/* ────────────── Section dividers (curved/wavy) ────────────── */
.section-alt {
    position: relative;
}
.section-alt::before,
.section-alt::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    height: 40px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
.section-alt::before {
    top: -1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C300,40 900,40 1200,0 L1200,0 L0,0 Z' fill='%23F6F0E4'/%3E%3C/svg%3E");
}
.section-alt::after {
    bottom: -1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C300,0 900,0 1200,40 L1200,40 L0,40 Z' fill='%23F6F0E4'/%3E%3C/svg%3E");
}

/* Decorative dots between sections */
.divider-dots {
    display: flex;
    justify-content: center;
    gap: var(--sp-3);
    padding-block: var(--sp-10);
}
.divider-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--burgundy);
    animation: drift 2.5s ease-in-out infinite;
}
.divider-dots span:nth-child(2) { background: var(--gold); animation-delay: -0.6s; }
.divider-dots span:nth-child(3) { background: var(--blue); animation-delay: -1.2s; }

/* ────────────── Section titles with ornament ────────────── */
.section-title {
    position: relative;
    display: inline-block;
}
.section-header > .section-title::before,
.section-header > .section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--burgundy));
    opacity: 0.3;
}
.section-header > .section-title::before {
    inset-inline-end: calc(100% + var(--sp-4));
    background: linear-gradient(90deg, var(--burgundy), transparent);
}
.section-header > .section-title::after {
    inset-inline-start: calc(100% + var(--sp-4));
}
@media (max-width: 700px) {
    .section-header > .section-title::before,
    .section-header > .section-title::after { display: none; }
}

/* ────────────── Eyebrow upgrade ────────────── */
.eyebrow {
    position: relative;
}
.eyebrow .icon { color: var(--gold); animation: drift 3s ease-in-out infinite; }

/* ────────────── Feature cards — energized ────────────── */
.feature-card {
    background: linear-gradient(180deg, var(--ivory) 0%, rgba(246,240,228,0.6) 100%);
    backdrop-filter: blur(6px);
}
.feature-card:hover {
    background: linear-gradient(180deg, var(--ivory) 0%, var(--burgundy-wash) 100%);
    transform: translateY(-8px) scale(1.01);
}
.feature-icon {
    box-shadow: 0 8px 24px rgba(122,29,45,0.12);
    position: relative;
}
.feature-icon::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed var(--burgundy);
    opacity: 0;
    transition: all var(--t);
    animation: spin360 20s linear infinite;
}
.feature-card:hover .feature-icon::before { opacity: 0.4; }

/* ────────────── Steps — connecting line ────────────── */
.steps-list { position: relative; }
.steps-list::before {
    content: '';
    position: absolute;
    top: 60px; bottom: 60px;
    inset-inline-start: 30px;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        var(--burgundy) 0 8px,
        transparent 8px 16px
    );
    opacity: 0.3;
}
@media (max-width: 700px) { .steps-list::before { display: none; } }
.step { position: relative; z-index: 1; }

/* ────────────── Awareness cards — color variation ────────────── */
.awareness-card:nth-child(1) .icon-circle { background: var(--burgundy-wash); color: var(--burgundy); }
.awareness-card:nth-child(2) .icon-circle { background: var(--blue-wash);     color: var(--blue); }
.awareness-card:nth-child(3) .icon-circle { background: rgba(184,146,84,0.16); color: var(--gold); }
.awareness-card:nth-child(4) .icon-circle { background: rgba(155,44,44,0.10);  color: var(--danger); }
.awareness-card:nth-child(5) .icon-circle { background: rgba(185,123,27,0.12); color: var(--warning); }
.awareness-card:nth-child(6) .icon-circle { background: rgba(59,107,71,0.12);  color: var(--success); }

.awareness-card:hover .icon-circle {
    transform: rotate(-8deg) scale(1.1);
    background: var(--burgundy);
    color: var(--ivory);
}

/* Card-cover overlay tint */
.card .card-cover { position: relative; }
.card .card-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(42,31,24,0.18) 100%);
    opacity: 0;
    transition: opacity var(--t);
    z-index: 1;
    pointer-events: none;
}
.card:hover .card-cover::before { opacity: 1; }

/* ────────────── CTA banner — animated background ────────────── */
.cta-banner {
    background: linear-gradient(135deg, var(--ink) 0%, var(--burgundy-dark) 100%);
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(184,146,84,0.20) 0%, transparent 40%),
        radial-gradient(circle at 80% 50%, rgba(122,29,45,0.30) 0%, transparent 40%);
    animation: drift 8s ease-in-out infinite;
}
.cta-banner h2 {
    background: linear-gradient(135deg, var(--ivory), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ────────────── Stats counters — glow + scale on visible ────────────── */
.stat-item .stat-number {
    background: linear-gradient(135deg, var(--gold), var(--burgundy-soft));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 24px rgba(184,146,84,0.25));
}
.facts-bar .stat-item {
    transition: transform var(--t);
}
.facts-bar .stat-item:hover { transform: translateY(-6px); }

/* Mini stats — accent color shift */
.mini-stat:nth-child(1) .mini-num { color: var(--burgundy); }
.mini-stat:nth-child(3) .mini-num { color: var(--blue); }
.mini-stat:nth-child(5) .mini-num { color: var(--gold); }
.mini-stat:nth-child(7) .mini-num {
    background: linear-gradient(135deg, var(--burgundy), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ────────────── Buttons — extra polish ────────────── */
.btn { letter-spacing: 0.3px; }
.btn-primary { box-shadow: 0 6px 18px rgba(122,29,45,0.22); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(122,29,45,0.36); }

/* Bouncy icon on btn hover */
.btn .icon { transition: transform var(--t); }
.btn:hover .icon { transform: translateX(-3px); }

/* ────────────── Family card — group photo feel ────────────── */
.family-card {
    background: linear-gradient(180deg, var(--ivory), var(--cream-2));
    position: relative;
    overflow: hidden;
}
.family-card::before {
    content: '';
    position: absolute;
    top: -60px; inset-inline-end: -60px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, var(--burgundy-wash), transparent 70%);
    transition: transform var(--t);
}
.family-card:hover::before { transform: scale(1.5); }
.family-photo {
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-soft));
    color: var(--ivory);
    box-shadow: 0 10px 28px rgba(122,29,45,0.18);
    border-color: var(--ivory);
}
.family-card:hover .family-photo {
    transform: scale(1.05) rotate(-3deg);
    transition: transform var(--t);
}

/* ────────────── Slider arrows — bigger and animated ────────────── */
.slider-arrow {
    box-shadow: 0 6px 18px rgba(60,36,20,0.10);
}
.slider-arrow:hover { animation: gentlePulse 1s ease-in-out infinite; }

/* ────────────── Footer — subtle gold accent ────────────── */
.site-footer {
    background: linear-gradient(180deg, var(--ink) 0%, #110D0A 100%);
    position: relative;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--burgundy), var(--gold), var(--blue), var(--gold), var(--burgundy));
    background-size: 200% 100%;
    animation: shiftGradient 12s linear infinite;
}
@keyframes shiftGradient {
    to { background-position: 200% 0; }
}
.footer-heading {
    position: relative;
    display: inline-block;
}
.footer-heading::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    bottom: -6px;
    width: 30px; height: 2px;
    background: var(--gold);
}

/* Social hover — bouncier */
.social-link {
    position: relative;
    overflow: hidden;
}
.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scale(0);
    border-radius: 50%;
    transition: transform var(--t);
}
.social-link:hover::before { transform: scale(1); }
.social-link .icon { position: relative; z-index: 1; }

/* ────────────── Page header — decorative accent ────────────── */
.page-header {
    background: linear-gradient(135deg, var(--cream-2) 0%, var(--burgundy-wash) 100%);
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    top: -50px; inset-inline-end: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, var(--gold), transparent 70%);
    opacity: 0.15;
    animation: drift 8s ease-in-out infinite;
}

.page-header h1 {
    background: linear-gradient(135deg, var(--ink), var(--burgundy));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ────────────── Read more arrows bounce ────────────── */
.read-more .icon, .card-link .icon {
    transition: transform var(--t-fast);
}
.awareness-card:hover .read-more { color: var(--burgundy); }
.awareness-card:hover .read-more .icon { transform: translateX(-6px); }
.card:hover .card-link .icon { animation: bounceLeft 0.6s ease-in-out infinite; }
@keyframes bounceLeft {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-6px); }
}

/* ────────────── Intro quote — bigger and more impactful ────────────── */
.intro-strip {
    background:
        radial-gradient(circle at 0% 50%, rgba(122,29,45,0.06), transparent 50%),
        radial-gradient(circle at 100% 50%, rgba(184,146,84,0.06), transparent 50%),
        var(--cream-2);
    position: relative;
    border-block: 1px solid var(--line);
}
.intro-quote-mark {
    background: linear-gradient(135deg, var(--gold), var(--burgundy));
    width: 64px; height: 64px;
    border-radius: 50%;
    color: var(--ivory) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(184,146,84,0.30);
    animation: drift 4s ease-in-out infinite;
}
.intro-quote-mark .icon { opacity: 1; width: 28px; height: 28px; }
.intro-quote {
    font-style: italic;
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    color: var(--ink);
}

/* ────────────── Final CTA — clean & elegant ────────────── */
.final-cta-card {
    background: var(--ivory);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.final-cta-card::before {
    content: '';
    position: absolute;
    top: 0; inset-inline-start: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--burgundy), var(--burgundy-soft));
}
.final-cta-card::after {
    content: '';
    position: absolute;
    top: -80px;
    inset-inline-end: -80px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, var(--burgundy-wash), transparent 70%);
    pointer-events: none;
}

/* ────────────── Detox cards — ribbon ────────────── */
.challenge-card {
    position: relative;
    overflow: hidden;
}
.challenge-card::before {
    content: '';
    position: absolute;
    top: 0; inset-inline-start: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--burgundy), var(--gold), var(--burgundy));
    background-size: 200% 100%;
    animation: shiftGradient 4s linear infinite;
    z-index: 5;
}

/* ────────────── Article images — more elegant ────────────── */
.article-body img {
    transition: transform var(--t);
    cursor: zoom-in;
}
.article-body img:hover { transform: scale(1.02); }

/* ────────────── Section transitions — alternating zigzag ────────────── */
.section:nth-of-type(even) .section-header { animation: fadeIn 0.8s var(--ease) both; }

/* ────────────── Page entry animation ────────────── */
.site-main {
    animation: pageIn 0.6s var(--ease);
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* ────────────── Smooth scroll snap on key sections ────────────── */
@media (min-width: 1024px) {
    html { scroll-padding-top: 100px; }
}

/* ────────────── Selection highlight ────────────── */
::selection {
    background: var(--burgundy);
    color: var(--ivory);
    text-shadow: none;
}

/* ────────────── Scrollbar styling ────────────── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--cream-2); }
::-webkit-scrollbar-thumb {
    background: var(--burgundy);
    border-radius: 999px;
    border: 3px solid var(--cream-2);
}
::-webkit-scrollbar-thumb:hover { background: var(--burgundy-dark); }

/* ────────────── Page-level fade-in for ALL elements (subtle) ────────────── */
@media (prefers-reduced-motion: no-preference) {
    .section > .container > * {
        animation: fadeUp 0.7s var(--ease) both;
    }
}

/* ────────────── Mobile improvements ────────────── */
@media (max-width: 640px) {
    .hero h1 { letter-spacing: -0.01em; }
    .feature-card { padding: var(--sp-8) var(--sp-6); }
    .step { padding: var(--sp-5) var(--sp-4); }
    .nav-cta { padding: 6px 12px; font-size: var(--fs-xs); }
}
