/* =========================================================
   SONALIKA — PREMIUM FULL-BLEED HERO
   Used on: Home · Tractors · Spare Parts
   Scoped to .hero.phero — keeps .hnav + loader untouched.
   ========================================================= */

/* ── Base ──────────────────────────────────────────────── */
.hero.phero {
  --navy:   #0a0f28;
  --navy-2: #060a1e;
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: block;
  background: #070c22;
  color: #fff;
}

/* ── Ambient glows (behind the photo) ──────────────────── */

/* warm gold bloom — sits near the tractor wheel/hood */
.phero::before {
  content: "";
  position: absolute; z-index: 1;
  right: 10%; bottom: 0;
  width: 55vw; height: 55vw;
  transform: translate(22%, 28%);
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle,
    rgba(255,180,0,.28) 0%,
    rgba(255,110,0,.07) 42%,
    transparent 65%);
  filter: blur(16px);
}

/* cool blue rim — top right, sky feel */
.phero::after {
  content: "";
  position: absolute; z-index: 1;
  right: -6%; top: -14%;
  width: 44vw; height: 44vw;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle,
    rgba(40,100,240,.26) 0%,
    transparent 62%);
  filter: blur(36px);
}

/* ── Full-bleed Photo ───────────────────────────────────── */
.phero-photo {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  pointer-events: none;
  filter: brightness(.78) contrast(1.1) saturate(1.08);
  opacity: 0;
  transform: scale(1.07);
  will-change: transform, opacity;
}
.hero.phero.in .phero-photo {
  animation: pheroPhoto 2.2s cubic-bezier(.16,1,.3,1) .1s forwards;
}
@keyframes pheroPhoto {
  to { opacity: 1; transform: scale(1.0); }
}

/* ── Cinematic multi-layer veil ─────────────────────────── */
.phero-veil {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    /* Left side — deep darkness for text legibility */
    linear-gradient(96deg,
      rgba(6,10,30,.96) 0%,
      rgba(6,10,30,.80) 24%,
      rgba(6,10,30,.30) 50%,
      transparent 68%),
    /* Top vignette — nav breathing room */
    linear-gradient(180deg,
      rgba(6,10,30,.78) 0%,
      rgba(6,10,30,.18) 22%,
      transparent 42%),
    /* Bottom blend — merges into the next section */
    linear-gradient(0deg,
      rgba(8,12,34,.96) 0%,
      rgba(8,12,34,.42) 20%,
      transparent 42%);
}

/* ── Grain overlay ──────────────────────────────────────── */
.phero .grain {
  position: absolute; inset: 0; z-index: 4;
  opacity: .12; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Drifting dust motes ────────────────────────────────── */
.phero-dust {
  position: absolute; z-index: 5;
  bottom: 10%; right: 18%; width: 40%; height: 44%;
  pointer-events: none;
}
.phero-dust i {
  position: absolute; bottom: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,216,140,.9), transparent 70%);
  opacity: 0;
}
.phero-dust i:nth-child(1){ left:10%;  animation: pheroMote 6.5s ease-in 1.0s infinite; }
.phero-dust i:nth-child(2){ left:32%; width:5px; height:5px; animation: pheroMote 7.5s ease-in 2.3s infinite; }
.phero-dust i:nth-child(3){ left:54%;  animation: pheroMote 8.0s ease-in 0.6s infinite; }
.phero-dust i:nth-child(4){ left:74%; width:9px; height:9px; animation: pheroMote 7.0s ease-in 3.1s infinite; }
.phero-dust i:nth-child(5){ left:88%; width:4px; height:4px; animation: pheroMote 9.0s ease-in 1.7s infinite; }
@keyframes pheroMote {
  0%   { opacity: 0; transform: translateY(0) scale(.6); }
  18%  { opacity: .9; }
  100% { opacity: 0; transform: translateY(-160px) translateX(28px) scale(1.4); }
}

/* ── Copy column ────────────────────────────────────────── */
.phero-in {
  position: relative; z-index: 10;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(120px, 14vh, 164px);
  padding-bottom: clamp(80px, 10vh, 120px);
}
.phero-copy { max-width: 620px; }

/* ── Eyebrow ────────────────────────────────────────────── */
.phero .eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--display);
  font-weight: 700; font-size: 12.5px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-2); margin-bottom: 20px;
}
.phero .eyebrow::before {
  content: ""; width: 32px; height: 2.5px;
  border-radius: 3px; background: var(--gold); flex: none;
}

