/* ==========================================================================
   APPS 365 AI - Bold redesign layer (v2)
   Loads AFTER styles.css. Reuses :root tokens; adds premium dark surfaces,
   a refined type rhythm, elevated components and scroll-reveal motion.
   All new component classes are prefixed .r- to avoid collisions.
   ========================================================================== */

:root {
  --ink-950: #050b16;
  --ink-900: #071122;
  --ink-800: #0c1a30;
  --ink-700: #12233f;
  --line-dark: #1e3355;
  --grad-brand: linear-gradient(135deg, #0070e0 0%, #00a8ea 100%);
  --grad-brand-strong: linear-gradient(135deg, #003087 0%, #0070e0 55%, #00a8ea 100%);
  --grad-sheen: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0));
  --ring: 0 0 0 1px rgba(0,112,224,.35);
  --shadow-hi: 0 30px 80px -24px rgba(3, 20, 45, 0.45);
  --shadow-card: 0 1px 0 rgba(255,255,255,.6) inset, 0 12px 34px -18px rgba(10,22,40,.28);
  --r-maxw: min(1200px, calc(100% - 40px));
  --ease: cubic-bezier(.22,.61,.36,1);
}

.r-section { padding: clamp(56px, 8vw, 104px) 0; }
.r-section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.r-container { width: var(--r-maxw); margin-inline: auto; }
.r-dark { background: var(--ink-900); color: #dce7f5; }
.r-alt { background: var(--surface-alt); }
.r-mist { background: linear-gradient(180deg, var(--mist), #fff 70%); }

.r-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); background: var(--mist);
  border: 1px solid #d7e6ff; padding: 7px 14px; border-radius: 999px;
}
.r-dark .r-eyebrow { color: #7fc0ff; background: rgba(0,112,224,.14); border-color: rgba(120,180,255,.28); }
.r-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(0,168,234,.18); }

.r-h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.03; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); margin: 18px 0 0; }
.r-dark .r-h1 { color: #fff; }
.r-h2 { font-size: clamp(29px, 3.8vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); margin: 14px 0 0; }
.r-dark .r-h2 { color: #fff; }
.r-lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 16px 0 0; }
.r-dark .r-lead { color: #a9bdd8; }
.r-grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.r-section-head { max-width: 760px; }
.r-section-head.r-center { margin-inline: auto; text-align: center; }

/* ---- Buttons (extend shared .button) ---- */
.r-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 15px 26px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s; }
.r-btn:active { transform: translateY(1px); }
.r-btn--primary { color: #fff; background: var(--grad-brand-strong); box-shadow: 0 14px 30px -12px rgba(0,112,224,.6); }
.r-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px rgba(0,112,224,.7); }
.r-btn--ghost { color: var(--ink); background: #fff; border-color: var(--border); box-shadow: var(--shadow-sm); }
.r-btn--ghost:hover { border-color: #c7d6ea; transform: translateY(-2px); }
.r-dark .r-btn--ghost { color: #fff; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.r-dark .r-btn--ghost:hover { background: rgba(255,255,255,.1); }
.r-btn--lg { padding: 17px 32px; font-size: 17px; }
.r-btn .r-arrow { transition: transform .18s var(--ease); }
.r-btn:hover .r-arrow { transform: translateX(3px); }

/* ==========================================================================
   HERO
   ========================================================================== */
.r-hero { position: relative; overflow: clip; background: radial-gradient(120% 120% at 80% -10%, #10305e 0%, var(--ink-900) 45%, var(--ink-950) 100%); color: #dce7f5; }
/* Dark surfaces: force light text on typography primitives so headings and
   body copy never render dark-on-dark. Covers every dark section in the system. */
.r-hero .r-h1, .r-hero .r-h2,
.r-fhero .r-h1, .r-fhero .r-h2,
.r-painband .r-h1, .r-painband .r-h2 { color: #fff; }
.r-hero .r-lead, .r-fhero .r-lead, .r-painband .r-lead { color: #b8cae4; }
.r-hero .r-eyebrow, .r-painband .r-eyebrow, .r-fhero .r-eyebrow { color: #7fc0ff; background: rgba(0,112,224,.16); border-color: rgba(120,180,255,.30); }
.r-hero::before { /* fine grid, fades out toward the bottom via a soft top-weighted gradient */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(5,11,22,0) 0%, rgba(5,11,22,0) 40%, var(--ink-900) 92%),
    linear-gradient(rgba(120,170,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,170,255,.05) 1px, transparent 1px);
  background-size: 100% 100%, 46px 46px, 46px 46px;
}
.r-hero::after { content: ""; position: absolute; width: 560px; height: 560px; right: -140px; top: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(0,168,234,.30), rgba(0,168,234,.06) 45%, transparent 68%); pointer-events: none; }
.r-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 4vw, 64px); align-items: center; padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 88px); }
.r-hero__trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; font-size: 14px; color: #9fb6d6; }
.r-hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.r-hero__trust span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: rgba(16,185,129,.16); border: 1px solid rgba(16,185,129,.5); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.r-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.r-hero__note { margin-top: 16px; font-size: 14px; color: #8ba2c2; }

.r-hero__visual { position: relative; }
.r-hero__figure { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-dark); box-shadow: var(--shadow-hi); background: var(--ink-800); }
.r-hero__figure img { display: block; width: 100%; height: auto; }
.r-hero__badge { position: absolute; z-index: 2; background: rgba(9,20,40,.94); border: 1px solid var(--line-dark); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-hi); }
.r-hero__badge strong { display: block; font-size: 22px; color: #fff; line-height: 1; }
.r-hero__badge span { font-size: 12.5px; color: #9fb6d6; }
.r-hero__badge--a { left: -14px; top: 26px; }
.r-hero__badge--b { right: -12px; bottom: 26px; }

.r-hero__metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: 16px; overflow: hidden; margin-top: 8px; }
.r-hero__metrics div { background: rgba(9,20,38,.75); padding: 20px; }
.r-hero__metrics b { display: block; font-size: clamp(22px, 2.4vw, 30px); color: #fff; font-weight: 800; }
.r-hero__metrics span { font-size: 13px; color: #93a9c8; }

/* ==========================================================================
   MARQUEE / PAIN STAT BAND
   ========================================================================== */
.r-painband { background: var(--ink-800); color: #dce7f5; }
.r-painband .r-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.r-stat { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)); border: 1px solid var(--line-dark); border-radius: 16px; padding: 26px; }
.r-stat b { display: block; font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: #fff; line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.r-stat p { margin: 10px 0 0; color: #b6c8e2; font-size: 15.5px; line-height: 1.5; }
.r-stat cite { display: block; margin-top: 10px; font-size: 12px; color: #7f97ba; font-style: normal; }

/* ==========================================================================
   SERVICE / FEATURE CARDS
   ========================================================================== */
.r-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.r-cards--2 { grid-template-columns: repeat(2, 1fr); }
.r-cards--4 { grid-template-columns: repeat(4, 1fr); }
.r-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 26px; box-shadow: var(--shadow-card); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.r-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(10,22,40,.34); border-color: #cfe0f7; }
.r-card__icon { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; background: var(--mist); color: var(--primary); margin-bottom: 18px; }
.r-card__icon svg { width: 26px; height: 26px; }
.r-card h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.r-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.r-card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 700; font-size: 14.5px; color: var(--primary); text-decoration: none; }
.r-card__link:hover { text-decoration: underline; }
.r-card--accent { background: var(--grad-brand-strong); color: #fff; border-color: transparent; }
.r-card--accent h3, .r-card--accent p { color: #fff; }
.r-card--accent .r-card__icon { background: rgba(255,255,255,.16); color: #fff; }
.r-card--accent .r-card__link { color: #fff; }

/* ==========================================================================
   STEPS
   ========================================================================== */
.r-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; counter-reset: step; }
.r-step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px 26px 26px; box-shadow: var(--shadow-card); }
.r-step__num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad-brand-strong); font-size: 18px; }
.r-step h3 { font-size: 19px; margin: 16px 0 8px; color: var(--ink); }
.r-step p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* ==========================================================================
   PRODUCTS
   ========================================================================== */
.r-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 40px; }
.r-product { display: flex; gap: 18px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-card); transition: transform .2s var(--ease), border-color .2s; }
.r-product:hover { transform: translateY(-3px); border-color: #cfe0f7; }
.r-product__badge { flex: none; width: 54px; height: 54px; border-radius: 13px; background: var(--ink-900); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.r-product h3 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.r-product h3 a { color: inherit; text-decoration: none; }
.r-product h3 a:hover { color: var(--primary); }
.r-product p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.r-product .r-extlink { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--primary); text-decoration: none; }

/* ==========================================================================
   PROOF / OUTCOMES
   ========================================================================== */
.r-proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
.r-proof__item { text-align: center; padding: 26px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.r-proof__item b { display: block; font-size: clamp(30px, 4vw, 42px); font-weight: 800; color: var(--primary); line-height: 1; }
.r-proof__item span { display: block; margin-top: 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.r-quote { margin-top: 40px; background: var(--ink-900); color: #eaf1fb; border-radius: 20px; padding: clamp(30px, 5vw, 54px); }
.r-quote p { font-size: clamp(20px, 2.4vw, 27px); line-height: 1.4; font-weight: 600; color: #fff; margin: 0; }
.r-quote footer { margin-top: 18px; color: #9fb6d6; font-size: 15px; }

/* ==========================================================================
   PRICING / OFFER LADDER
   ========================================================================== */
.r-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; align-items: stretch; }
.r-tier { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-card); }
.r-tier--featured { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,112,224,.12), var(--shadow-card); position: relative; }
.r-tier__flag { position: absolute; top: -12px; left: 24px; background: var(--grad-brand-strong); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 12px; border-radius: 999px; }
.r-tier h3 { font-size: 17px; color: var(--ink); margin: 0 0 6px; }
.r-tier__price { font-size: 30px; font-weight: 800; color: var(--ink); }
.r-tier__price small { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.r-tier p { color: var(--ink-2); font-size: 14px; margin: 8px 0 16px; line-height: 1.5; }
.r-tier ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 9px; }
.r-tier li { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink); line-height: 1.4; }
.r-tier li::before { content: ""; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%230070e0' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center no-repeat; }
.r-tier .r-btn { margin-top: auto; width: 100%; }

/* ==========================================================================
   FAQ (answer-first accordion)
   ========================================================================== */
.r-faq { max-width: 860px; margin: 40px auto 0; display: grid; gap: 12px; }
.r-faq details { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 4px 22px; box-shadow: var(--shadow-sm); }
.r-faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 17px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.r-faq summary::-webkit-details-marker { display: none; }
.r-faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--primary); transition: transform .2s var(--ease); }
.r-faq details[open] summary::after { transform: rotate(45deg); }
.r-faq details p { margin: 0 0 20px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.r-ctaband { position: relative; overflow: clip; background: var(--grad-brand-strong); color: #fff; border-radius: 24px; padding: clamp(36px, 6vw, 68px); text-align: center; }
.r-ctaband::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.16), transparent 40%); pointer-events: none; }
.r-ctaband h2 { color: #fff; position: relative; }
.r-ctaband p { color: rgba(255,255,255,.9); position: relative; max-width: 620px; margin: 14px auto 0; }
.r-ctaband .r-hero__cta { justify-content: center; position: relative; }
.r-ctaband .r-btn--primary { background: #fff; color: var(--primary-dark); }
.r-ctaband .r-btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }

/* ==========================================================================
   FUNNEL PAGE (paid-ads landing)
   ========================================================================== */
.r-fheader { position: sticky; top: 0; z-index: 50; background: #ffffff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 0 rgba(10,22,40,.04); }
.r-fheader__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.r-fheader img { width: clamp(126px, 11vw, 152px); height: auto; display: block; }
.r-fheader__right { display: flex; align-items: center; gap: 18px; }
.r-fheader__tel { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .01em; color: var(--primary-dark); text-decoration: none; padding: 8px 18px 8px 12px; border-radius: 999px; border: 1px solid #cfe0f7; background: linear-gradient(180deg, #f5faff, #e9f3ff); transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease); }
.r-fheader__tel::before { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/15px no-repeat, linear-gradient(135deg, #0070e0, #00a8ea); box-shadow: 0 4px 10px -4px rgba(0,112,224,.6); }
.r-fheader__tel:hover { border-color: var(--primary); box-shadow: 0 8px 20px -10px rgba(0,112,224,.55); transform: translateY(-1px); }
@media (max-width: 620px) { .r-fheader__tel { font-size: 0; gap: 0; padding: 8px; border-radius: 50%; } .r-fheader__tel::before { margin: 0; } }

.r-fhero { position: relative; overflow: clip; background: radial-gradient(120% 130% at 85% -20%, #123a6b 0%, var(--ink-900) 48%, var(--ink-950) 100%); color: #dce7f5; }
.r-fhero .r-h1 { color: #fff; }
.r-fhero .r-lead { color: #b8cae4; }
.r-fhero .r-eyebrow { color: #7fc0ff; background: rgba(0,112,224,.16); border-color: rgba(120,180,255,.3); }
.r-fhero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px,4vw,56px); align-items: center; padding: clamp(40px,6vw,80px) 0; }
.r-checklist { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.r-checklist li { position: relative; padding-left: 34px; color: #cdddf2; font-size: 16.5px; line-height: 1.45; }
.r-checklist li::before { content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: rgba(16,185,129,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center no-repeat; border: 1px solid rgba(16,185,129,.4); }
/* Ink variant for the checklist on LIGHT sections (dark text). */
.r-checklist--ink li { color: var(--ink); }
.r-checklist--ink li::before { background-color: var(--mist); border-color: #cfe0f7; }

.r-leadcard { background: #fff; border-radius: 20px; padding: clamp(24px,3vw,32px); box-shadow: 0 40px 90px -30px rgba(3,20,45,.6); border: 1px solid var(--border); }
.r-leadcard--center { max-width: 640px; margin: 34px auto 0; }
.r-leadcard h2 { font-size: 23px; color: var(--ink); margin: 0 0 4px; }
.r-leadcard__sub { font-size: 14.5px; color: var(--ink-2); margin: 0 0 18px; }
.r-leadcard form { display: grid; gap: 12px; }
.r-leadcard label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.r-leadcard input, .r-leadcard select { font: inherit; font-size: 15.5px; font-weight: 400; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-alt); color: var(--ink); width: 100%; }
.r-leadcard input:focus, .r-leadcard select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,112,224,.15); background: #fff; }
.r-leadcard .r-checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; font-weight: 400; color: var(--ink-2); line-height: 1.4; }
.r-leadcard .r-checkbox input { width: auto; margin-top: 2px; }
.r-leadcard .r-spam { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.r-leadcard .r-btn { width: 100%; margin-top: 4px; }
.r-leadcard__trust { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.r-leadcard__trust span { display: inline-flex; align-items: center; gap: 5px; }
.r-formmsg { font-size: 13.5px; padding: 2px 0; color: var(--ink-2); }
.r-formmsg[data-state="error"] { color: #b42318; }
.r-formmsg[data-state="success"] { color: #067647; font-weight: 600; }

.r-fpills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.r-fpills span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; font-size: 14.5px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm); }

@media (max-width: 1000px) {
  .r-fhero__inner { grid-template-columns: 1fr; }
  .r-fhero__visual { order: -1; }
}

/* ==========================================================================
   DASHBOARD SHOWCASE (product screenshots)
   ========================================================================== */
.r-frame { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-dark); background: var(--ink-900); box-shadow: var(--shadow-hi); }
.r-frame img { display: block; width: 100%; height: auto; }
.r-frame--hero { max-width: 940px; margin: 40px auto 0; border-radius: 20px; }
.r-frame--photo { border-color: var(--border); background: var(--surface); }
.r-mediarow + .r-proof { margin-top: 44px; }
.r-mediarow__text .r-eyebrow { margin-bottom: 4px; }
.r-frame--hero::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); border-radius: 20px; pointer-events: none; }

.r-showcase-glow { position: relative; }
.r-showcase-glow::before { content: ""; position: absolute; left: 50%; top: 30%; width: 70%; height: 60%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0,168,234,.22), transparent); filter: blur(30px); pointer-events: none; z-index: 0; }
.r-showcase-glow > * { position: relative; z-index: 1; }

.r-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.r-shot { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
a.r-shot:hover { border-color: #cfe0f7; }
.r-shot:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(10,22,40,.34); }
.r-shot__img { border-bottom: 1px solid var(--border); background: var(--ink-900); }
.r-shot__img img { display: block; width: 100%; height: auto; }
.r-shot__cap { padding: 14px 18px; }
.r-shot__cap strong { display: block; font-size: 15.5px; color: var(--ink); }
.r-shot__cap span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* Two-column media intro (used on service pages) */
.r-mediarow { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(24px,4vw,52px); align-items: center; }
.r-mediarow--rev .r-mediarow__text { order: 2; }
@media (max-width: 900px) {
  .r-shots { grid-template-columns: 1fr; }
  .r-mediarow { grid-template-columns: 1fr; }
  .r-mediarow--rev .r-mediarow__text { order: 0; }
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
/* Progressive enhancement: only hide when JS is confirmed (.js on <html>).
   Without JS, or if the reveal script never runs, content stays fully visible. */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); will-change: opacity, transform; }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal][data-reveal-delay="1"] { transition-delay: .08s; }
.js [data-reveal][data-reveal-delay="2"] { transition-delay: .16s; }
.js [data-reveal][data-reveal-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .r-btn, .r-card, .r-product { transition: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .r-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .r-hero__visual { order: 2; }
  .r-cards, .r-steps { grid-template-columns: repeat(2, 1fr); }
  .r-cards--4 { grid-template-columns: repeat(2, 1fr); }
  .r-tiers { grid-template-columns: repeat(2, 1fr); }
  .r-proof { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .r-hero__metrics { grid-template-columns: repeat(2, 1fr); }
  .r-painband .r-grid3 { grid-template-columns: 1fr; }
  .r-cards, .r-cards--2, .r-cards--4, .r-steps, .r-products, .r-proof, .r-tiers { grid-template-columns: 1fr; }
  .r-hero__badge--a { left: 8px; }
  .r-hero__badge--b { right: 8px; }
  .r-product { flex-direction: column; }
}
