/* ============================================================
   Rosary OS — Home (WordPress port of the DC design)
   Page-level base, button components, animations, hover states,
   light-theme overrides and responsive rules.
   ============================================================ */

html.rosary-os, body.rosary-os { margin: 0; padding: 0; }
body.rosary-os {
  background: var(--color-midnight-slate);
  color: var(--color-starlight);
  font-family: var(--font-body);
  font-feature-settings: var(--font-features);
  -webkit-font-smoothing: antialiased;
}
.rosary-os *, .rosary-os *::before, .rosary-os *::after { box-sizing: border-box; }
.rosary-os img, .rosary-os svg, .rosary-os video { max-width: 100%; }
.rosary-os ::selection { background: var(--accent-soft); }

/* ── Buttons (ported from DS Button.jsx) ───────────────────── */
.ros-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-feature-settings: 'ss01' on;
  font-weight: 480;
  letter-spacing: 0.16px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
  text-decoration: none;
  line-height: 1;
}
/* sizes */
.ros-btn--sm { font-size: 14px; padding: 8px 18px; border-radius: 999px; }
.ros-btn--md { font-size: 16px; padding: 14px 24px; border-radius: 32px; }
.ros-btn--lg { font-size: 16px; padding: 16px 28px; border-radius: 40px; }
/* variants */
.ros-btn--primary   { background: var(--color-mercury-blue); color: var(--color-pure-white); }
.ros-btn--primary:hover { background: var(--accent-hover); }
.ros-btn--secondary { background: var(--accent-soft); color: var(--color-starlight); border-color: transparent; border-radius: 40px; }
.ros-btn--secondary:hover { background: color-mix(in srgb, var(--color-ghost-blue) 32%, transparent); }
.ros-btn--outline   { background: transparent; color: var(--color-starlight); border-color: var(--color-lead); }
.ros-btn--outline:hover { border-color: var(--color-starlight); }

/* ── Logo theme swap ───────────────────────────────────────── */
.ros-logo-light { display: none; }
html.ros-theme-light .ros-logo-dark { display: none; }
html.ros-theme-light .ros-logo-light { display: inline-block; }

/* ── Hover helpers (replacing DC style-hover) ──────────────── */
.ros-navlink { transition: color .15s ease; }
.ros-navlink:hover { color: var(--color-starlight) !important; }
.ros-ctrlbtn { transition: color .15s ease, border-color .15s ease; }
.ros-ctrlbtn:hover { color: var(--color-starlight) !important; border-color: var(--color-starlight) !important; }
.ros-agent-row .ros-agent-title.is-inactive { transition: color .2s ease; }
.ros-agent-row:hover .ros-agent-title.is-inactive { color: var(--color-starlight) !important; }
.ros-agent-card { transition: background-color .2s ease, border-color .2s ease; }
.ros-agent-card:hover { background: var(--surface-interactive) !important; border-color: var(--color-lead) !important; }
.ros-footlink, .ros-customcta { transition: color .15s ease, opacity .15s ease; }
.ros-footlink:hover { color: var(--color-starlight) !important; }
.ros-customcta:hover { opacity: 0.75; }
.ros-plan-btn { transition: background-color .18s ease, border-color .18s ease; }
.ros-plan-btn.is-popular:hover { background: var(--accent-hover); }
.ros-plan-btn.is-plain:hover { border-color: var(--color-starlight); }

