/* =========================================================
   Khadoom — Creative Edition
   ========================================================= */

:root {
    --brand: #0461a5;
    --brand-2: #003d6b;
    --brand-3: #6caedb;
    --brand-soft: #eaf4fb;
    --accent: #ffd166;
    --pop: #ef476f;
    --ink: #0b0d10;
    --ink-50: #f5f7fa;
    --ink-100: #e7ebef;
    --ink-300: #a4adba;
    --ink-500: #525a66;
    --ink-700: #222730;
    --ink-800: #15181d;
    --ink-900: #0b0d10;
}

/* ---------- Resilient baseline (works without Tailwind) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--ink-50);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    line-height: 1.5;
}
.dark body { background: var(--ink-900); color: var(--ink-100); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-family: "Space Grotesk", "Inter", sans-serif; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
section { position: relative; }

/* HARD font caps so nothing balloons */
h1 { font-size: clamp(1.5rem, 2.6vw, 2.25rem) !important; line-height: 1.1 !important; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.85rem) !important; line-height: 1.15 !important; }
h3 { font-size: clamp(1rem, 1.3vw, 1.15rem) !important; }
h4 { font-size: clamp(.95rem, 1.2vw, 1.05rem) !important; }
.mega-title { font-size: clamp(1.5rem, 2.6vw, 2.25rem) !important; line-height: 1.1 !important; }
.editorial-quote { font-size: clamp(1.15rem, 1.8vw, 1.5rem) !important; line-height: 1.25 !important; }
.megastat .num { font-size: clamp(1.5rem, 2.2vw, 2rem) !important; }
.bento-card.feature h3 { font-size: 1.35rem !important; }
.ticker-track { font-size: clamp(.95rem, 1.4vw, 1.15rem) !important; }
.cta-mega::before { font-size: clamp(2.5rem, 6vw, 5rem) !important; }

/* tighter section spacing */
section { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
.hero { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

/* container fallback */
.max-w-7xl { max-width: 80rem; margin-inline: auto; }
.px-6 { padding-inline: 1.5rem; }


/* ---------- Scroll reveal ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px) scale(.98);
    transition: opacity 1s cubic-bezier(.16,.84,.32,1), transform 1s cubic-bezier(.16,.84,.32,1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }
[data-reveal-delay="4"] { transition-delay: .4s; }
[data-reveal-delay="5"] { transition-delay: .5s; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    padding: 3rem 0 3rem;
    overflow: hidden;
}
@media (min-width: 1024px) { .hero { padding: 4rem 0 3rem; } }
.hero-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(4,97,165,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(4,97,165,.08) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 25%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 25%, transparent 80%);
    pointer-events: none;
}
.hero-blob {
    position: absolute; border-radius: 9999px;
    filter: blur(120px); opacity: .5; pointer-events: none;
    animation: drift 18s ease-in-out infinite;
}
@keyframes drift {
    0%,100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(40px,-20px) scale(1.1); }
    66% { transform: translate(-30px,30px) scale(.9); }
}

.mega-title {
    font-family: "Space Grotesk", Inter, sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
    word-break: break-word;
}
.mega-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-3) 50%, var(--brand-2) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding-right: .15em;
}
.mega-title em::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: .1em;
    height: .08em;
    background: var(--brand);
    transform: scaleX(0); transform-origin: left;
    animation: underline 1.2s cubic-bezier(.16,.84,.32,1) .5s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

/* ---------- Hero CTAs (uniform size) ---------- */
.hero-cta-row {
    display: flex; flex-wrap: wrap; gap: .75rem;
    align-items: stretch;
}
.hero-cta {
    display: inline-flex; align-items: center; gap: .75rem;
    width: 175px; height: 58px;
    padding: 0 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 14px rgba(15,23,42,.08);
    transition: transform .25s, box-shadow .25s;
}
.hero-cta:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,23,42,.16); }
.hero-cta-ico { width: 24px; height: 24px; flex-shrink: 0; }
.hero-cta-stack { display: flex; flex-direction: column; line-height: 1.1; text-align: start; min-width: 0; }
.hero-cta-sub { font-size: .68rem; opacity: .7; }
.hero-cta-main { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.hero-cta--dark { background: var(--ink-900); color: white; }
.dark .hero-cta--dark { background: white; color: var(--ink-900); }
.hero-cta--brand { background: var(--brand); color: white; }
.hero-cta--brand:hover { background: var(--brand-2); color: white; }
@media (max-width: 420px) { .hero-cta { width: 100%; } }

.eyebrow-tag {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .35rem .75rem;
    background: var(--ink); color: white;
    font-size: .65rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
    border-radius: 9999px;
    box-shadow: 3px 3px 0 var(--brand);
}
.eyebrow-tag::before {
    content: ""; width: 8px; height: 8px; border-radius: 9999px;
    background: var(--accent); box-shadow: 0 0 12px var(--accent);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .4; } }