/* ── Dealer chip ─────────────────────────────────────────── */
.phero-loc {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 26px; padding: 9px 16px 9px 13px;
  border-radius: 100px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .3s, background .3s, transform .3s var(--ease,ease);
}
.phero-loc:hover { border-color: var(--gold); background: rgba(255,255,255,.12); transform: translateY(-2px); }
.phero-loc svg  { width: 15px; height: 15px; color: var(--gold-2); }
.phero-loc b    { color: #fff; font-weight: 700; }

/* ── Headline ────────────────────────────────────────────── */
.phero-h {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(48px, 7vw, 116px);
  line-height: .93;
  letter-spacing: -.038em;
  color: #fff;
  margin: 0;
  text-wrap: balance;
}
/* gold script accent word */
.phero-h .script {
  font-family: var(--serif,Georgia,serif);
  font-style: italic; font-weight: 400;
  color: var(--gold-2); letter-spacing: -.01em;
  position: relative; padding-right: .05em;
}
/* animated underline stroke */
.phero-h .script::after {
  content: "";
  position: absolute; left: 0; right: .05em; bottom: .04em;
  height: 2px; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), rgba(255,206,92,0));
  transform: scaleX(0); transform-origin: 0 50%;
}
.hero.phero.in .phero-h .script::after {
  animation: pheroStroke 1.1s cubic-bezier(.16,1,.3,1) 1.1s forwards;
}
@keyframes pheroStroke { to { transform: scaleX(1); } }

/* ── Sub-heading ─────────────────────────────────────────── */
.phero-sub {
  margin-top: 26px;
  font-size: clamp(15.5px, 1.3vw, 19px);
  line-height: 1.58; font-weight: 500;
  color: rgba(255,255,255,.68);
  max-width: 46ch;
}

/* ── CTA buttons ─────────────────────────────────────────── */
.phero-actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px;
}
.phero-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 32px; border-radius: 100px;
  font-family: var(--display); font-weight: 700; font-size: 15px;
  cursor: pointer;
  transition:
    transform .35s cubic-bezier(.16,1,.3,1),
    box-shadow .35s,
    background .25s,
    border-color .25s;
}
.phero-btn svg { width: 18px; height: 18px; flex: none; }

/* gold primary */
.phero-btn.primary {
  background: linear-gradient(148deg, #ffce5c, #f4b400);
  color: #0d1530;
  box-shadow: 0 18px 44px -14px rgba(244,180,0,.65),
              inset 0 1px 0 rgba(255,255,255,.4);
  position: relative; overflow: hidden;
}
.phero-btn.primary::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.3) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .6s cubic-bezier(.5,0,.2,1);
}
.phero-btn.primary:hover { transform: translateY(-3px); box-shadow: 0 26px 56px -16px rgba(244,180,0,.78); }
.phero-btn.primary:hover::after { transform: translateX(120%); }

/* ghost secondary */
.phero-btn.ghost {
  background: rgba(255,255,255,.07);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.24);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.phero-btn.ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(255,206,92,.65);
  background: rgba(255,255,255,.13);
}

/* ── Typing cursor (injected into .phero-h by JS) ────────── */
.phero-cursor {
  display: inline-block;
  width: 3px;
  height: .78em;
  background: #fff;
  border-radius: 2px;
  margin-left: 3px;
  vertical-align: middle;
  animation: cursorBlink .65s step-end infinite;
}
.phero-cursor.done {
  animation: none;
  opacity: 0;
  transition: opacity .4s ease .2s;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
/* suppress fade-up on the h1 while typing is running */
.phero-h.is-typing {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
/* trigger underline stroke after typing finishes */
.phero-h .script.typed::after {
  animation: pheroStroke 1.1s cubic-bezier(.16,1,.3,1) forwards;
}

/* ── Trust stats — dark glass card strip ────────────────── */
.phero-stats {
  display: flex;
  gap: 0;
  margin-top: clamp(38px, 5.5vh, 60px);
  background: rgba(4, 8, 26, 0.76);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  overflow: hidden;
  width: fit-content;
}
.phero-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 26px;
}
.phero-stat + .phero-stat {
  border-left: 1px solid rgba(255,255,255,.1);
  padding-left: 26px;
}
.phero-stat .ic {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; border-radius: 12px;
  color: var(--gold-2);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
}
.phero-stat .ic svg { width: 22px; height: 22px; }
.phero-stat .tx b {
  display: block;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1; color: #fff; letter-spacing: -.02em;
}
.phero-stat .tx b span { color: var(--gold-2); }
.phero-stat .tx > span {
  display: block; margin-top: 4px;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,.52);
}

