/* MyXavi polish layer — UI/UX 10/10 refinements */

:root {
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(3.5rem, 8vw, 6.5rem);
  --radius-sm: 0.85rem;
  --radius-lg: 1.75rem;
  --shadow-soft: 0 20px 50px -28px rgba(14, 21, 48, 0.35);
  --shadow-lift: 0 28px 60px -32px rgba(14, 21, 48, 0.48);
  --focus: 0 0 0 3px rgba(199, 154, 58, 0.45);
}

/* —— Focus & selection —— */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 0.35rem;
}

::selection {
  background: rgba(199, 154, 58, 0.28);
  color: var(--ink);
}

/* —— Nav: clearer hierarchy + hero mode —— */
.site-header {
  height: 4.25rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(243, 245, 250, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--hairline);
  box-shadow: 0 10px 30px -24px rgba(14, 21, 48, 0.35);
}

.site-header.is-over-hero:not(.is-scrolled) .brand span,
.site-header.is-over-hero:not(.is-scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.9);
}

.site-header.is-over-hero:not(.is-scrolled) .nav-links a:hover,
.site-header.is-over-hero:not(.is-scrolled) .nav-links a[aria-current="page"] {
  color: #fff;
}

.site-header.is-over-hero:not(.is-scrolled) .nav-toggle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.nav-links a {
  position: relative;
  padding: 0.35rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-drawer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(14, 21, 48, 0.97);
  padding: 1.25rem 1.5rem 2rem;
  transform: translateY(-105%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.35s;
}

.nav-drawer.is-open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer a {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 0;
}

.nav-drawer .btn {
  margin-top: 1rem;
  border: none;
}

/* —— Buttons —— */
.btn {
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22), transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold:hover {
  box-shadow: 0 18px 40px -14px rgba(168, 120, 20, 0.65);
}

.btn-primary:hover {
  box-shadow: 0 18px 40px -14px rgba(30, 42, 94, 0.75);
}

/* —— Hero (base polish; final size/gap rules in effects.css) —— */
.hero {
  align-items: flex-start;
  min-height: 0;
  padding: calc(var(--nav-h) + 2.25rem) 0 2.5rem;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero .lead {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
}

.hero-meta {
  margin-top: 1.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.62);
}

.scroll-cue {
  position: absolute;
  right: clamp(1.25rem, 4vw, 2.5rem);
  bottom: 1.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-cue-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: cue-pulse 1.8s ease-in-out infinite;
}

@keyframes cue-pulse {
  0%,
  100% {
    transform: scaleY(0.65);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Hero content always visible — no opacity:0 trap */

/* —— Stack: no negative-margin gaps —— */
.stack-velocity {
  transform: translate3d(0, calc(var(--v-y, 0) * 1px), 0);
}

.site-footer.stack-footer {
  margin-top: 0;
}

/* —— Editorial panel —— */
.panel-editorial {
  padding: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid rgba(30, 42, 94, 0.08);
  box-shadow: var(--shadow-lift);
}

.panel-editorial-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .panel-editorial-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: start;
  }
}

.panel-editorial .lead {
  color: var(--ink);
  font-size: 1.15rem;
}

/* —— Sections —— */
.section {
  padding: var(--space-5) 0;
}

.section-head-wide {
  max-width: 46rem;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.text-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--navy);
  white-space: nowrap;
}

.text-link:hover {
  color: var(--gold-2);
}

/* —— Benefit rail (replaces heavy card grid) —— */
.benefit-rail {
  display: grid;
  gap: 1rem;
}

.benefit-item {
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

@media (min-width: 760px) {
  .benefit-item {
    grid-template-columns: auto 1fr;
    gap: 1.75rem;
    padding: 1.5rem 1.75rem;
  }

  .benefit-item:has(img) {
    grid-template-columns: auto 1fr min(240px, 28%);
  }
}

.benefit-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  color: var(--gold);
  line-height: 1;
}

.benefit-item h3 {
  margin: 0 0 0.4rem;
}

.benefit-item p {
  margin: 0;
  max-width: 40rem;
}

.benefit-item img {
  width: 100%;
  height: 8.5rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

@media (min-width: 760px) {
  .benefit-item img {
    height: 7.5rem;
  }
}

/* —— CTA band —— */
.section-cta {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.cta-band {
  display: grid;
  gap: 1.75rem;
  align-items: end;
}

@media (min-width: 800px) {
  .cta-band {
    grid-template-columns: 1.4fr 1fr;
  }

  .cta-band .cta-row {
    justify-content: flex-end;
    margin-top: 0;
  }
}

.section-cta h2 {
  max-width: 16ch;
}

/* —— Price cards —— */
.price-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}

.price-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.price-card .btn {
  margin-top: auto;
}

.price-card.featured {
  border-color: rgba(199, 154, 58, 0.45);
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(199, 154, 58, 0.14), transparent 55%),
    var(--navy-deep);
}

.price-card.featured .eyebrow {
  color: var(--gold) !important;
}

/* —— Article teasers —— */
.article-teaser {
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.article-teaser:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 42, 94, 0.18);
  box-shadow: var(--shadow-soft);
}

.article-teaser h2 {
  font-size: 1.2rem;
  margin: 0.2rem 0;
}

/* —— Page hero —— */
.page-hero {
  padding: calc(var(--nav-h) + 3.5rem) 0 3.25rem;
  background:
    radial-gradient(ellipse 55% 70% at 100% 0%, rgba(199, 154, 58, 0.14), transparent 55%),
    linear-gradient(180deg, #eef1f8 0%, var(--canvas) 100%);
}

.page-hero h1 {
  max-width: 15ch;
}

/* —— Media —— */
.media-frame {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.media-frame img {
  transition: clip-path 1s var(--ease), filter 0.5s var(--ease), transform 0.35s linear;
}

/* —— Contact cards —— */
.contact-card {
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  min-height: 100%;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* —— Footer —— */
.site-footer {
  padding: 4.5rem 0 2.25rem;
}

.footer-brand span {
  letter-spacing: -0.03em;
}

.footer-bottom {
  opacity: 0.85;
}

/* —— Reveal softer —— */
[data-reveal] {
  filter: none;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

/* —— WA float —— */
.wa-float {
  width: 58px;
  height: 58px;
  box-shadow: 0 14px 36px -10px rgba(37, 211, 102, 0.7);
}

.wa-float:hover {
  transform: scale(1.08) !important;
}

/* —— Mobile spacing —— */
@media (max-width: 700px) {
  .hero {
    padding-bottom: 3.25rem;
  }

  .scroll-cue {
    display: none;
  }
}
