/* Custom CSS */

/* Smooth Scroll behavior is handled by html class="scroll-smooth" */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
    border: 2px solid #f8fafc;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    /* Star hidden */
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

/* Blob Animation adjustment */
@keyframes pulse-slow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* Utility Overrides if needed */
.rounded-btn {
    border-radius: 9999px !important;
}

/* Selection */
::selection {
    background: #097eb9;
    color: white;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out 2s infinite;
}

.animate-float-slow {
    animation: float 8s ease-in-out 1s infinite;
}

.hero-float-card {
    position: absolute;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: 13rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
    backdrop-filter: blur(12px);
    animation: float 6s ease-in-out infinite;
    color: #0f172a;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
}

.hero-float-card i {
    flex: 0 0 auto;
    font-size: 1.25rem;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.spotlight-card {
    position: relative;
    overflow: hidden;
    transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease, border-color .35s ease;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(9, 126, 185, .09), transparent 40%);
    transition: opacity .4s ease;
}

.spotlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, .12);
}

.spotlight-card:hover::before { opacity: 1; }
.spotlight-card > * { position: relative; z-index: 1; }

/* Problem stories: conversational problem/solution cards. */
.problem-story-card {
    --problem-accent: #0ea5e9;
    --problem-soft: rgba(14, 165, 233, .10);
    --problem-border: rgba(14, 165, 233, .22);
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.4rem;
    border: 1px solid var(--problem-border);
    border-radius: 1.75rem;
    background: linear-gradient(145deg, var(--problem-soft), rgba(255, 255, 255, .94) 58%);
    box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}

.problem-story-card--violet { --problem-accent: #9333ea; --problem-soft: rgba(147, 51, 234, .09); --problem-border: rgba(147, 51, 234, .20); }
.problem-story-card--rose { --problem-accent: #ef4444; --problem-soft: rgba(239, 68, 68, .08); --problem-border: rgba(239, 68, 68, .20); }
.problem-story-card--blue { --problem-accent: #0284c7; --problem-soft: rgba(2, 132, 199, .09); --problem-border: rgba(2, 132, 199, .20); }
.problem-story-card--emerald { --problem-accent: #059669; --problem-soft: rgba(5, 150, 105, .09); --problem-border: rgba(5, 150, 105, .20); }

.problem-conversation { display: grid; gap: 1rem; }
.problem-message { display: flex; align-items: flex-start; gap: .8rem; min-width: 0; }
.problem-message--solution { justify-content: flex-end; padding-left: 12%; }
.problem-message-content { flex: 1 1 auto; min-width: 0; }
.problem-message--solution .problem-message-content { text-align: right; }

.problem-avatar {
    width: 3.8rem;
    height: 3.8rem;
    flex: 0 0 3.8rem;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, .95);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
    overflow: hidden;
}

.problem-avatar--client { display: grid; place-items: center; background: var(--problem-accent); color: #fff; font-size: 1.25rem; }
.problem-avatar--simone { object-fit: cover; object-position: center; }
.problem-speaker { display: block; margin: 0 .45rem .35rem; color: var(--problem-accent); font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.problem-bubble {
    position: relative;
    margin: 0;
    padding: .8rem 1rem;
    border-radius: 1rem;
    color: #1e293b;
    font-size: .88rem;
    line-height: 1.55;
}

.problem-bubble--client { background: rgba(255, 255, 255, .94); box-shadow: 0 8px 24px rgba(15, 23, 42, .06); font-style: italic; }
.problem-bubble--client::before { content: '\201C'; }
.problem-bubble--client::after { content: '\201D'; }
.problem-bubble--solution { background: var(--problem-soft); }

.problem-card-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .85rem;
    min-height: 3.8rem;
    overflow: hidden;
    border: 1px solid var(--problem-border);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .9);
    color: #0f172a;
    transition: transform .25s ease, box-shadow .25s ease;
}

.problem-card-link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .08); }
.problem-card-icon { align-self: stretch; display: grid; width: 3.8rem; place-items: center; border-right: 1px solid var(--problem-border); color: var(--problem-accent); font-size: 1.25rem; }
.problem-card-link h3 { padding: .75rem 0; font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.problem-card-cta { display: inline-flex; align-items: center; gap: .55rem; padding-right: 1rem; color: var(--problem-accent); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.problem-card-cta i { transition: transform .2s ease; }
.problem-card-link:hover .problem-card-cta i { transform: translateX(3px); }
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    margin-left: 4px;
    background: #097eb9;
    animation: typewriter-blink 1s step-end infinite;
}

@keyframes typewriter-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Shared visual language for every internal page. */
.page-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
    backdrop-filter: blur(12px);
}

.legal-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
}

