/* === hero.css (MOGA FINAL + FB CARD CAROUSEL) === */

/* =========================================================
   === HERO
   ========================================================= */

.hero{
  padding: 40px 0 60px;
  position: relative;
  overflow: hidden;
}

/* soft background wash */
.hero::before{
  content:"";
  position:absolute;
  inset:-120px -160px;
  background:
    radial-gradient(900px 500px at 20% 35%, rgba(0,90,187,0.08), transparent 65%),
    radial-gradient(700px 420px at 78% 42%, rgba(254,214,0,0.10), transparent 65%),
    radial-gradient(900px 520px at 50% 120%, rgba(0,0,0,0.03), transparent 60%);
  pointer-events:none;
  z-index:0;
}

/* subtle grain */
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: .08;
  pointer-events:none;
  z-index:0;
}

.hero__inner{
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: var(--media-w) 1fr;
  column-gap: clamp(22px, 4vw, 64px);
  align-items: center;
}

.hero__media,
.hero__copy{
  position: relative;
  animation: hero-in .5s ease both;
  z-index: 1;
}

.hero__media{ justify-self: start; }

.hero__copy{
  justify-self: end;
  max-width: var(--hero-copy);

  height: auto;
  min-height: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  animation-delay: .08s;
}

/* right side glow for text */
.hero__copy::before{
  content:"";
  position:absolute;
  inset:-40px -60px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0.0) 70%);
  filter: blur(2px);
  z-index:-1;
  border-radius: 44px;
}

.hero__title{
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero__lead{
  margin: 0 0 18px;
  color: rgba(7,19,15,0.72);
  line-height: 1.7;
  font-size: 15px;
  max-width: 48ch;
}

.actions{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

@keyframes hero-in{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform:none; }
}

/* =========================================================
   === HERO UNDERLINE – CONTROLLED STAGGER
   ========================================================= */

.hero__title .t-accent{
  position: relative;
  display: inline-block;
}

.hero__title .t-accent::after{
  content:"";
  position:absolute;
  left: 0.08em;
  right: 0.08em;
  bottom: -0.14em;
  height: 0.22em;
  border-radius: 999px;
  background: rgba(254,214,0,0.78);
  z-index: -1;

  transform: skewX(-8deg) scaleX(0);
  transform-origin: left center;
  animation: underline-draw .75s ease-out forwards;
}

.hero__title .t-accent--1::after{
  animation-delay: .15s;
  animation-duration: .60s;
}

.hero__title .t-accent--2::after{
  animation-delay: .30s;
  animation-duration: 1.00s;
}

@keyframes underline-draw{
  0%   { transform: skewX(-8deg) scaleX(0); opacity: 0; }
  10%  { opacity: 1; }
  85%  { transform: skewX(-8deg) scaleX(1.04); }
  100% { transform: skewX(-8deg) scaleX(1); }
}

/* =========================================================
   === FACEBOOK POST CARD (Hero Carousel)
   === Inspired by CodePen structure, but:
   === - No side previews
   === - Pure CSS (no Sass)
   ========================================================= */

.fb-post{
  width: min(100%, calc(var(--media-w) * 1.15));
  border-radius: 22px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 36px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Header */
.fb-post__header{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.45);
}

.fb-post__user{
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fb-post__avatar{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.08);
}

.fb-post__name{
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.fb-post__sub{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(7,19,15,0.62);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fb-post__sub i{
  font-size: 12px;
  color: rgba(0,90,187,0.9);
}

/* Media area */
.fb-post__media{
  background: rgba(0,0,0,0.03);
}

.fb-post__slides{
  position: relative;
  width: var(--media-w);
  height: var(--media-h);
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.fb-post__slide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transform: scale(1.02);
  animation: fb-fade 12s ease-in-out infinite;
  will-change: opacity, transform;
}

/* 4 slides = delays of 0/4/8/12 */
.fb-post__slide:nth-child(1){ animation-delay: 0s; }
.fb-post__slide:nth-child(2){ animation-delay: 3s; }
.fb-post__slide:nth-child(3){ animation-delay: 6s; }
.fb-post__slide:nth-child(4){ animation-delay: 9s; }

/* Only one visible at a time (no peeking prev/next) */
@keyframes fb-fade{
  0%   { opacity: 0; transform: scale(1.02); }
  8%   { opacity: 1; transform: scale(1.00); }
  25%  { opacity: 1; transform: scale(1.00); }
  33%  { opacity: 0; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.02); }
}

.fb-post:hover .fb-post__slide{
  animation-play-state: paused;
}

/* Footer */
.fb-post__footer{
  padding: 10px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.45);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fb-post__actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.fb-post__btn{
  width: 36px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.fb-post__btn i{
  font-size: 16px;
  color: rgba(7,19,15,0.78);
}

.fb-post__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.12);
}

.fb-post__link{
  font-size: 12px;
  color: rgba(0,90,187,0.95);
  font-weight: 700;
}

/* =========================================================
   === FB LIKE BUTTON CLICK ANIMATION
   ========================================================= */

.fb-post__btn{
  position: relative;
  overflow: hidden;
  transition: transform .15s ease;
}

/* press feedback */
.fb-post__btn:active{
  transform: scale(.92);
}

/* liked state */
.fb-post__btn.is-liked{
  background: white;
  border-color: #005abb;
}

/* heart pulse animation */
.fb-post__btn.is-liked i{
  animation: like-pop .4s ease;
  color: #005abb;
}

@keyframes like-pop{
  0%   { transform: scale(1); }
  35%  { transform: scale(1.35); }
  65%  { transform: scale(.9); }
  100% { transform: scale(1); }
}


/* =========================================================
   === REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce){
  .hero__title .t-accent::after{
    animation: none !important;
    transform: skewX(-8deg) scaleX(1);
    opacity: 1;
  }
  .fb-post__slide{
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   === SMALL SCREENS
   ========================================================= */

@media (max-width: 980px){
  .hero__inner{
    grid-template-columns: 1fr;
    row-gap: 18px;
  }

  .hero__media{ justify-self: center; }
  .hero__copy{ justify-self: center; text-align: left; }

  .fb-post{
    width: min(100%, 560px);
  }

  .fb-post__slides{
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

/* =========================================================
   === FIX: SHOW HERO ARROW ON iPad/iPhone
   === hero.css currently clips it via overflow:hidden
   ========================================================= */

@media (max-width: 1024px){
  /* allow arrow to render (no clipping) */
  .hero{
    overflow: visible !important;
  }

  /* keep grain/wash inside hero even when overflow is visible */
  .hero::before,
  .hero::after{
    pointer-events: none;
  }

  /* pin arrow to viewport so it doesn't get pushed below fold */
  .scroll-down{
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;

    transform: translateX(-50%);
    z-index: 9999 !important;

    display: grid !important;
    place-items: center !important;

    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* iPhone 12 Pro-ish */
@media (max-width: 480px){
  .scroll-down{
    width: 68px !important;
    height: 68px !important;
    font-size: 34px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}

/* iPad Mini/Air */
@media (min-width: 768px) and (max-width: 1024px){
  .scroll-down{
    width: 76px !important;
    height: 76px !important;
    font-size: 38px !important;
  }
}