/* ---------- Hero collage ---------- */
.hero-collage {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 460px;
    margin: 0 auto;
}
.hero-collage .frame {
    position: absolute;
    overflow: hidden;
    border-radius: 1.75rem;
    box-shadow: 0 30px 60px -20px rgba(4,97,165,.35);
    transition: transform .6s cubic-bezier(.16,.84,.32,1);
}
.hero-collage .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-collage .f1 { top: 0; left: 0; width: 58%; height: 60%; transform: rotate(-4deg); animation: bobA 8s ease-in-out infinite; }
.hero-collage .f2 { top: 5%; right: 0; width: 42%; height: 38%; transform: rotate(5deg); animation: bobB 10s ease-in-out infinite; }
.hero-collage .f3 { bottom: 0; left: 10%; width: 40%; height: 38%; transform: rotate(6deg); animation: bobB 9s ease-in-out infinite reverse; }
.hero-collage .f4 { bottom: 6%; right: 4%; width: 50%; height: 50%; transform: rotate(-3deg); animation: bobA 11s ease-in-out infinite reverse; }
@keyframes bobA { 0%,100% { translate: 0 0; } 50% { translate: 0 -18px; } }
@keyframes bobB { 0%,100% { translate: 0 0; } 50% { translate: 0 14px; } }

.sticker {
    position: absolute; z-index: 5;
    background: var(--accent);
    color: var(--ink);
    font-weight: 900;
    padding: .85rem 1.1rem;
    border-radius: 9999px;
    font-size: .9rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    transform: rotate(-12deg);
    animation: wobble 4s ease-in-out infinite;
}
@keyframes wobble {
    0%,100% { transform: rotate(-12deg); }
    50% { transform: rotate(-6deg) scale(1.05); }
}
.sticker.s1 { top: 8%; right: -10px; }
.sticker.s2 { bottom: 12%; left: -16px; background: var(--pop); color: white; transform: rotate(8deg); animation-delay: -1s; }

/* ---------- Ticker ---------- */
.ticker {
    background: var(--ink); color: white;
    overflow: hidden;
    border-block: 1px solid var(--ink);
    padding: .85rem 0;
    position: relative;
}
.ticker-track {
    display: inline-flex; gap: 2rem;
    animation: tickerMove 30s linear infinite;
    white-space: nowrap;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.6rem);
    letter-spacing: -.02em;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 3rem; }
.ticker-track span::after {
    content: "✦"; color: var(--accent); font-size: .8em;
}
[dir="rtl"] .ticker-track { animation-direction: reverse; }
@keyframes tickerMove { to { transform: translateX(-50%); } }

/* =========================================================
   BENTO SERVICES
   ========================================================= */
.bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: .9rem;
}
@media (max-width: 1024px) { .bento { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; grid-auto-rows: minmax(180px, auto); } }

.bento-card {
    position: relative; overflow: hidden;
    border-radius: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e7ebef;
    transition: transform .5s cubic-bezier(.16,.84,.32,1), box-shadow .5s;
    text-align: start;
    cursor: pointer;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 180px;
}
.dark .bento-card { background: #15181d; border-color: #222730; color: #e7ebef; }

.bento-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 24px 60px -20px rgba(4,97,165,.35); }

