/* jordanai.tech overrides — polish layer on top of Framer static export.
   Keep selectors conservative; use !important only where Framer's inline
   styles or high-specificity selectors require it. */

/* ===== 1. Global reset: prevent mobile horizontal scroll ===== */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }

/* ===== 2. Responsive tightening for Framer sections on mobile ===== */
@media (max-width: 810px) {
    /* Framer often sets huge horizontal padding on its section wrappers.
         Clamp it so content doesn't overflow/cut off on small viewports. */
    [data-framer-name="Section"],
    [data-framer-name*="Hero"],
    [data-framer-name*="CTA"],
    .framer-body-2 section,
    .framer-body-2 > div > div {
        padding-left: clamp(16px, 4vw, 24px) !important;
        padding-right: clamp(16px, 4vw, 24px) !important;
        max-width: 100vw;
    }

    /* Force long single-word/glued text to wrap rather than overflow. */
    p, h1, h2, h3, h4, .framer-text {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /* Collapse multi-column grids to single column on phones as a
         defensive fallback (Framer usually handles this but some nested
         grids slip through). */
    [data-framer-name*="Grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Reduce giant display headings on phones so they fit. */
    h1, .framer-styles-preset-display, [class*="display-"] h1 {
        font-size: clamp(36px, 9vw, 56px) !important;
        line-height: 1.1 !important;
    }
}

/* ===== 3. Accessibility: visible focus ring ===== */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[data-framer-component-type="RichTextContainer"] a:focus-visible {
    outline: 2px solid #00d4ff !important;
    outline-offset: 3px !important;
    border-radius: 4px;
}

/* Improve CTA contrast: Framer's primary button can appear low-contrast
   against dark gradients. Force a solid high-contrast palette. */
a[data-framer-name*="CTA"],
a[data-framer-name*="Button"][data-framer-name*="Primary"],
[data-framer-name="Primary CTA"] {
    color: #ffffff !important;
}
a[data-framer-name*="CTA"]:hover,
[data-framer-name="Primary CTA"]:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    transition: transform 120ms ease, filter 120ms ease;
}

/* ===== 4. Motion preferences ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== 5. Loading state helper (added by overrides.js when a form/button
   is in flight). Purely visual. ===== */
[data-loading="true"] {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}
[data-loading="true"]::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jai-spin 0.7s linear infinite;
}
@keyframes jai-spin { to { transform: rotate(360deg); } }

/* ===== 6. Skip link (injected by overrides.js) ===== */
.jai-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #0b0b0b;
    color: #fff;
    padding: 12px 16px;
    z-index: 10000;
    text-decoration: none;
    font: 500 14px/1.2 system-ui, sans-serif;
}
.jai-skip-link:focus {
    left: 8px;
    top: 8px;
    outline: 2px solid #00d4ff;
}

/* ===== 7. Image rendering polish ===== */
img {
    max-width: 100%;
    height: auto;
}
