/* ============================================================
   HOME PAGE
   Hero = text + a "statement of account" (the three stats set as
   ledger lines, closed by the double rule).
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100svh, 60rem);
  padding: calc(var(--nav-clear) + clamp(2rem, 5vw, 4rem)) 0 clamp(4.5rem, 8vw, 6.5rem);
  overflow: hidden;
  color: var(--ink-body);
  background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 58%, #11285A 100%);
}

/* closing double rule */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 5px;
  border-top: 1px solid rgba(201, 164, 76, 0.7);
  border-bottom: 1px solid rgba(201, 164, 76, 0.7);
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ledger ruling, fading out toward the edges */
.hero-bg-shapes::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 55px, rgba(255, 255, 255, 0.055) 55px, rgba(255, 255, 255, 0.055) 56px);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 72% 40%, #000 15%, transparent 78%);
          mask-image: radial-gradient(ellipse 85% 75% at 72% 40%, #000 15%, transparent 78%);
}

/* warm gold light from the top right, deep blue pooling bottom left */
.hero-bg-shapes::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52rem 34rem at 90% 6%, rgba(201, 164, 76, 0.24), transparent 62%),
    radial-gradient(46rem 32rem at -4% 105%, rgba(31, 67, 130, 0.65), transparent 66%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.82fr);
  grid-template-areas:
    "badge stats"
    "title stats"
    "sub   stats"
    "cta   stats";
  grid-template-rows: repeat(4, auto);
  align-content: center;
  column-gap: clamp(2.5rem, 6vw, 6rem);
}

.hero-badge {
  grid-area: badge;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gold-light);
  line-height: 1.45;
}

.hero-badge::before {
  content: '';
  flex: none;
  width: 28px;
  height: 5px;
  border-top: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
}

/* two-line lockup: quiet lead-in, then the statement */
.hero-title {
  grid-area: title;
  font-size: clamp(1.1rem, 0.95rem + 0.75vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 1.6rem;
  max-width: 44rem;
}

.hero-title span {
  display: block;
  margin-top: 0.3em;
  font-size: clamp(2.25rem, 1.1rem + 3.7vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #FFFFFF;
}

.hero-subtitle {
  grid-area: sub;
  max-width: 37rem;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 2.25rem;
}

.hero-cta-group {
  grid-area: cta;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ── Statement of account ───────────────────────────────────── */
.hero-stats {
  grid-area: stats;
  align-self: center;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.9rem 1.6rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 40px 70px -34px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

.hero-stat-item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 1.15rem 0 0.35rem;
}

/* label .......... figure */
.hero-stat-text {
  order: 1;
  font-size: 1rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.84);
}

.hero-stat-item::before {
  content: '';
  order: 2;
  flex: 1;
  min-width: 1.25rem;
  margin: 0 0.45rem;
  border-bottom: 2px dotted rgba(228, 203, 139, 0.38);
  transform: translateY(-0.3em);
}

.hero-stat-num {
  order: 3;
  font-size: clamp(2.2rem, 1.7rem + 1.3vw, 2.9rem);
  font-weight: 500;
  line-height: 1;
  color: var(--gold-light);
}

.hero-stats::after {
  content: '';
  display: block;
  height: 5px;
  margin-top: 1.1rem;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

/* ── Hero info card (replaces the two figures: text block + footnote) ─────
   Same glass card as .hero-stats; only its content and spacing differ.
   Desktop: right-hand column, as tall as the text beside it – the text
   scrolls inside the card (thin gold scrollbar, soft fade) while the
   footnote stays in view at the bottom. ≤960px: below the buttons, full
   height, no inner scrolling. */
.hero-stats.hero-stats--info {
  padding: 1.6rem 1.6rem 1.25rem 1.9rem;
}

.hero-info-body { min-height: 0; }

.hero-info-title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.3rem, 1.05rem + 0.85vw, 1.65rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--gold-light);
}

.hero-info-text {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.82);
}

.hero-info-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.2rem 0 1.05rem;
  padding: 0;
  list-style: none;
}

.hero-info-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}

.hero-info-list li::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 0.5em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 76, 0.2);
}

.hero-info-list strong { font-weight: 600; color: #FFFFFF; }

.hero-info-subtitle {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gold-light);
}

.hero-info-cta {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.6;
  color: #FFFFFF;
}

/* footnote: quiet, muted gold, set off by a hairline */
.hero-info-note {
  margin: 0.85rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(228, 203, 139, 0.78);
}

