:root {
    --rav-color-ink:         #1c1c1e;
    --rav-color-ink-soft:    #2d2d2f;
    --rav-color-ink-muted:   #6b6b70;
    --rav-color-paper:       #f2f6f8;
    --rav-color-paper-soft:  #f5f2ed;
    --rav-color-cream:       #e8ded0;
    --rav-color-cream-deep:  #d9ccba;
    --rav-color-bronze:      #e5b89b;
    --rav-color-bronze-deep: #c89a7c;
    --rav-color-bronze-ink:  #8a5d41;

    --rav-tier-01-bg:     #88efad;
    --rav-tier-01-border: #22c55e;
    --rav-tier-01-ink:    #14532d;
    --rav-tier-03-bg:     #22c55e;
    --rav-tier-03-border: #16a34a;
    --rav-tier-03-ink:    #052e16;
    --rav-tier-05-bg:     #14532d;
    --rav-tier-05-border: #052e16;
    --rav-tier-05-ink:    #f0fdf4;

    --rav-radius-sm: 6px;
    --rav-radius-md: 14px;
    --rav-radius-lg: 28px;
    --rav-ease:      cubic-bezier(0.32, 0.72, 0, 1);

    --rav-font: 'Polin', var(--e-global-typography-text-font-family, system-ui), system-ui, sans-serif;
}

/* Force Polin on all Rav widgets and their descendants — independent of inheritance from <body> */
[class*="rav-"],
[class*="rav-"] *:not(i):not(svg):not(use) {
    font-family: var(--rav-font);
}

/* Prevent iOS Safari from auto-inflating text (a top cause of mobile-only
   horizontal overflow), and hard-guarantee that nothing exceeds the screen
   width on mobile/tablet — a safety net on top of the per-widget responsive
   fixes. No position:sticky exists below 1024px, so this is safe. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
@media (max-width: 1024px) {
    html, body { overflow-x: hidden; }
    [class*="rav-"] img { max-width: 100%; height: auto; }
}

/* ==========================================================================
   Reveal animation (fade + translateY + blur on enter viewport)
   Mirrors the React <Reveal> component — Framer-style.
   ========================================================================== */
.rav-reveal {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(8px);
    transition:
        opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 900ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}
.rav-reveal.is-revealed {
    opacity: 1;
    transform: none;
    filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
    .rav-reveal,
    .rav-reveal.is-revealed {
        opacity: 1; transform: none; filter: none; transition: none;
    }
}
/* Mobile/tablet: disable the scroll-entrance reveal entirely. Content is shown
   immediately with NO opacity/transform/blur and NO dependency on JavaScript.
   Rationale: iOS Safari intermittently fails to repaint elements that animate
   `filter: blur()` + `will-change`, leaving whole sections invisible even after
   the reveal class is applied. Desktop keeps the animation. */
@media (max-width: 1024px) {
    .rav-reveal,
    .rav-reveal.is-revealed {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
        will-change: auto !important;
    }
}

/* ==========================================================================
   Typewriter (Hero headline cycling text)
   ========================================================================== */
.rav-typewriter {
    display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
}
.rav-typewriter__line { display: block; }
.rav-typewriter__bronze { color: var(--rav-color-bronze); }
.rav-typewriter__cursor {
    display: inline-block;
    color: var(--rav-color-bronze);
    margin-inline-start: 2px;
    transition: opacity 60ms linear;
}

/* Shared primitives ---------------------------------------------------- */

.rav-widget-placeholder {
    padding: 24px;
    border: 1px dashed rgba(0, 0, 0, 0.18);
    border-radius: var(--rav-radius-md);
    background: rgba(0, 0, 0, 0.02);
    color: var(--rav-color-ink-muted);
    font-size: 18px;
    text-align: center;
}

.rav-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--rav-color-bronze);
}

.rav-tier {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 2px solid transparent;
    padding: 5px 14px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 1.1;
    white-space: nowrap;
}
.rav-tier--lg { font-size: 25px; padding: 8px 18px; border-width: 2px; }
.rav-tier--xl { font-size: 30px; padding: 10px 22px; border-width: 2px; }
.rav-tier--ai01 { background: var(--rav-tier-01-bg); border-color: var(--rav-tier-01-border); color: var(--rav-tier-01-ink); }
.rav-tier--ai03 { background: var(--rav-tier-03-bg); border-color: var(--rav-tier-03-border); color: var(--rav-tier-03-ink); }
.rav-tier--ai05 { background: var(--rav-tier-05-bg); border-color: var(--rav-tier-05-border); color: var(--rav-tier-05-ink); }

.rav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(229, 184, 155, 0.30);
    background: rgba(229, 184, 155, 0.05);
    color: rgba(245, 242, 237, 0.75);
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 15px;
    line-height: 1;
}
.rav-pill__icon {
    color: var(--rav-color-bronze);
    flex-shrink: 0;
    width: 14px !important; height: 14px !important;
}
/* Legacy classes — keep selectors but harmonized to the icon style */
.rav-pill__dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--rav-color-bronze);
}
.rav-pill--ghost {
    border-color: rgba(229, 184, 155, 0.30);
    background: rgba(229, 184, 155, 0.05);
    color: rgba(245, 242, 237, 0.75);
}

.rav-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rav-color-bronze);
    margin-top: 8px;
    flex-shrink: 0;
}

.rav-btn {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 9999px !important;
    font-size: 19px;
    font-weight: 500;
    text-decoration: none !important;
    transition: transform 200ms var(--rav-ease), background 200ms var(--rav-ease);
    cursor: pointer;
    border: 1px solid transparent !important;
    line-height: 1;
}
.rav-btn--primary,
.rav-btn--primary:link,
.rav-btn--primary:visited,
button.rav-btn--primary {
    background: #059669 !important;
    background-color: #059669 !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 12px 32px -12px rgba(5,150,105,0.6) !important;
    padding: 16px 28px !important;
    font-size: 20px !important;
}
.rav-btn--primary:hover,
button.rav-btn--primary:hover {
    background: #064e3b !important;
    background-color: #064e3b !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 16px 40px -10px rgba(5,150,105,0.7) !important;
}
.rav-btn--secondary,
a.rav-btn--secondary,
button.rav-btn--secondary {
    background: transparent !important;
    color: var(--rav-color-bronze) !important;
    border: 1px solid rgba(229, 184, 155, 0.55) !important;
    box-shadow: none !important;
    padding: 14px 22px !important;
}
.rav-btn--secondary:hover,
a.rav-btn--secondary:hover,
button.rav-btn--secondary:hover {
    background: rgba(229, 184, 155, 0.10) !important;
    border-color: var(--rav-color-bronze) !important;
    color: var(--rav-color-bronze) !important;
}