/* ── "World's No.1" badge (injected by JS) ───────────────── */
.phero-no1-badge {
  position: absolute;
  bottom: clamp(60px, 9vh, 100px);
  right: clamp(28px, 4vw, 56px);
  z-index: 12;
  width: 118px; height: 118px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  text-align: center;
  background: conic-gradient(from 0deg, #c8880a, #f9cf40, #f4b400, #e8a200, #c8880a);
  border: 3px solid rgba(255,255,255,.28);
  box-shadow:
    0 0 0 7px rgba(244,180,0,.16),
    0 14px 44px -14px rgba(244,160,0,.65),
    inset 0 1px 0 rgba(255,255,255,.35);
  animation: badgePop .7s cubic-bezier(.16,1,.3,1) 1.4s both;
}
@keyframes badgePop {
  from { opacity:0; transform:scale(.6) rotate(-12deg); }
  to   { opacity:1; transform:none; }
}
.phero-no1-badge .badge-worlds {
  font-family: var(--display); font-weight: 800;
  font-size: 9px; letter-spacing: .2em;
  color: rgba(8,12,36,.75); text-transform: uppercase;
}
.phero-no1-badge .badge-no1 {
  font-family: var(--display); font-weight: 900;
  font-size: 30px; color: #070d28;
  line-height: 1; letter-spacing: -.02em; display: block;
}
.phero-no1-badge .badge-brand {
  font-family: var(--display); font-weight: 800;
  font-size: 8.5px; letter-spacing: .12em;
  color: rgba(8,12,36,.72); text-transform: uppercase;
  line-height: 1.3; max-width: 80px; text-align: center;
}

/* ── Scroll indicator (injected by JS) ───────────────────── */
.phero-scroll-hint {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: rgba(255,255,255,.32);
  font-family: var(--display); font-weight: 600;
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  opacity: 0;
  transition: opacity .5s ease 2.2s;
}
.hero.phero.in .phero-scroll-hint { opacity: 1; }
.phero-scroll-hint svg {
  width: 20px; height: 20px;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* ── Staggered entrance fades ───────────────────────────── */
.phero .fade { opacity: 0; transform: translateY(28px); }
.hero.phero.in .fade {
  animation: pheroUp .95s cubic-bezier(.16,1,.3,1) forwards;
}
.hero.phero.in .fade.d1 { animation-delay: .14s; }
.hero.phero.in .fade.d2 { animation-delay: .28s; }
.hero.phero.in .fade.d3 { animation-delay: .44s; }
.hero.phero.in .fade.d4 { animation-delay: .60s; }
.hero.phero.in .fade.d5 { animation-delay: .76s; }
@keyframes pheroUp { to { opacity: 1; transform: none; } }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .phero .fade, .phero-photo, .phero-h .script::after,
  .phero-scroll-hint { opacity: 1; transform: none; animation: none; transition: none; }
  .phero-scroll-hint svg { animation: none; }
}

/* ── Tablet (980px) ─────────────────────────────────────── */
@media (max-width: 980px) {
  .phero-photo { object-position: 70% center; }
  .phero-veil {
    background:
      linear-gradient(180deg,
        rgba(6,10,30,.78) 0%, rgba(6,10,30,.28) 30%,
        rgba(6,10,30,.52) 62%, rgba(8,12,34,.96) 100%),
      linear-gradient(96deg,
        rgba(6,10,30,.88) 0%, rgba(6,10,30,.50) 36%,
        transparent 62%);
  }
  .phero-copy { max-width: 560px; }
}

/* ── Mobile (560px) — full-bleed with bottom-aligned content ── */
@media (max-width: 560px) {
  .hero.phero { min-height: 100svh; display: flex; flex-direction: column; }

  .phero-photo {
    object-position: 60% center;
    filter: brightness(.72) contrast(1.1) saturate(1.0);
  }

  .phero-veil {
    background: linear-gradient(180deg,
      rgba(4,7,22,.88) 0%,
      rgba(4,7,22,.22) 26%,
      rgba(4,7,22,.18) 48%,
      rgba(4,7,22,.82) 66%,
      rgba(4,7,22,.97) 100%);
  }

  .phero-in {
    justify-content: flex-end;
    padding-top: 72px;
    padding-bottom: clamp(24px, 5vh, 40px);
    padding-inline: clamp(18px, 5vw, 26px);
    min-height: 100svh;
  }
  .phero-copy { max-width: 100%; }
  .phero-loc  { display: none; }

  .phero .eyebrow {
    font-size: 10.5px; letter-spacing: .22em;
    color: var(--gold-2); margin-bottom: 10px;
  }
  .phero .eyebrow::before { width: 18px; height: 2px; }

  .phero-h  { font-size: clamp(38px, 11.5vw, 56px); line-height: .92; }
  .phero-sub { font-size: 14px; max-width: 36ch; margin-top: 12px; line-height: 1.5; }

  .phero-actions {
    flex-direction: column; gap: 10px;
    margin-top: 22px; align-items: stretch;
  }
  .phero-btn.primary {
    width: 100%; justify-content: center;
    padding: 16px 24px; font-size: 15px;
  }
  .phero-btn.ghost {
    background: none !important; border: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    border-bottom: 1.5px solid rgba(255,255,255,.28) !important;
    border-radius: 0 !important; padding: 0 0 3px !important;
    color: rgba(255,255,255,.78) !important;
    width: fit-content; align-self: flex-start; font-size: 14px;
  }

  .phero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; flex-wrap: nowrap !important;
    margin-top: 20px;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    border: none; border-radius: 0; overflow: visible; width: auto;
  }
  .phero-stat {
    flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; text-align: center;
    background: rgba(0,0,0,.52);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 14px; padding: 12px 6px;
  }
  .phero-stat + .phero-stat { border-left: 1px solid rgba(255,255,255,.13); padding-left: 6px; }
  .phero-stat .ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.08); }
  .phero-stat .ic svg { width: 14px; height: 14px; }
  .phero-stat .tx b  { font-size: clamp(18px, 5.5vw, 26px); color: var(--gold-2); }
  .phero-stat .tx > span { font-size: 10px; color: rgba(255,255,255,.55); line-height: 1.3; margin-top: 1px; }

  .phero-dust        { display: none; }
  .phero-scroll-hint { display: none; }
}