.legal-content h1 { color: #0f172a; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; }
.legal-content h2 { color: #0f172a; font-size: 1.35rem; font-weight: 700; margin-top: 2rem; margin-bottom: .5rem; }
.legal-content p { color: #475569; line-height: 1.75; }

@media (max-width: 640px) {
    .hero-float-card { max-width: 10.5rem; padding: .65rem .75rem; font-size: .68rem; }
}

/* Custom Green Button Hover */
.bg-green-500:hover,
.bg-green:hover {
    opacity: 0.9;
}

/* New Blob Movement Animation */
@keyframes blob-move {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob-move 10s infinite;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.js-scroll-fadeup {
    opacity: 0;
    transform: translate3d(0, 42px, 0);
    transition: opacity 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.js-scroll-fadeup.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {

    .js-scroll-fadeup,
    .js-scroll-fadeup.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reveal-on-scroll,
    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-float,
    .animate-float-delayed,
    .animate-float-slow,
    .hero-float-card,
    .typewriter-cursor { animation: none; }
}

.seo-link-card {
    background: linear-gradient(145deg, #0f172a 0%, #131f3b 50%, #0b1229 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.seo-link-card-bg {
    background:
        radial-gradient(140% 90% at 100% 0%, rgba(14, 165, 233, 0.35) 0%, rgba(14, 165, 233, 0) 55%),
        radial-gradient(120% 80% at 0% 100%, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0) 60%);
}

.seo-link-card-icon-bg {
    position: absolute;
    right: -28px;
    bottom: -20px;
    width: 180px;
    height: 180px;
    opacity: 0.14;
    filter: drop-shadow(0 0 22px rgba(125, 211, 252, 0.42));
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.seo-link-card-shine {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.45s ease, transform 0.7s ease;
    transform: translateX(-32%);
}

.seo-link-card:hover {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.seo-link-card:hover .seo-link-card-icon-bg {
    transform: scale(1.08) translate(-6px, -6px);
    opacity: 0.2;
}

.seo-link-card:hover .seo-link-card-shine {
    opacity: 1;
    transform: translateX(20%);
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.85rem;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.cookie-banner__text {
    margin: 0 0 0.75rem;
    line-height: 1.4;
    font-size: 0.92rem;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.cookie-banner__btn,
.cookie-banner__link {
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
}

.cookie-banner__btn {
    border: 0;
    cursor: pointer;
}

.cookie-banner__btn--primary {
    background: #22c55e;
    color: #fff;
}

.cookie-banner__btn--secondary {
    background: #334155;
    color: #f8fafc;
}

.cookie-banner__link {
    color: #93c5fd;
    text-decoration: underline;
}

@media (min-width: 768px) {
    .cookie-banner {
        left: 2rem;
        right: 2rem;
        max-width: 880px;
        margin: 0 auto;
    }
}

.page-transition {
    transition: opacity 220ms ease, transform 220ms ease;
    opacity: 1;
    transform: translateY(0);
}

.page-transition.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.page-transition.is-entering {
    opacity: 0;
    transform: translateY(8px);
}
/* Responsive and RTL refinements for problem stories. */
[dir="rtl"] .problem-message--solution { padding-left: 0; padding-right: 12%; }
[dir="rtl"] .problem-message--solution .problem-message-content { text-align: left; }
[dir="rtl"] .problem-card-icon { border-right: 0; border-left: 1px solid var(--problem-border); }
[dir="rtl"] .problem-card-cta { padding-right: 0; padding-left: 1rem; }
[dir="rtl"] .problem-card-cta i { transform: rotate(180deg); }
[dir="rtl"] .problem-card-link:hover .problem-card-cta i { transform: rotate(180deg) translateX(3px); }

@media (max-width: 640px) {
    .problem-story-card { padding: 1rem; border-radius: 1.4rem; }
    .problem-message--solution { padding-left: 4%; }
    [dir="rtl"] .problem-message--solution { padding-left: 0; padding-right: 4%; }
    .problem-avatar { width: 3.15rem; height: 3.15rem; flex-basis: 3.15rem; }
    .problem-bubble { padding: .72rem .85rem; font-size: .82rem; }
    .problem-card-link { grid-template-columns: auto minmax(0, 1fr); gap: .7rem; }
    .problem-card-icon { width: 3.3rem; }
    .problem-card-link h3 { padding-right: .8rem; font-size: .92rem; }
    .problem-card-cta { grid-column: 2; padding: 0 .8rem .75rem 0; white-space: normal; }
    [dir="rtl"] .problem-card-link h3 { padding-right: 0; padding-left: .8rem; }
    [dir="rtl"] .problem-card-cta { padding: 0 0 .75rem .8rem; }
}