.bento-card .num {
    position: absolute; top: 1rem; inset-inline-end: 1.25rem;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700; font-size: 1rem;
    color: rgba(0,0,0,.2);
    z-index: 1;
}
.dark .bento-card .num { color: rgba(255,255,255,.18); }

.bento-card .ico {
    width: 56px; height: 56px;
    border-radius: 1rem;
    background: var(--brand-soft);
    display: flex; align-items: center; justify-content: center;
    transition: transform .4s, rotate .4s;
}
.bento-card:hover .ico { transform: scale(1.05); rotate: -8deg; }
.bento-card .ico img { width: 32px; height: 32px; object-fit: contain; }
.dark .bento-card .ico { background: rgba(4,97,165,.2); }

.bento-card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700; font-size: 1.15rem;
    margin: .8rem 0 .3rem;
    letter-spacing: -.02em;
}
.bento-card p { font-size: .9rem; color: #525a66; line-height: 1.5; }
.dark .bento-card p { color: #a4adba; }

.bento-card .arrow-pill {
    margin-top: 1.25rem;
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem;
    border-radius: 9999px;
    background: var(--ink); color: white;
    font-size: .8rem; font-weight: 600;
    width: fit-content;
    transition: background .3s, transform .3s;
}
.bento-card:hover .arrow-pill { background: var(--brand); transform: translateX(4px); }
[dir="rtl"] .bento-card:hover .arrow-pill { transform: translateX(-4px); }

/* size variants */
.bento-card.feature {
    grid-column: span 4;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: white;
    border: none;
}
.bento-card.feature .ico { background: rgba(255,255,255,.2); }
.bento-card.feature p { color: rgba(255,255,255,.85); }
.bento-card.feature .num { color: rgba(255,255,255,.4); }
.bento-card.feature h3 { font-size: 1.85rem; }
.bento-card.feature .arrow-pill { background: white; color: var(--brand); }
.bento-card.tall { grid-column: span 2; grid-row: span 2; }
.bento-card.wide { grid-column: span 4; }
.bento-card.std { grid-column: span 2; }
@media (max-width: 1024px) {
    .bento-card.feature { grid-column: span 3; grid-row: span 2; }
    .bento-card.tall { grid-column: span 1; grid-row: span 2; }
    .bento-card.wide { grid-column: span 2; }
    .bento-card.std { grid-column: span 1; }
}
@media (max-width: 640px) {
    .bento-card.feature, .bento-card.tall, .bento-card.wide, .bento-card.std { grid-column: span 1; grid-row: span 1; }
}

/* glow follow */
.bento-card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.18), transparent 50%);
    opacity: 0; transition: opacity .3s; pointer-events: none;
}
.bento-card.feature:hover::before { opacity: 1; }

/* =========================================================
   SERVICE GRID — clean cards
   ========================================================= */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
@media (max-width: 1024px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .svc-grid { grid-template-columns: 1fr; } }