/* ── Tabs / FAQ interactivity ──────────────────────────────── */
.ros-agent-pane { display: none; }
.ros-agent-pane.is-active { display: block; }
.ros-tab-on { background: var(--surface-interactive); color: var(--color-starlight); }
.ros-tab-off { background: transparent; color: var(--color-silver); }
.ros-faq-answer { display: none; }
.ros-faq-item.is-open .ros-faq-answer { display: block; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes rosScrollL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes rosScrollR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes rosArc  { from { stroke-dashoffset: 178; } to { stroke-dashoffset: 0; } }
@keyframes rosPop  { from { opacity: 0; transform: translate(-50%,-50%) scale(.3); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
@keyframes rosFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rosFadePlain { from { opacity: 0; } to { opacity: 1; } }

#optimize path[data-ros="arc"] { stroke-dasharray: 178; }
#optimize.ros-in path[data-ros="arc"] { animation: rosArc .8s cubic-bezier(.4,0,.2,1) .1s backwards; }
#optimize.ros-in [data-ros="disc"]    { animation: rosPop .55s cubic-bezier(.34,1.3,.5,1) var(--d,0ms) backwards; }
#optimize.ros-in [data-ros="label"]   { animation: rosFadePlain .5s ease-out .65s backwards; }
#optimize.ros-in [data-ros="center"]  { animation: rosFade .65s cubic-bezier(.4,0,.2,1) 1.05s backwards; }

@media (prefers-reduced-motion: reduce) {
  .ros-marquee { animation: none !important; }
}

/* ── Light theme overrides (toggled via .ros-theme-light on <html>) ── */
html.ros-theme-light {
  --color-deep-space: #ffffff;
  --color-midnight-slate: #f4f4f8;
  --color-graphite: #e9e9f0;
  --color-lead: #8d8d9a;
  --color-silver: #54545f;
  --color-starlight: #15151d;
  --color-ghost-blue: #3b4ed8;
  --hero-bg: radial-gradient(120% 90% at 50% 8%, #dde4fa 0%, rgba(221,228,250,0) 55%), linear-gradient(180deg, #eef1fa 0%, #f2f3f9 50%, #f4f4f8 100%);
  --hero-glow: radial-gradient(60% 100% at 50% 100%, rgba(82,102,235,0.10) 0%, rgba(82,102,235,0) 70%);
}
html.ros-theme-light #rosHero video,
html.ros-theme-light #rosHero .ros-hero-wash { display: none !important; }
html.ros-theme-light #rosHero {
  --color-starlight: #15151d !important;
  --color-silver: #54545f !important;
  --color-lead: #8d8d9a !important;
  --color-ghost-blue: #3b4ed8 !important;
  --accent-soft: rgba(82,102,235,0.12) !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .ros-grid-2,
  .ros-agents-pane-list,
  .ros-opt-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .ros-agent-preview { position: static !important; }
  .ros-grid-3,
  .ros-grid-4,
  .ros-sec-grid,
  .ros-price-grid,
  .ros-example-grid,
  .ros-example-dots,
  .ros-footer-cols { grid-template-columns: 1fr 1fr !important; }
  .ros-pipe-row { grid-template-columns: 1fr !important; gap: 8px !important; }
  .ros-opt-diagram { transform: scale(.82); }
  .ros-hero-h1 { font-size: 44px !important; }
  .ros-section-h2 { font-size: 36px !important; }
  .ros-cta-h2 { font-size: 42px !important; }
}
@media (max-width: 720px) {
  .rosary-os section,
  .rosary-os .ros-pad { padding-left: 20px !important; padding-right: 20px !important; }
  .ros-nav-main { display: none !important; }
  .ros-grid-3,
  .ros-grid-4,
  .ros-sec-grid,
  .ros-price-grid,
  .ros-example-grid,
  .ros-example-dots,
  .ros-footer-cols { grid-template-columns: 1fr !important; }
  .ros-header { padding: 14px 18px !important; }
  .ros-hero-h1 { font-size: 34px !important; }
  .ros-hero-sub { font-size: 18px !important; }
  .ros-section-h2 { font-size: 30px !important; }
  .ros-cta-h2 { font-size: 32px !important; }
  .ros-explore-tabs { flex-wrap: wrap; }
  .ros-stats-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ── Inner pages: form fields ──────────────────────────────── */
.ros-field {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-starlight);
  background: var(--color-midnight-slate);
  border: 1px solid var(--color-lead);
  border-radius: 10px;
  padding: 13px 16px;
  outline: none;
  transition: border-color .15s ease;
}
.ros-field::placeholder { color: var(--color-lead); }
.ros-field:focus { border-color: var(--color-starlight); }

/* ── Single post prose ─────────────────────────────────────── */
.ros-prose { font-family: var(--font-body); }
.ros-prose p { font-size: 19px; line-height: 1.7; color: var(--color-silver); margin: 0 0 20px; }
.ros-prose h2 { font-family: var(--font-display); font-feature-settings: 'ss01' on; font-size: 28px; font-weight: 480; color: var(--color-starlight); margin: 40px 0 14px; }
.ros-prose h3 { font-family: var(--font-display); font-size: 22px; font-weight: 480; color: var(--color-starlight); margin: 32px 0 12px; }
.ros-prose a { color: var(--color-ghost-blue); }
.ros-prose ul, .ros-prose ol { color: var(--color-silver); font-size: 18px; line-height: 1.7; padding-left: 22px; margin: 0 0 20px; }
.ros-prose li { margin: 6px 0; }
.ros-prose img { border-radius: 6px; margin: 24px 0; max-width: 100%; height: auto; }
.ros-prose blockquote { font-family: var(--font-display); font-feature-settings: 'ss01' on; font-size: 26px; line-height: 1.3; font-weight: 360; color: var(--color-starlight); margin: 36px 0; padding-left: 24px; border-left: 2px solid var(--color-ghost-blue); }
.ros-prose code { background: var(--surface-interactive); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.ros-prose pre { background: var(--surface-base); border: 1px solid var(--border-divider); border-radius: 6px; padding: 20px; overflow: auto; margin: 0 0 24px; }

/* ── Inner-page responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .ros-cmp-row { grid-template-columns: 1.4fr 1fr 1fr !important; }
  .ros-meet-intro { position: static !important; }
}
@media (max-width: 720px) {
  .ros-cmp { font-size: 13px; }
}
