/* ==========================================================
   TESTIMONIALS FLOAT – Shopify Editions inspired
   ========================================================== */

.tf-section {
    position: relative;
    padding: 7em 0 6em;
    overflow: hidden;
    background: #f8f7f5;
}

.tf-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.tf-header {
    position: relative;
    z-index: 10;
    text-align: left;
    padding: 0 6vw 0;
    margin-bottom: 0;
    pointer-events: none;
}

.tf-title {
    font-size: clamp(2.4em, 4vw, 3.2em);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: #1a1612;
    font-family: "DM Serif Display", "Georgia", serif;
    margin: 0;
}

.tf-stage {
    position: relative;
    width: 100%;
    height: 620px;
    z-index: 1;
}

/* ==========================================================
   CARDS – blurry by default, readable on hover
   ========================================================== */

.tf-card {
    position: absolute;
    width: clamp(220px, 22vw, 310px);
    background: #ffffff;
    border-radius: 1.6em;
    padding: 1.5em 1.6em 1.2em;
    box-shadow:
        0 0.6em 2em rgba(15, 20, 34, 0.06),
        0 0.15em 0.5em rgba(15, 20, 34, 0.04);
    border: 1px solid rgba(15, 20, 34, 0.06);
    cursor: default;
    will-change: transform, opacity;
    opacity: 0.22;
    filter: blur(2.5px) saturate(0.5);
    transition:
        opacity 0.5s cubic-bezier(.22, 1, .36, 1),
        filter 0.5s cubic-bezier(.22, 1, .36, 1),
        box-shadow 0.5s cubic-bezier(.22, 1, .36, 1),
        border-color 0.5s ease,
        transform 0.45s cubic-bezier(.22, 1, .36, 1);
}

.tf-card:hover {
    opacity: 1;
    filter: none;
    z-index: 20;
    box-shadow:
        0 2em 5em rgba(79, 70, 255, 0.13),
        0 0.6em 1.8em rgba(15, 20, 34, 0.09),
        0 0 0 1.5px rgba(79, 70, 255, 0.18);
    border-color: rgba(79, 70, 255, 0.15);
    transform: translateY(-6px) scale(1.022) !important;
}

.tf-card::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 1.9em;
    border: 1.5px solid transparent;
    pointer-events: none;
    transition: border-color 0.5s ease;
}

.tf-card:hover::after {
    border-color: rgba(79, 70, 255, 0.14);
    animation: tfGlowPulse 2.5s ease-in-out infinite;
}

@keyframes tfGlowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.012); }
}

/* Card internals */
.tf-card-stars {
    display: flex;
    gap: 0.15em;
    margin-bottom: 0.85em;
}

.tf-star {
    width: 0.9em;
    height: 0.9em;
    fill: #f59e0b;
}

.tf-card-text {
    font-size: 0.9em;
    line-height: 1.65;
    color: #2d2822;
    margin-bottom: 1.2em;
    font-family: "DM Sans", system-ui, sans-serif;
    font-weight: 400;
}

.tf-card-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tf-card-meta {
    display: flex;
    align-items: center;
    gap: 0.65em;
}

.tf-avatar {
    width: 2.1em;
    height: 2.1em;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46ff, #c026ff);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.8em;
    font-family: "DM Sans", system-ui, sans-serif;
    flex-shrink: 0;
    box-shadow: 0 0.3em 0.9em rgba(79, 70, 255, 0.3);
}

.tf-author-info {
    display: flex;
    flex-direction: column;
}

.tf-author-name {
    font-size: 0.8em;
    font-weight: 700;
    color: #1a1612;
    font-family: "DM Sans", system-ui, sans-serif;
    line-height: 1.2;
}

.tf-author-role {
    font-size: 0.72em;
    color: #9c8f7e;
    font-weight: 400;
    font-family: "DM Sans", system-ui, sans-serif;
    line-height: 1.2;
}

.tf-send-btn {
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4f46ff, #c026ff);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 0.3em 1em rgba(79, 70, 255, 0.4);
    opacity: 0;
    transform: scale(0.7);
    transition:
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}

.tf-card:hover .tf-send-btn {
    opacity: 1;
    transform: scale(1);
}

.tf-send-icon {
    width: 0.85em;
    height: 0.85em;
    fill: #fff;
}

/* Float animations */
@keyframes tfFloat0 {
    0%   { transform: translate(0, 0) rotate(-1.5deg); }
    25%  { transform: translate(8px, -12px) rotate(0.5deg); }
    50%  { transform: translate(14px, -6px) rotate(1.2deg); }
    75%  { transform: translate(5px, -18px) rotate(-0.8deg); }
    100% { transform: translate(0, 0) rotate(-1.5deg); }
}
@keyframes tfFloat1 {
    0%   { transform: translate(0, 0) rotate(1deg); }
    30%  { transform: translate(-10px, -8px) rotate(-0.5deg); }
    60%  { transform: translate(-6px, -20px) rotate(1.5deg); }
    100% { transform: translate(0, 0) rotate(1deg); }
}
@keyframes tfFloat2 {
    0%   { transform: translate(0, 0) rotate(0.8deg); }
    20%  { transform: translate(12px, -10px) rotate(-1deg); }
    55%  { transform: translate(4px, -22px) rotate(0.5deg); }
    80%  { transform: translate(-8px, -8px) rotate(-0.3deg); }
    100% { transform: translate(0, 0) rotate(0.8deg); }
}
@keyframes tfFloat3 {
    0%   { transform: translate(0, 0) rotate(-0.6deg); }
    35%  { transform: translate(-12px, -14px) rotate(0.8deg); }
    65%  { transform: translate(-4px, -6px) rotate(-1.2deg); }
    100% { transform: translate(0, 0) rotate(-0.6deg); }
}
@keyframes tfFloat4 {
    0%   { transform: translate(0, 0) rotate(1.4deg); }
    40%  { transform: translate(10px, -18px) rotate(-0.5deg); }
    70%  { transform: translate(16px, -10px) rotate(0.9deg); }
    100% { transform: translate(0, 0) rotate(1.4deg); }
}
@keyframes tfFloat5 {
    0%   { transform: translate(0, 0) rotate(-1.2deg); }
    45%  { transform: translate(-8px, -16px) rotate(0.7deg); }
    75%  { transform: translate(-14px, -4px) rotate(-0.4deg); }
    100% { transform: translate(0, 0) rotate(-1.2deg); }
}

@media (max-width: 900px) {
    .tf-stage { height: 740px; }
    .tf-card  { width: clamp(200px, 52vw, 280px); }
}
@media (max-width: 600px) {
    .tf-section { padding: 5em 0 4em; }
    .tf-stage   { height: 880px; }
    .tf-card    { width: clamp(180px, 75vw, 260px); }
}

.tf-avatar-img {
    object-fit: cover;
    border-radius: 50%;
    background: none;
    color: transparent;
}