/* ==========================================================================
   Aviva — visual enhancement layer: imagery, motion, lively sections
   Loaded AFTER styles.css. Adds depth, colour, animation and real imagery.
   ========================================================================== */

/* ---- Scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Card hover lift ---------------------------------------------------- */
.card, .protect-tile, .know-card, .quote-card, .quick-action, .tool-tile, .calc-item {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.card:hover, .protect-tile:hover, .know-card:hover, .quote-card:hover {
  transform: translateY(-4px); box-shadow: 0 14px 34px rgba(27, 63, 158, 0.14);
}

/* ---- Colourful hero (Razorpay/Go Digit feel) ---------------------------- */
.hero {
  position: relative; overflow: hidden; padding-top: 86px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 42%, rgba(244,247,255,.72) 70%, rgba(244,247,255,.6) 100%),
    url("https://images.unsplash.com/photo-1511895426328-dc8714191300?auto=format&fit=crop&w=1800&q=82") center/cover no-repeat;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px); z-index: 0; pointer-events: none;
}
.hero::before { width: 340px; height: 340px; background: rgba(245,179,1,0.16); top: -80px; right: -60px; animation: float 9s ease-in-out infinite; }
.hero::after  { width: 260px; height: 260px; background: rgba(27,63,158,0.10); bottom: -90px; left: -40px; animation: float 11s ease-in-out infinite reverse; }
.hero .container { position: relative; z-index: 1; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-22px) } }

