/* assets/css/how-it-works.css */

.hiw-hero{
  padding: 56px 0 34px;
}

.hiw-hero-inner{
  text-align: center;
}

.hiw-title{
  margin: 14px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hiw-sub{
  color: #334155;           /* was rgba(255,255,255,0.82) */
  font-size: 18px;
  line-height: 1.6;
}

.hiw-chips .trust-chip{
  background: rgba(233,254,255,.75);
  border: 1px solid rgba(17,119,255,.22);
  color: #0f172a;
}

.hiw-steps{
  padding: 26px 0 70px;
}

.hiw-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hiw-card{
  background: rgba(233,254,255,.72);                 /* light */
  border: 1px solid rgba(17,119,255,.22);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(2,6,23,.10);
  backdrop-filter: blur(14px);
  min-height: 260px;
  position: relative;
  overflow: hidden;
}

/* soft gradient sheen */
.hiw-card::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:
    radial-gradient(600px 220px at 15% 0%, rgba(17,119,255,.10), transparent 60%),
    radial-gradient(600px 220px at 90% 10%, rgba(233,254,255,.9), transparent 55%);
  pointer-events:none;
  z-index:0;
}

.hiw-card > *{ position: relative; z-index: 1; }

.hiw-card h3{
  color:#0f172a;
}

.hiw-card p{
  color:#334155;            /* was white */
}


.hiw-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hiw-step{
  color:#0f172a;
  background: rgba(17,119,255,.10);
  border: 1px solid rgba(17,119,255,.22);
}

.hiw-icon{
  background: linear-gradient(180deg, rgba(17,119,255,.14), rgba(233,254,255,.75));
  border: 1px solid rgba(17,119,255,.22);
  color:#0f172a;
}


.hiw-tags{
  margin-top: 14px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hiw-tag{
  background: rgba(17,119,255,.10);
  border: 1px solid rgba(17,119,255,.18);
  color:#0f172a;
}


.hiw-cta{
  margin-top: 22px;
}
.hiw-cta-inner{
  text-align: center;
  background: rgba(233,254,255,.72);
  border: 1px solid rgba(17,119,255,.22);
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(2,6,23,.10);
  backdrop-filter: blur(14px);
}

.hiw-cta-inner h2{ color:#0f172a; }

.hiw-cta-inner p{
  color:#334155;            /* was white */
}


.hiw-cta-actions{
  margin-top: 16px;
  display:flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 980px){
  .hiw-grid{ grid-template-columns: 1fr; }
  .hiw-card{ min-height: auto; }
}

/* FIX ghost button on light CTA section */
.hiw-cta .btn-ghost{
  color: #1177FF;                    /* primary blue text */
  border: 1px solid rgba(17,119,255,.35);
  background: rgba(17,119,255,.06);
}

.hiw-cta .btn-ghost:hover{
  background: rgba(17,119,255,.12);
}

.hiw-cta-actions{
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
/* =========================
   HOW IT WORKS – DEMO VIDEO
========================= */

.hiw-demo{
  margin: 3.5rem auto 3rem;
  text-align: center;
  max-width: 980px;
}

.hiw-demo-title{
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
}

.hiw-demo-sub{
  margin-top: .6rem;
  color: #64748b;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
}

/* responsive video */
.hiw-demo-frame{
  position: relative;
  margin-top: 1.4rem;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(17,119,255,.18);
  box-shadow: 0 22px 60px rgba(17,119,255,.18);
  background: #000;
}

/* 16:9 ratio */
.hiw-demo-frame::before{
  content:"";
  display:block;
  padding-top: 56.25%;
}

.hiw-demo-frame iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* Mobile polish */
@media (max-width: 640px){
  .hiw-demo{
    margin: 2.5rem auto 2.2rem;
  }

  .hiw-demo-title{
    font-size: 1.55rem;
  }
}

/* =========================
   VIDEO MODAL
========================= */

.video-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.video-modal.active{
  display: block;
}

.video-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.75);
  backdrop-filter: blur(6px);
}

/* modal box */
.video-modal-content{
  position: relative;
  max-width: 900px;
  width: 92%;
  margin: 6vh auto;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
}

/* close button */
.video-close{
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.video-close:hover{
  background: rgba(255,255,255,.25);
}

/* video aspect ratio */
.video-wrapper{
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}

.video-wrapper iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Mobile spacing */
@media (max-width: 600px){
  .video-modal-content{
    margin: 12vh auto;
  }
}