@media (min-width: 961px) {
  /* Same height as the text column beside it: size containment keeps the (long) text
     from stretching the grid rows, align-self stretches the card to the rows instead.
     max-height is only a safety net for browsers without `contain: size`. */
  .hero-stats.hero-stats--info {
    align-self: stretch;
    contain: size;
    max-height: 46rem;
  }

  .hero-info-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0.9rem 1.4rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(228, 203, 139, 0.5) transparent;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5rem), transparent);
            mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5rem), transparent);
  }

  .hero-info-body::-webkit-scrollbar { width: 6px; }
  .hero-info-body::-webkit-scrollbar-track { background: transparent; }
  .hero-info-body::-webkit-scrollbar-thumb { background: rgba(228, 203, 139, 0.45); border-radius: 6px; }
  .hero-info-body::-webkit-scrollbar-thumb:hover { background: rgba(228, 203, 139, 0.7); }

  .hero-info-note { flex: none; }
}

@media (max-width: 960px) {
  .hero-stats.hero-stats--info { max-width: 40rem; padding-right: 1.9rem; }
}

@media (max-width: 640px) {
  .hero-stats.hero-stats--info { padding: 1.35rem 1.25rem 1.1rem; }
  .hero-info-text,
  .hero-info-cta { font-size: 0.9rem; }
  .hero-info-list li { font-size: 0.87rem; }
}

/* Load sequence — the one orchestrated moment on the page.
   Driven by CSS on load, so it does not wait for IntersectionObserver. */
.hero .reveal,
.hero .reveal.visible {
  opacity: 1;
  animation: none;
}

.hero .hero-content > * {
  animation: hero-rise 0.9s var(--ease) backwards;
}

.hero .hero-content > .hero-badge      { animation-delay: 0.05s; }
.hero .hero-content > .hero-title      { animation-delay: 0.15s; }
.hero .hero-content > .hero-subtitle   { animation-delay: 0.27s; }
.hero .hero-content > .hero-cta-group  { animation-delay: 0.39s; }
.hero .hero-content > .hero-stats      { animation-delay: 0.30s; animation-duration: 1.1s; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-content > * { animation: none; }
}

/* ── Services ───────────────────────────────────────────────── */
.services-section {
  padding: var(--section-y) 0;
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.9rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition), translate var(--transition);
}

.service-card:hover {
  translate: 0 -4px;
  border-color: rgba(201, 164, 76, 0.65);
  box-shadow: var(--shadow-lg);
}

/* emoji set in a gold-tint chip so the mixed system glyphs read as one set */
.service-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1.35rem;
  font-size: 1.7rem;
  line-height: 1;
  border-radius: 18px;
  background: linear-gradient(150deg, #FCF7E8 0%, #F4E8C4 100%);
  border: 1px solid rgba(201, 164, 76, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ── Why choose us ──────────────────────────────────────────── */
.features-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--section-y) 0;
  color: var(--ink-body);
  background:
    radial-gradient(44rem 26rem at 0% 0%, rgba(31, 67, 130, 0.55), transparent 65%),
    radial-gradient(36rem 22rem at 100% 100%, rgba(201, 164, 76, 0.14), transparent 65%),
    var(--navy);
}

.features-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 55px, rgba(255, 255, 255, 0.04) 55px, rgba(255, 255, 255, 0.04) 56px);
}

.features-section .section-title {
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 0.25rem 2rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.feature-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 18px;
  background: rgba(201, 164, 76, 0.12);
  border: 1px solid rgba(201, 164, 76, 0.34);
}

.feature-text h4 {
  font-size: 1.12rem;
  margin-bottom: 0.45rem;
}

.feature-text p {
  font-size: 0.97rem;
  line-height: 1.65;
}

/* ── Home news preview (cards are built by js/news.js) ──────── */
#home-news-grid .card .card-body { padding: 1.25rem 1.3rem 1.45rem; }
#home-news-grid .card h3 { text-wrap: pretty; }
#home-news-grid .card a { color: var(--gold-ink) !important; }          /* inline style uses the fill gold */
#home-news-grid .card a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .feature-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .feature-item:nth-child(n + 3) { padding-top: 2.5rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .feature-item:nth-child(n + 3) { margin-top: -0.5rem; }
}

@media (max-width: 960px) {
  .hero { min-height: 0; }

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "badge"
      "title"
      "sub"
      "cta"
      "stats";
  }

  .hero-stats { margin-top: 3rem; max-width: 34rem; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .feature-item,
  .feature-item:nth-child(odd) { padding: 1.75rem 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 0; }
  .feature-item:first-child { padding-top: 0; border-top: 0; }

  .hero-cta-group .btn { flex: 1 1 100%; }
  .hero-stats { padding-inline: 1.25rem; }
  .hero-stat-num { font-size: 2.2rem; }
  .service-card { padding: 1.5rem; }
}