.hero .pill { background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero h1 .hl { color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px; background: rgba(245,179,1,.4); z-index: -1; border-radius: 4px; }

/* When hero has media column, put the widget below or beside on its own row */
.hero-grid.has-media { grid-template-columns: 1.05fr 0.95fr; }

/* ---- Photo header for interior pages ------------------------------------ */
.page-header {
  position: relative; overflow: hidden;
  background: radial-gradient(900px 400px at 90% -20%, #E9EDFA 0%, rgba(233,237,250,0) 60%), var(--bg-softer);
}
.page-header::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(245,179,1,.14); top: -70px; right: 8%; animation: float 10s ease-in-out infinite;
}
.page-header .container { position: relative; z-index: 1; }

/* ---- Icon backgrounds with colour --------------------------------------- */
.card-icon { background: linear-gradient(135deg, var(--accent) 0%, #3457C5 100%); color: #fff; box-shadow: 0 8px 18px rgba(27,63,158,.22); }
.protect-tile .p-icon { transition: transform .2s ease; }
.protect-tile:hover .p-icon { transform: scale(1.08) rotate(-4deg); background: var(--accent); color: #fff; }
.know-thumb { background: linear-gradient(135deg, #E9EDFA, #DCE4FA); transition: transform .3s ease; }
.know-card:hover .know-thumb i { transform: scale(1.15); }
.know-thumb i { transition: transform .3s ease; }

/* ---- Real imagery on knowledge cards ------------------------------------ */
.know-thumb.img { padding: 0; }
.know-thumb.img img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Marquee trust strip (Go Digit-style motion) ------------------------ */
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: #fff; padding: 18px 0; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll-x 26s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.marquee-item i { color: var(--accent); font-size: 1.3rem; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- Homepage section polish ------------------------------------------ */
.home-quick-section {
  padding-top: 32px !important;
  padding-bottom: 36px !important;
  position: relative;
  z-index: 3;
}
.home-quick-section .quick-actions {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(20,47,120,.16);
}
.quick-action {
  min-height: 96px;
  background: rgba(255,255,255,.96);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.quick-action:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.quick-action i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
}

.promo-banner {
  justify-content: space-between;
  text-align: left;
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 16px 40px rgba(245,179,1,.20);
}
.promo-banner strong { flex: 1; min-width: 260px; }
.promo-banner .btn { background: #fff; color: var(--accent); border-color: transparent; }

.protect-grid {
  gap: 18px;
}
.protect-tile {
  position: relative;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  border: 1px solid rgba(228,231,235,.9);
  border-radius: 18px;
  padding: 22px;
  overflow: hidden;
}
.protect-tile::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -46px;
  top: -46px;
  border-radius: 50%;
  background: rgba(27,63,158,.07);
}
.protect-tile .p-icon {
  margin: 0 0 18px;
  border-radius: 16px;
  position: relative;
  z-index: 1;
}
.protect-tile strong,
.protect-tile small { position: relative; z-index: 1; }
.protect-group-title {
  color: var(--accent);
  margin-top: 34px;
}

.tool-tiles { gap: 20px; }
.tool-tile {
  min-height: 140px;
  align-items: flex-start;
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(245,179,1,.18), transparent 70%),
    #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.tool-tile:hover {
  text-decoration: none;
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(245,179,1,.24), transparent 70%),
    #fff;
  border-color: rgba(27,63,158,.25);
}
.tool-tile i {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
}
.tool-tile strong { color: var(--text); }
.tool-tile small { color: var(--text-muted); }

.stats-strip {
  gap: 18px;
}
.stats-strip .stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 20px;
  box-shadow: var(--shadow);
}

.why-band {
  border-radius: 0;
}
.why-band .section-head {
  max-width: 760px;
}
.why-band .why-item {
  padding: 20px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(6px);
}
.why-band .why-item i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(245,179,1,.14);
}

.flow-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 18px 22px;
  box-shadow: var(--shadow);
}
.flow-step:not(:last-child)::after {
  right: -16px;
  width: 20px;
}

.quote-card,
.know-card {
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.know-thumb { aspect-ratio: 16/11; }

.app-promo {
  border-radius: 22px;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(245,179,1,.22), transparent 70%),
    linear-gradient(135deg, #E9EDFA 0%, #F8FAFF 100%);
  box-shadow: var(--shadow-md);
}

/* ---- Media room: premium glass editorial composition ------------------- */
.media-room {
  background:
    radial-gradient(760px 360px at 18% 18%, rgba(245,179,1,.22), transparent 62%),
    radial-gradient(640px 280px at 90% 18%, rgba(245,179,1,.12), transparent 64%),
    linear-gradient(180deg, #FBFAF7 0%, #F4F1EC 100%);
}
.media-room-head {
  max-width: 720px;
  margin-bottom: 48px;
}
.media-room-head h2 {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.02em;
}
.media-room-head h2::after { display: none; }
.media-room-head p {
  max-width: 620px;
  font-size: 1.08rem;
}
.media-composition {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 24px;
  align-items: stretch;
}
.glass-card {
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(255,255,255,.48));
  box-shadow: 0 32px 90px rgba(61,51,39,.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.media-feature {
  position: relative;
  min-height: 520px;
  border-radius: 32px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.media-feature::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,179,1,.32), transparent 68%);
}
.media-feature::after {
  content: "";
  position: absolute;
  inset: auto 32px 32px auto;
  width: 148px;
  height: 148px;
  border-radius: 36px;
  background: rgba(255,255,255,.42);
  transform: rotate(12deg);
}
.media-feature-top,
.media-feature-body,
.media-feature-bottom {
  position: relative;
  z-index: 1;
}
.media-feature-top,
.media-feature-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.media-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: var(--accent);
  font-size: .84rem;
  font-weight: 800;
}
.media-tabs {
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: rgba(31,41,51,.06);
}
.media-tab {
  min-width: 92px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: var(--text-muted);
  font: 800 .86rem var(--font);
  cursor: pointer;
}
.media-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(61,51,39,.10);
}
.media-feature-body {
  max-width: 660px;
  padding: 56px 0;
}
.media-date {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold-dark);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.media-feature h3 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.media-feature p {
  max-width: 540px;
  font-size: 1.1rem;
}
.media-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 22px 0 24px;
  border-radius: 999px;
  background: #1F2933;
  color: #fff;
  font-weight: 850;
  box-shadow: 0 18px 38px rgba(31,41,51,.22);
}
.media-cta:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-3px);
}
.media-cta i {
  transition: transform .22s ease;
}
.media-cta:hover i {
  animation: arrowNudge .72s ease-in-out infinite;
}
@keyframes arrowNudge {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
.media-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}
.media-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(31,41,51,.18);
  transition: width .2s ease, background .2s ease;
}
.media-dots span.active {
  width: 34px;
  background: var(--gold);
}
.media-wall {
  position: relative;
  min-height: 520px;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(260px 220px at 50% 46%, rgba(255,255,255,.82), transparent 66%),
    linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.34));
}
.media-wall::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.72);
  background:
    linear-gradient(90deg, rgba(31,41,51,.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31,41,51,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 50%, #000 0 58%, transparent 76%);
}
.media-wall-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 24px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: 0 24px 60px rgba(61,51,39,.12);
}
.media-wall-core span {
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.media-wall-core strong {
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.12;
}
.pub-logo {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 64px;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.84);
  color: var(--text);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 18px 44px rgba(61,51,39,.11);
  animation: mediaFloat 7s ease-in-out infinite;
  transition: color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pub-logo:hover {
  text-decoration: none;
  color: var(--accent);
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 24px 54px rgba(27,63,158,.16);
}
.pub-logo--one { left: 8%; top: 12%; color: #1686D9; }
.pub-logo--two { right: 10%; top: 16%; color: #1B3F9E; animation-delay: -1.2s; }
.pub-logo--three { left: 26%; top: 40%; font-family: Georgia, serif; animation-delay: -2.2s; }
.pub-logo--four { left: 9%; bottom: 18%; color: #168941; animation-delay: -3s; }
.pub-logo--five { right: 13%; bottom: 24%; color: #F28A13; font-family: Georgia, serif; font-size: 1.7rem; animation-delay: -4.1s; }
.pub-logo--six { right: 30%; bottom: 7%; color: #B3292E; font-family: Georgia, serif; animation-delay: -5.4s; }
@keyframes mediaFloat {
  0%,100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@media (max-width: 1040px) {
  .media-composition {
    grid-template-columns: 1fr;
  }
  .media-feature,
  .media-wall {
    min-height: 460px;
  }
}
@media (max-width: 680px) {
  .media-room-head { margin-bottom: 32px; }
  .media-feature {
    min-height: auto;
    padding: 24px;
    border-radius: 28px;
  }
  .media-feature-top,
  .media-feature-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .media-feature-body {
    padding: 48px 0 36px;
  }
  .media-feature h3 {
    font-size: clamp(2rem, 13vw, 2.8rem);
  }
  .media-wall {
    min-height: 540px;
    border-radius: 28px;
  }
  .media-wall-core {
    width: 178px;
    height: 178px;
  }
  .pub-logo {
    min-width: 112px;
    min-height: 56px;
    padding: 12px 14px;
    font-size: .84rem;
  }
  .pub-logo--one { left: 6%; top: 10%; }
  .pub-logo--two { right: 5%; top: 18%; }
  .pub-logo--three { left: 12%; top: 38%; }
  .pub-logo--four { left: 6%; bottom: 23%; }
  .pub-logo--five { right: 7%; bottom: 24%; font-size: 1.35rem; }
  .pub-logo--six { right: 24%; bottom: 7%; }
}
@media (prefers-reduced-motion: reduce) {
  .pub-logo { animation: none !important; }
  .media-cta:hover i { animation: none !important; }
}

/* Compact media room sizing */
.media-room-head { max-width: 680px; margin-bottom: 32px; }
.media-room-head h2 { margin-bottom: 12px; font-size: clamp(1.8rem, 3vw, 2.55rem); }
.media-room-head p { font-size: 1rem; }
.media-feature { min-height: 390px; border-radius: 30px; padding: 24px; }
.media-feature::before { width: 240px; height: 240px; right: -92px; top: -92px; }
.media-feature::after { inset: auto 24px 24px auto; width: 112px; height: 112px; border-radius: 30px; }
.media-kicker { padding: 8px 12px; font-size: .78rem; }
.media-tabs { padding: 4px; }
.media-tab { min-width: 80px; padding: 8px 14px; font-size: .8rem; }
.media-feature-body { padding: 34px 0; }
.media-date { margin-bottom: 12px; font-size: .76rem; }
.media-feature h3 { max-width: 560px; margin-bottom: 14px; font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.08; }
.media-feature p { max-width: 500px; font-size: .98rem; }
.media-cta { min-height: 48px; padding: 0 18px 0 20px; }
.media-dots span.active { width: 30px; }
.media-wall { min-height: 390px; border-radius: 30px; }
.media-wall::before { inset: 22px; border-radius: 24px; background-size: 40px 40px; }
.media-wall-core { width: 158px; height: 158px; padding: 18px; }
.media-wall-core span { font-size: .68rem; }
.media-wall-core strong { font-size: 1.02rem; }
.pub-logo { min-width: 110px; min-height: 52px; padding: 10px 14px; border-radius: 18px; font-size: .86rem; box-shadow: 0 14px 34px rgba(61,51,39,.10); }
.pub-logo--two { right: 9%; top: 15%; }
.pub-logo--three {     left: 4%;
    top: 28%; }
.pub-logo--five { right: 12%; bottom: 24%; font-size: 1.35rem; }
.pub-logo--six { right: 28%; }

@media (max-width: 1040px) {
  .media-feature,
  .media-wall { min-height: 380px; }
}
@media (max-width: 680px) {
  .media-feature-body { padding: 34px 0 26px; }
  .media-feature h3 { font-size: clamp(1.7rem, 11vw, 2.25rem); }
  .media-wall { min-height: 430px; }
  .media-wall-core { width: 146px; height: 146px; }
}

@media (max-width: 960px) {
  .home-quick-section { padding-top: 28px !important; }
  .quick-action { min-height: auto; }
  .promo-banner { text-align: center; justify-content: center; }
  .protect-tile { min-height: 150px; }
  .flow-step:not(:last-child)::after { display: none; }
}

/* ---- High-energy homepage motion -------------------------------------- */
.home-quick-section,
.section {
  position: relative;
}
.section--soft {
  background:
    radial-gradient(520px 220px at 12% 0%, rgba(27,63,158,.08), transparent 70%),
    radial-gradient(520px 260px at 88% 10%, rgba(245,179,1,.12), transparent 72%),
    var(--bg-soft);
}
.section > .container {
  position: relative;
  z-index: 1;
}
.section-head h2 {
  position: relative;
  display: inline-block;
}
.section-head h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 76px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
  background-size: 220% 100%;
  transform: translateX(-50%) scaleX(.25);
  transform-origin: center;
  animation: headlineBeam 3.6s ease-in-out infinite;
}
@keyframes headlineBeam {
  0%,100% { background-position: 0% 50%; transform: translateX(-50%) scaleX(.45); opacity: .75; }
  50% { background-position: 100% 50%; transform: translateX(-50%) scaleX(1); opacity: 1; }
}

.home-quick-section .quick-actions,
.promo-banner,
.protect-tile,
.tool-tile,
.stats-strip .stat,
.why-band .why-item,
.flow-step,
.quote-card,
.know-card,
.app-promo,
.calc-item {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.reveal.in .quick-action,
.reveal.in .protect-tile,
.reveal.in .tool-tile,
.reveal.in .stat,
.reveal.in .why-item,
.reveal.in .flow-step,
.reveal.in .quote-card,
.reveal.in .know-card,
.reveal.in .calc-item {
  animation: sectionPop .78s cubic-bezier(.16,1,.3,1) both;
}
.reveal.in > :nth-child(2) { animation-delay: .07s; }
.reveal.in > :nth-child(3) { animation-delay: .14s; }
.reveal.in > :nth-child(4) { animation-delay: .21s; }
.reveal.in > :nth-child(5) { animation-delay: .28s; }
.reveal.in > :nth-child(6) { animation-delay: .35s; }

@keyframes sectionPop {
  from { opacity: 0; transform: translateY(42px) scale(.94) rotateX(9deg); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
}

.quick-action,
.protect-tile,
.tool-tile,
.stats-strip .stat,
.why-band .why-item,
.flow-step,
.quote-card,
.know-card,
.calc-item {
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateY(var(--lift, 0));
}
.quick-action:hover,
.protect-tile:hover,
.tool-tile:hover,
.stats-strip .stat:hover,
.why-band .why-item:hover,
.flow-step:hover,
.quote-card:hover,
.know-card:hover,
.calc-item:hover {
  --lift: -8px;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateY(var(--lift, 0));
}

.quick-action::after,
.protect-tile::before,
.tool-tile::before,
.stats-strip .stat::before,
.why-band .why-item::before,
.flow-step::before,
.quote-card::before,
.know-card::before,
.calc-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.72) 45%, transparent 68%);
  transform: translateX(-120%);
}
.quick-action:hover::after,
.protect-tile:hover::before,
.tool-tile:hover::before,
.stats-strip .stat:hover::before,
.why-band .why-item:hover::before,
.flow-step:hover::before,
.quote-card:hover::before,
.know-card:hover::before,
.calc-item:hover::before {
  opacity: 1;
  animation: lightSweep .85s ease;
}
@keyframes lightSweep {
  to { transform: translateX(120%); }
}

.protect-tile,
.tool-tile,
.stats-strip .stat,
.why-band .why-item,
.flow-step,
.quote-card,
.know-card,
.calc-item {
  isolation: isolate;
}
.protect-tile:hover,
.tool-tile:hover,
.stats-strip .stat:hover,
.why-band .why-item:hover,
.flow-step:hover,
.quote-card:hover,
.know-card:hover,
.calc-item:hover {
  border-color: rgba(27,63,158,.36);
  box-shadow: 0 24px 55px rgba(20,47,120,.18);
}

.protect-tile .p-icon,
.quick-action i,
.tool-tile i,
.flow-num,
.app-phone {
  animation: softFloat 5.5s ease-in-out infinite;
}
.protect-tile:nth-child(2n) .p-icon,
.quick-action:nth-child(2n) i,
.tool-tile:nth-child(2n) i,
.flow-step:nth-child(2n) .flow-num {
  animation-delay: -2.2s;
}
@keyframes softFloat {
  0%,100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-7px) rotate(-2deg); }
}

.promo-banner {
  animation: premiumPulse 4s ease-in-out infinite;
}
@keyframes premiumPulse {
  0%,100% { box-shadow: 0 16px 40px rgba(245,179,1,.20); }
  50% { box-shadow: 0 24px 70px rgba(245,179,1,.34); }
}

.stats-strip .stat {
  position: relative;
  overflow: hidden;
}
.stats-strip .stat strong {
  animation: numberGlow 2.8s ease-in-out infinite;
}
@keyframes numberGlow {
  0%,100% { filter: drop-shadow(0 0 0 rgba(27,63,158,0)); }
  50% { filter: drop-shadow(0 8px 18px rgba(27,63,158,.20)); }
}

.why-band::before {
  content: "";
  position: absolute;
  inset: -35%;
  background:
    radial-gradient(circle at 20% 30%, rgba(245,179,1,.22), transparent 18%),
    radial-gradient(circle at 75% 25%, rgba(255,255,255,.12), transparent 22%),
    radial-gradient(circle at 60% 80%, rgba(52,87,197,.35), transparent 24%);
  animation: auroraDrift 14s ease-in-out infinite alternate;
}
.why-band .container { position: relative; z-index: 1; }
@keyframes auroraDrift {
  from { transform: translate3d(-3%, -2%, 0) rotate(0deg); }
  to { transform: translate3d(4%, 3%, 0) rotate(8deg); }
}

.flow-step:not(:last-child)::after {
  animation: dashTravel 1.5s linear infinite;
}
@keyframes dashTravel {
  to { border-color: var(--accent); transform: translateX(5px); }
}
.flow-num {
  box-shadow: 0 0 0 0 rgba(27,63,158,.28);
  animation: softFloat 5.5s ease-in-out infinite, ringPulse 2.4s ease-out infinite;
}
@keyframes ringPulse {
  70% { box-shadow: 0 0 0 14px rgba(27,63,158,0); }
  100% { box-shadow: 0 0 0 0 rgba(27,63,158,0); }
}

.know-card:hover .know-thumb img {
  transform: scale(1.08) rotate(.8deg);
}
.know-thumb.img img {
  transition: transform .65s cubic-bezier(.16,1,.3,1);
}

.app-phone {
  position: relative;
  box-shadow: 0 18px 44px rgba(27,63,158,.18);
}
.app-phone::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 14px;
  border: 1px solid rgba(27,63,158,.18);
  animation: phoneScan 2.8s ease-in-out infinite;
}
@keyframes phoneScan {
  0%,100% { clip-path: inset(0 0 88% 0); opacity: .35; }
  50% { clip-path: inset(72% 0 0 0); opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal.in .quick-action,
  .reveal.in .protect-tile,
  .reveal.in .tool-tile,
  .reveal.in .stat,
  .reveal.in .why-item,
  .reveal.in .flow-step,
  .reveal.in .quote-card,
  .reveal.in .know-card,
  .reveal.in .calc-item,
  .protect-tile .p-icon,
  .quick-action i,
  .tool-tile i,
  .flow-num,
  .app-phone,
  .promo-banner,
  .stats-strip .stat strong,
  .why-band::before,
  .flow-step:not(:last-child)::after,
  .app-phone::after,
  .section-head h2::after {
    animation: none !important;
  }
}

/* ---- Animated stat counters --------------------------------------------- */
.stats-strip .stat strong { background: linear-gradient(135deg, var(--accent), #3457C5); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---- Gradient CTA band with pulse --------------------------------------- */
.cta-band { background: linear-gradient(120deg, var(--accent) 0%, #2C4FB0 55%, var(--accent-dark) 100%); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(245,179,1,.18); top: -120px; right: -60px; animation: float 8s ease-in-out infinite; }
.cta-band .btn { position: relative; z-index: 1; }
.cta-band .btn-primary { animation: pulse 2.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.5) } 50% { box-shadow: 0 0 0 12px rgba(255,255,255,0) } }
@media (prefers-reduced-motion: reduce) { .cta-band .btn-primary { animation: none; } }

/* ---- Why-band decorative --------------------------------------------- */
.why-band { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 60%, #3457C5 100%); }
.why-band::after { content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.05); bottom: -180px; left: -80px; }
.why-band .why-item { transition: transform .2s ease; }
.why-band .why-item:hover {
  --lift: -8px;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateY(var(--lift, 0));
}

/* ---- Promo banner shimmer ---------------------------------------------- */
.promo-banner { position: relative; overflow: hidden; background: linear-gradient(120deg, #F5B301, #FFCE45); }
.promo-banner::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent); animation: shimmer 3.5s ease-in-out infinite; }
@keyframes shimmer { 0% { left: -60% } 60%,100% { left: 130% } }
@media (prefers-reduced-motion: reduce) { .promo-banner::after { display: none; } }

/* ---- Buttons: nicer press ---------------------------------------------- */
.btn { transition: background .15s, color .15s, border-color .15s, transform .12s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold:hover { box-shadow: 0 8px 20px rgba(245,179,1,.4); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(27,63,158,.32); }

/* ---- Section image split (designed sections) --------------------------- */
.img-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.img-split img { width: 100%; border-radius: 18px; box-shadow: 0 18px 44px rgba(27,63,158,.14); aspect-ratio: 5/4; object-fit: cover; }
@media (max-width: 860px) { .img-split { grid-template-columns: 1fr; } }
@media (max-width: 1040px) { .hero-grid.has-media { grid-template-columns: 1fr; } .hero-media { min-height: 0; } }

/* ---- Login split panel (matches homepage blue + gold system) ------------ */
.login-section { padding: 56px 0 72px; background: var(--bg-softer); }
.login-split {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0;
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-md); background: var(--bg); max-width: 980px; margin: 0 auto;
}
.login-brand {
  position: relative; padding: 44px 40px; color: #fff;
  background: radial-gradient(900px 400px at 110% -20%, #3457C5 0%, rgba(52,87,197,0) 60%),
              linear-gradient(160deg, #1B3F9E 0%, #142F78 100%);
}
.login-brand-logo { color: #fff; margin-bottom: 26px; }
.login-brand-logo:hover { color: #fff; }
.login-brand-title { color: #fff; font-size: 1.55rem; line-height: 1.25; margin-bottom: 14px; }
.login-brand-lead { color: rgba(255,255,255,.82); margin-bottom: 26px; }
.login-brand-points { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 14px; }
.login-brand-points li { display: flex; align-items: center; gap: 12px; font-size: .95rem; color: rgba(255,255,255,.92); }
.login-brand-points i { color: var(--gold); font-size: 1.2rem; flex: none; }
.login-brand-help {
  display: flex; align-items: center; gap: 10px; font-size: .88rem;
  color: rgba(255,255,255,.85); padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18);
}
.login-brand-help i { color: var(--gold); font-size: 1.2rem; }
.login-brand-help strong { color: #fff; }
.login-form-panel { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-form-panel .widget-card { box-shadow: none; border: none; padding: 0; }

@media (max-width: 820px) {
  .login-split { grid-template-columns: 1fr; max-width: 460px; }
  .login-brand { padding: 34px 28px; }
  .login-brand-title { font-size: 1.35rem; }
  .login-form-panel { padding: 32px 28px; }
}

/* ---- Brand logo (official Aviva webp) ---------------------------------- */
.brand-logo { height: 38px; width: auto; display: block; object-fit: contain; }
.nav .logo { flex: 0 0 auto; }
.nav .brand-logo { height: 34px; max-width: 140px; }
/* On dark backgrounds (footer, login brand panel) render logo white */
.footer .brand-logo,
.brand-logo--light { filter: brightness(0) invert(1); }
@media (max-width: 640px){ .brand-logo, .nav .brand-logo { height: 34px; max-width: 170px; } }

/* ---- Hero: full-bleed photo background with estimate card --------------- */
.hero-media { position: relative; display: flex; justify-content: flex-end; align-items: center; min-height: 460px; }
.hero-quote-card {
  position: relative; z-index: 3; width: 380px; max-width: 100%; flex: none; margin: 24px 0; padding: 22px;
  box-shadow: 0 30px 70px rgba(20,47,120,.30);
  animation: cardRise .8s cubic-bezier(.22,1,.36,1) both, cardFloat 6s ease-in-out 1s infinite;
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero-quote-card:hover {
  transform: translateY(-6px); box-shadow: 0 40px 90px rgba(20,47,120,.38);
  animation-play-state: paused;
}
/* Soft glow ring behind the card */
.hero-quote-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: linear-gradient(135deg, rgba(245,179,1,.45), rgba(52,87,197,.45));
  filter: blur(22px); opacity: .35; animation: glowPulse 5s ease-in-out infinite;
}
.hero-quote-card h3 { font-size: .98rem; margin-bottom: 10px; }
.hero-quote-card .qq-tabs { gap: 5px; margin-bottom: 12px; }
.hero-quote-card .qq-tab { font-size: .68rem; padding: 5px 9px; transition: transform .15s ease, background .15s ease; }
.hero-quote-card .qq-tab:hover { transform: translateY(-2px); }
.hero-quote-card .qq-tab i { font-size: .8rem; }
.hero-quote-card .field { margin-bottom: 10px; }
.hero-quote-card .field label { font-size: .8rem; margin-bottom: 4px; }
.hero-quote-card .estimate-box { padding: 12px 14px; }
.hero-quote-card .estimate-box .amount { font-size: 1.7rem; transition: transform .2s ease; }
.hero-quote-card .btn { padding: 11px 18px; }

@keyframes cardRise { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cardFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes glowPulse { 0%,100% { opacity: .35; } 50% { opacity: .6; } }

/* Shimmer sweep on the hero gold CTA */
.hero-actions .btn-gold { position: relative; overflow: hidden; }
.hero-actions .btn-gold::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); animation: heroShimmer 3.2s ease-in-out infinite;
}
@keyframes heroShimmer { 0% { left: -60%; } 55%,100% { left: 130%; } }
.hero-trust--4 { display: grid; grid-template-columns: repeat(4, auto); gap: 14px 28px; }
@media (max-width: 1040px){
  .hero {
    background:
      linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 62%, rgba(244,247,255,.78) 100%),
      url("https://images.unsplash.com/photo-1511895426328-dc8714191300?auto=format&fit=crop&w=1400&q=82") center/cover no-repeat;
  }
  .hero-media { display: block; min-height: 0; }
  .hero-quote-card { width: 100%; margin-top: 20px; box-shadow: var(--shadow-md); }
}
@media (max-width: 560px){ .hero-trust--4 { grid-template-columns: repeat(2, 1fr); } }

/* ---- Footer logo ------------------------------------------------------- */
.footer .brand-logo { height: 30px; }

/* ---- Respect reduced motion for the animated hero ---------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-quote-card { animation: none !important; opacity: 1; transform: none; }
  .hero-quote-card::before { animation: none; }
  .hero-actions .btn-gold::after { display: none; }
  .hero::before, .hero::after { animation: none; }
}
