/* ============================================================
   CherrySavior — Design System theme.css
   Derived from theme/DESIGN-SYSTEM.md (Myrikko-inspired).
   Brand: cherry dark-red (#e60023) stays the single action color.
   Surfaces: deep slate canvas + glass + blurred orbs.
   ============================================================ */

:root {
    /* ---- Typography (Inter) ---- */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", "Menlo", "Consolas", "Monaco", "Courier New", monospace;

    /* ---- Surfaces (dark slate, primary theme) ---- */
    --bg-0: #0b1120;            /* navbar / modal / popover */
    --bg-1: #0f172a;            /* base canvas (slate-900)  */
    --bg-2: #161b2e;            /* raised section           */
    --bg-3: #1e293b;            /* inset / muted fill       */
    --surface-glass: rgba(11, 17, 32, .72);
    --surface-overlay: rgba(11, 17, 32, .92);

    /* ---- Text ---- */
    --text-0: #f8fafc;
    --text-1: #e2e8f0;
    --text-2: #94a3b8;
    --text-3: #64748b;

    /* ---- Brand: cherry (unchanged dark red) ---- */
    --cherry: #e60023;
    --cherry-hover: #ff1f3d;
    --cherry-pressed: #c8102e;
    --cherry-soft: rgba(230, 0, 35, .14);
    --cherry-softer: rgba(230, 0, 35, .08);
    --cherry-glow: rgba(230, 0, 35, .32);

    /* ---- Borders / rings ---- */
    --border: rgba(255, 255, 255, .10);
    --border-strong: rgba(255, 255, 255, .16);
    --ring: 0 0 0 3px rgba(230, 0, 35, .22);

    /* ---- Radius ---- */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-pill: 999px;

    /* ---- Elevation ---- */
    --shadow-card: 0 1px 10px rgba(0, 0, 0, .18), 0 2px 15px rgba(0, 0, 0, .10);
    --shadow-card-hover: 0 4px 14px rgba(0, 0, 0, .22);
    --shadow-modal: 0 8px 32px rgba(0, 0, 0, .80);
    --glow-cherry: 0 8px 24px -8px rgba(230, 0, 35, .50);

    /* ---- Motion ---- */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --dur-fast: 120ms;
    --dur: 150ms;
    --dur-slow: 200ms;
}

/* ---------------- Base ---------------- */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-feature-settings: "tnum" 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    letter-spacing: -.02em;
}

::selection {
    background: var(--cherry);
    color: #fff;
}

.price, .tabular {
    font-variant-numeric: tabular-nums;
}

/* Focus ring — cherry, consistent across all interactive elements */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: var(--radius-sm);
}

/* ---------------- Glass surfaces ---------------- */
.glass-nav {
    background: var(--surface-glass);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid var(--border);
}

/* ---------------- Decorative orbs ---------------- */
.orb {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .35;
    pointer-events: none;
    z-index: 0;
}
.orb--cherry { background: radial-gradient(circle, var(--cherry), transparent 70%); }
.orb--teal   { background: radial-gradient(circle, #14b8a6, transparent 70%); }
.orb--violet { background: radial-gradient(circle, #7c3aed, transparent 70%); }

/* Section wash (decorative teal→violet, low alpha) */
.section--gradient {
    background:
        linear-gradient(135deg, rgba(20, 184, 166, .06), rgba(124, 58, 237, .06)),
        var(--bg-1);
}

/* ---------------- Card sheen (subtle top highlight) ---------------- */
.card-sheen {
    position: relative;
    overflow: hidden;
}
.card-sheen::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cherry), transparent);
    opacity: .5;
}

/* ---------------- Responsive rhythm helpers ----------------
   Section vertical rhythm: 56px mobile → 80px desktop.
   Page gutters handled per-container by Tailwind utilities.        */
.section-pad { padding-top: 3.5rem; padding-bottom: 3.5rem; }

/* Responsive type scaling for long-form copy on small screens */
@media (max-width: 640px) {
    body { font-size: .9375rem; } /* 15px body on mobile */
    .orb { width: 320px; height: 320px; filter: blur(90px); opacity: .28; }
}

/* Safe-area insets for notched phones */
.wa-float {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    right: calc(1.5rem + env(safe-area-inset-right, 0px));
}

/* ---------------- Live-chat float pulse (cherry) ---------------- */
@keyframes wa-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230, 0, 35, .55); }
    70%  { box-shadow: 0 0 0 16px rgba(230, 0, 35, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 0, 35, 0); }
}
.wa-float { animation: wa-pulse 2.4s infinite; }

/* ---------------- Myrikko-style motion (cherry-tinted) ---------------- */

/* Scroll reveal: fade-up + de-blur, staggered via --reveal-delay */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(5px);
    transition:
        opacity .7s var(--ease),
        transform .7s var(--ease),
        filter .7s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Word-by-word hero title reveal (blur → sharp, like myrikko.ai) */
.js [data-reveal-words]:not(.words-ready) { opacity: 0; }
.word-rise {
    display: inline-block;
    opacity: 0;
    animation: word-rise .65s var(--ease) forwards;
}
@keyframes word-rise {
    0%   { opacity: 0; transform: translateY(10px) scale(.97); filter: blur(6px); }
    60%  { opacity: .9; filter: blur(1px); }
    100% { opacity: 1; transform: none; filter: none; }
}

/* Shine sweep across primary CTAs */
.sweep-shine {
    position: relative;
    overflow: hidden;
}
.sweep-shine::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        transparent 42%,
        rgba(255, 255, 255, .38) 50%,
        transparent 58%);
    background-size: 220% 100%;
    animation: sweep-shine 3.6s var(--ease) infinite;
    pointer-events: none;
}
@keyframes sweep-shine {
    0%        { background-position: 210% 0; }
    55%, 100% { background-position: -210% 0; }
}

/* Slow drifting glow orbs (aurora) */
@keyframes orb-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(48px, -34px, 0) scale(1.09); }
    100% { transform: translate3d(-26px, 26px, 0) scale(.95); }
}
.orb-drift     { animation: orb-drift 16s ease-in-out infinite alternate; }
.orb-drift-rev { animation: orb-drift 21s ease-in-out infinite alternate-reverse; }

/* Gentle float for hero visual */
@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.float-slow { animation: float-slow 7s ease-in-out infinite; }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
}
