/* ==========================================================================
   REVE Chat V4 homepage: hero (template-parts/rc-v4-homepage/hero.php).
   Design: Hero in reve-chat-website src/creative/Top.jsx (V4 "Light Editorial").
   The AI shopping demo inside comes from css/home-v2-hero/home-v2-hero.css (loaded before this file);
   the rules below re-skin its stage for V4 and override its layout values (same or higher specificity).
   ========================================================================== */

.rc-hero {
  position: relative;
  min-height: 0;
  padding: clamp(48px, 5.5vw, 80px) 0 clamp(56px, 7vw, 96px);
  background:
    radial-gradient(50% 42% at 8% 0%, rgba(150, 120, 255, 0.075), transparent 70%),
    radial-gradient(42% 38% at 96% 4%, rgba(90, 140, 255, 0.065), transparent 70%),
    #ffffff;
  color: var(--rc-ink);
  font-family: var(--rc-font);
  overflow: clip;
  isolation: isolate;
}

/* quiet blueprint grid behind the copy */
.rc-hero .rc-hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(60, 40, 160, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 40, 160, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 30% 40%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 80% at 30% 40%, #000 15%, transparent 75%);
}

/* layout: the container gives the 1240px content width; the widget's own CSS places copy and stage inside */
.rc-hero .rc-hero-inner { max-width: none; }
.rc-hero .rc-hero-copy {
  gap: 0;
  margin-top: 0;
  max-width: 640px;
  align-items: flex-start;
}

/* copy */
.rc-hero .rc-hero-title {
  margin: 22px 0 0;
  font-family: var(--rc-font);
  font-size: clamp(42px, 5.3vw, 78px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--rc-ink);
  text-transform: none;
  text-wrap: balance;
}
.rc-hero .rc-hero-title em {
  font-family: inherit;
  font-size: 1em;
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--rc-violet);
}
.rc-hero .rc-hero-title-accent {
  padding-right: 0.06em;
  font-family: var(--rc-font-serif);
  font-size: 1.08em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(95deg, #5b3fd0, #2f5bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rc-hero .rc-hero-subtitle {
  margin: 24px 0 0;
  max-width: 520px;
  font-family: var(--rc-font-text);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--rc-ink-2);
}
.rc-hero .rc-hero-cta { gap: 14px 26px; margin-top: 32px; }
.rc-hero .rc-hero-cta .rc-btn-primary:hover { filter: brightness(1.12); }

/* "Try the Wize AI interactive preview" note with the nudging arrow on its right */
.rc-hero .rc-hero-note {
  gap: 14px;
  margin: 56px 0 0;
  max-width: 560px;
  font-family: var(--rc-font-text);
  font-size: 15px;
  line-height: 1.55;
  color: #5a5670;
}
.rc-hero .rc-hero-note b { font-weight: 500; color: var(--rc-ink); }
.rc-hero .rc-hero-note-arrow {
  flex: none;
  color: var(--rc-violet);
  animation: rc-hero-nudge 2.2s ease-in-out infinite;
}
@keyframes rc-hero-nudge { 50% { transform: translateX(8px); } }

/* demo widget: a slim lavender frame around the white widget (drawn on the wrapper so it follows the expand) */
.rc-hero .rc-hero-widget::before {
  content: '';
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: 24px;
  background: #d3caf9;
  box-shadow: 0 20px 40px -26px rgba(70, 50, 200, 0.32), 0 0 0 1px rgba(110, 90, 210, 0.12);
  pointer-events: none;
}
.rc-hero .rc-hero-widget.cd.v2-cd::after { background: transparent; }
.rc-hero .cd-widget {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(20, 10, 80, 0.08);
}
.rc-hero :focus-visible { outline-color: var(--rc-violet); }
/* headings inside the widget (agent name, product names) use the page heading font, as in the design;
   same weight as the widget's own `.cd-widget h3 { font-family: inherit }`, so its class rules still win */
.rc-hero :is(h1, h2, h3, h4) { font-family: var(--rc-font); }

/* desktop: copy on the left, the widget on the right (it grows to the centre when expanded) */
@media (min-width: 1081px) {
  .rc-hero .rc-hero-inner { min-height: 640px; }
  .rc-hero .rc-hero-copy,
  .rc-hero .rc-hero-copy[aria-hidden='true'] {
    top: 36px;
    width: min(640px, calc(100% - 440px));
  }
}

/* tablet + mobile: copy above the widget */
@media (max-width: 1080px) {
  .rc-hero .rc-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 56px;
    justify-content: stretch;
  }
  .rc-hero .rc-hero-copy { top: 0; width: 100%; }
  .rc-hero .rc-hero-stage { justify-self: center; }
  .rc-hero .rc-hero-note-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-hero .rc-hero-note-arrow { animation: none; }
}