.svc-card {
    text-align: start;
    background: white;
    border: 1px solid #e7ebef;
    border-radius: 1.25rem;
    overflow: hidden;
    cursor: pointer;
    display: flex; flex-direction: column;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.dark .svc-card { background: #15181d; border-color: #222730; color: #e7ebef; }
.svc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -16px rgba(4,97,165,.25);
    border-color: rgba(4,97,165,.35);
}
.svc-card-img {
    aspect-ratio: 16/10;
    display: flex; align-items: center; justify-content: center;
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
    overflow: hidden;
}
.svc-card-img img {
    width: 56%; height: 56%;
    object-fit: contain;
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.svc-card:hover .svc-card-img img { transform: scale(1.08) rotate(-4deg); }
.svc-card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .65rem; }
.svc-card-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1.05rem !important;
    line-height: 1.2 !important;
    letter-spacing: -.015em;
    margin: 0;
}
.svc-card-meta {
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: wrap;
}
.svc-pill {
    padding: .25rem .55rem;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.svc-zone {
    font-size: .72rem;
    color: #525a66;
    letter-spacing: .01em;
}
.dark .svc-zone { color: #a4adba; }
.svc-card-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: .25rem; padding-top: .75rem;
    border-top: 1px dashed #e7ebef;
}
.dark .svc-card-foot { border-top-color: #222730; }
.svc-cta { font-size: .78rem; font-weight: 600; letter-spacing: -.01em; }
.svc-arrow {
    width: 30px; height: 30px;
    border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    color: white;
    transition: transform .3s;
}
.svc-card:hover .svc-arrow { transform: translateX(3px) scale(1.08); }
[dir="rtl"] .svc-card:hover .svc-arrow { transform: translateX(-3px) scale(1.08); }

/* =========================================================
   ABOUT — magazine editorial
   ========================================================= */
.editorial {
    position: relative;
}
.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: center;
}
@media (max-width: 900px) { .editorial-grid { grid-template-columns: 1fr; } }

.editorial-photo {
    position: relative;
    max-width: 480px;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: -16px 24px 50px -20px rgba(4,97,165,.4);
}
.editorial-photo img { width: 100%; height: auto; display: block; }
.editorial-photo::after {
    content: "EST. 2024"; position: absolute;
    top: 1.5rem; left: 1.5rem;
    background: var(--accent); color: var(--ink);
    padding: .4rem .8rem; border-radius: 9999px;
    font-size: .7rem; font-weight: 800; letter-spacing: .15em;
}

.editorial-quote {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -.01em;
}
.editorial-quote span {
    background: linear-gradient(120deg, var(--brand) 0%, var(--brand-3) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================================
   MEGA STATS
   ========================================================= */
.megastats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2.5rem 0;
    border-block: 1px solid #e7ebef;
}
.dark .megastats { border-color: #222730; }
@media (max-width: 768px) { .megastats { grid-template-columns: repeat(2, 1fr); } }

.megastat {
    border-inline-start: 4px solid var(--brand);
    padding-inline-start: 1.5rem;
}
.megastat .num {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
    font-size: clamp(1.85rem, 2.6vw, 2.5rem);
    line-height: 1;
    letter-spacing: -.02em;
    background: linear-gradient(180deg, var(--ink) 0%, var(--brand) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dark .megastat .num { background: linear-gradient(180deg, white 0%, var(--brand-3) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.megastat .lbl { font-size: .85rem; color: #525a66; margin-top: .5rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.dark .megastat .lbl { color: #a4adba; }

/* =========================================================
   PHONE SHOWCASE — 3D tilt
   ========================================================= */
.showcase {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0;
}
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}
@media (max-width: 900px) { .showcase-grid { grid-template-columns: 1fr; } }

.phone-stage {
    perspective: 1200px;
    aspect-ratio: 1/1;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.phone-frame {
    position: relative;
    aspect-ratio: 9 / 19;
    width: min(220px, 70%);
    border-radius: 2.2rem;
    padding: 10px;
    background: linear-gradient(140deg, #0b0d10, #2a2f3a 100%);
    box-shadow: 0 40px 80px -20px rgba(4,97,165,.55), 0 16px 40px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.05);
    transform: rotateY(-12deg) rotateX(6deg);
    transition: transform .6s cubic-bezier(.16,.84,.32,1);
}
.phone-frame:hover { transform: rotateY(-6deg) rotateX(3deg) scale(1.03); }
.phone-frame::before {
    content: ""; position: absolute; top: 14px; left: 50%;
    transform: translateX(-50%); width: 100px; height: 26px;
    background: #0b0d10; border-radius: 0 0 16px 16px; z-index: 5;
}
.phone-screen { width: 100%; height: 100%; border-radius: 2rem; overflow: hidden; background: var(--brand-soft); position: relative; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-screen { position: absolute; inset: 0; transition: opacity .6s; }

.feature-list { display: flex; flex-direction: column; gap: .5rem; }
.feature-tab {
    text-align: start; padding: 1rem 1.15rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: all .3s;
    background: transparent;
    width: 100%; cursor: pointer;
}
.feature-tab:hover { background: rgba(4,97,165,.04); }
.dark .feature-tab:hover { background: rgba(108,174,219,.08); }
.feature-tab.is-active {
    background: white;
    border-color: var(--brand);
    box-shadow: 0 20px 40px -20px rgba(4,97,165,.3);
}
.dark .feature-tab.is-active { background: #15181d; }
.feature-tab .ftnum {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700; font-size: .9rem;
    color: var(--brand);
    letter-spacing: .15em;
}
.feature-tab h4 { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.15rem; margin-top: .25rem; letter-spacing: -.02em; }
.feature-tab p { font-size: .9rem; color: #525a66; margin-top: .35rem; }
.dark .feature-tab p { color: #a4adba; }

/* =========================================================
   PROVIDER CTA
   ========================================================= */
.cta-mega {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 70%);
    color: white;
    padding: 2rem 1.75rem;
}
.cta-mega::before {
    content: "JOIN • JOIN • JOIN • JOIN • JOIN • JOIN •";
    position: absolute;
    bottom: -.5em; left: 0; right: 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1;
    letter-spacing: -.04em;
    color: rgba(255,255,255,.08);
    white-space: nowrap;
    pointer-events: none;
    animation: ctaScroll 25s linear infinite;
}
@keyframes ctaScroll { to { transform: translateX(-30%); } }

/* =========================================================
   TESTIMONIALS — stacked diagonal
   ========================================================= */
.testi-marquee {
    display: flex; gap: 1.25rem;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    padding: 2rem 0;
}
.testi-track {
    display: flex; gap: 1.25rem;
    animation: testiMove 45s linear infinite;
    min-width: max-content;
}
.testi-marquee:hover .testi-track { animation-play-state: paused; }
@keyframes testiMove { to { transform: translateX(-50%); } }
[dir="rtl"] .testi-track { animation-direction: reverse; }

.testi-card {
    width: 320px; flex-shrink: 0;
    background: white;
    border: 1px solid #e7ebef;
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: transform .4s;
}
.dark .testi-card { background: #15181d; border-color: #222730; }
.testi-card:nth-child(2n) { transform: rotate(1.5deg); }
.testi-card:nth-child(3n) { transform: rotate(-1.5deg); }
.testi-card:hover { transform: rotate(0) translateY(-6px); }

.testi-card .quote-mark {
    font-family: "Space Grotesk", sans-serif;
    font-size: 4rem; line-height: .5;
    color: var(--brand);
    font-weight: 800;
}

/* =========================================================
   CATEGORY MODAL
   ========================================================= */
.cat-modal {
    position: fixed; inset: 0;
    background: rgba(11,13,16,.7); backdrop-filter: blur(12px);
    display: none; align-items: center; justify-content: center;
    z-index: 60; padding: 1rem;
}
.cat-modal.active { display: flex; animation: modalIn .3s; }
@keyframes modalIn { from { opacity: 0; } }
.cat-modal-inner {
    background: white; border-radius: 2rem;
    max-width: 920px; width: 100%; max-height: 90vh; overflow: auto;
    padding: 2.5rem; position: relative;
}
.dark .cat-modal-inner { background: #15181d; color: #e7ebef; }
.cat-modal-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 44px; height: 44px; border-radius: 9999px;
    background: var(--ink); color: white;
    display: flex; align-items: center; justify-content: center;
    transition: rotate .3s;
}
.cat-modal-close:hover { rotate: 90deg; }
[dir="rtl"] .cat-modal-close { right: auto; left: 1rem; }

/* =========================================================
   Utilities
   ========================================================= */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.font-display { font-family: "Space Grotesk", Inter, sans-serif; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    [data-reveal] { opacity: 1 !important; transform: none !important; }
}
