/* assets/css/home_layers.css — CLEAN (Home Only)
   Cleaned & de-duplicated.
   - Mobile-first
   - Single source of truth for Tools Carousel + Quickbar
*/

/* =========================
   TOKENS
   ========================= */
:root{
  --home-radius: 28px;
  --home-shadow: 0 18px 60px rgba(15,23,42,.12);
  --home-border: 1px solid rgba(10,58,74,.10);
}

.home-layers{
  padding-bottom: 44px;
  font-family: 'Cairo', sans-serif !important;
}
.home-layers *{ font-family: inherit !important; }

/* =========================
   HERO
   ========================= */
.home-hero{
  position: relative;
  overflow: hidden;
  min-height: 84vh;
  padding: 70px 0 165px;
  background:
    radial-gradient(circle at 15% 20%, rgba(26,140,148,.26), transparent 56%),
    radial-gradient(circle at 80% 12%, rgba(233,182,34,.22), transparent 50%),
    linear-gradient(180deg, #0A3A4A 0%, #071f27 58%, #05161c 100%);
  color:#fff;
}
.home-hero::before{
  content:"";
  position:absolute;
  inset:-220px -260px auto auto;
  width:640px;height:640px;border-radius:50%;
  border:28px solid rgba(26,140,148,.20);
  box-shadow: inset 0 0 0 12px rgba(233,182,34,.14);
  transform: rotate(10deg);
  opacity:.9;
}
.home-hero::after{
  content:"";
  position:absolute;
  inset:auto auto -260px -260px;
  width:700px;height:700px;border-radius:50%;
  border:28px solid rgba(233,182,34,.16);
  transform: rotate(-12deg);
  opacity:.68;
}

.hero-kicker{
  display:inline-flex;gap:.5rem;align-items:center;
  font-weight:800;font-size:.95rem;
  color: rgba(255,255,255,.86);
  padding:.35rem .75rem;border-radius:999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
}
.hero-title{
  margin:16px 0 14px;
  font-weight:800;line-height:1.35;
  font-size: clamp(1.25rem, 2.8vw, 2.1rem);
  max-width: 22ch;
}
.hero-lead{
  margin:0 0 18px;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height:1.95;
  color: rgba(255,255,255,.84);
  max-width:70ch;
}
.hero-promises{ margin:0 0 22px; padding-right:1.1rem; color: rgba(255,255,255,.80); }
.hero-promises li{ margin-bottom:.45rem; line-height:1.78; }

.hero-wheel-wrap{ display:flex; align-items:center; justify-content:center; min-height:460px; }
.home-hero .row.align-items-center.g-4{ --bs-gutter-x: 3.25rem; }
.home-hero .col-lg-5{ padding-right: 2.25rem !important; }
.hero-home--on-dark .hero-wheel{
  transform: scale(1.22) translateX(-38px);
  transform-origin:center;
  filter: drop-shadow(0 24px 60px rgba(0,0,0,.38));
}

.hero-lens-note{
  display:inline-flex; align-items:center; gap:10px;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(233,182,34,.16);
  border: 1px solid rgba(233,182,34,.38);
  color: rgba(255,255,255,.92);
  font-weight:800;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

/* =========================
   HERO QUICKBAR
   Mobile: 2x2 grid
   Desktop: 4 in one row
   ========================= */
.hero-quickbar-wrap{ margin-top: 18px; }
.hero-quickbar{
  border-radius:22px;
  padding:16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}
.hero-quickbar .side-title{ font-weight:900; color:#fff; margin:0 0 6px; font-size:1.15rem; }
.hero-quickbar .side-text{ color: rgba(255,255,255,.80); line-height:1.78; margin:0; font-size:.98rem; max-width:110ch; }
.hero-quickbar a{ text-decoration:none; color:inherit; display:block; }

.hero-quickbar .side-quick--row{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.hero-quickbar .quick-card{
  border-radius:16px; padding:12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  height:100%;
}
.hero-quickbar .quick-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  background: rgba(255,255,255,.09);
}
.hero-quickbar .quick-card .t{ font-weight:900; color:#fff; margin-bottom:4px; }
.hero-quickbar .quick-card .d{ color: rgba(255,255,255,.78); font-size:.9rem; line-height:1.6; margin:0; }

@media (min-width: 992px){
  .hero-quickbar .side-quick--row{
    display:flex;
    flex-wrap: nowrap;
    gap: 1rem;
  }
  .hero-quickbar .side-quick--row > a{
    flex: 1 1 0;
    min-width: 0;
  }
}

/* =========================
   LAYERS (Cards)
   ========================= */
.home-layers .layers{ position:relative; margin-top:-56px !important; }
.home-layers .layer{
  position:relative;
  border-radius: var(--home-radius);
  padding: 26px 0;
  box-shadow: var(--home-shadow);
  border: var(--home-border);
  backdrop-filter: blur(14px);
  overflow:hidden;
}
.home-layers .layer + .layer{ margin-top:-28px !important; }
.home-layers .layer::before{
  content:""; position:absolute; inset:-120px auto auto -140px;
  width:420px;height:420px;border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 62%);
  opacity:.55;
}
.home-layers .layer::after{
  content:""; position:absolute; inset:auto -160px -180px auto;
  width:520px;height:520px;border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 64%);
  opacity:.42;
}
.home-layers .layer-inner{ position:relative; z-index:1; }

.layer.l1{
  background:
    radial-gradient(circle at 18% 20%, rgba(26,140,148,.18), transparent 58%),
    linear-gradient(180deg, rgba(26,140,148,.08), rgba(255,255,255,.86));
}
.layer.l2{
  background:
    radial-gradient(circle at 20% 25%, rgba(233,182,34,.20), transparent 60%),
    linear-gradient(180deg, rgba(233,182,34,.08), rgba(255,255,255,.86));
}
.layer.l3{
  background:
    radial-gradient(circle at 20% 25%, rgba(10,58,74,.12), transparent 62%),
    linear-gradient(180deg, rgba(10,58,74,.06), rgba(255,255,255,.86));
}
.layer.l4{
  background:
    radial-gradient(circle at 18% 22%, rgba(26,140,148,.14), transparent 60%),
    radial-gradient(circle at 80% 18%, rgba(233,182,34,.12), transparent 58%),
    linear-gradient(180deg, rgba(26,140,148,.06), rgba(255,255,255,.86));
}

/* Head */
.home-layers .layer-head{
  display:flex; flex-wrap:wrap;
  align-items:flex-end; justify-content:space-between;
  gap:10px; margin-bottom:14px;
}
.home-layers .layer-tag{
  display:inline-flex; align-items:center; gap:.45rem;
  font-weight:900; font-size:.9rem;
  padding:.38rem .85rem; border-radius:999px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(10,58,74,.12);
  color: var(--brand-dark);
}
.home-layers .layer-title{ font-weight:900; color: var(--brand-dark); margin:10px 0 6px; font-size:1.65rem; }
.home-layers .layer-desc{ color: rgba(10,58,74,.84); line-height:1.95; margin:0 0 10px; max-width:85ch; font-size:1.02rem; }
.home-layers .layer-micro{ color: rgba(10,58,74,.72); font-size:.98rem; line-height:1.8; margin:0; max-width:85ch; }

/* Picked box */
.home-layers .picked-box{
  width: 320px;
  max-width: 100%;
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(233,182,34,.92), rgba(245,189,57,.86));
  border: 1px solid rgba(10,58,74,.18);
  box-shadow: 0 18px 46px rgba(15,23,42,.14);
  overflow:hidden; /* ensure ellipsis never spills */
}
@media (max-width: 992px){ .home-layers .picked-box{ width: 100%; } }

.home-layers .picked-title{ font-weight:900; font-size:.95rem; margin:0 0 8px; color: rgba(10,58,74,.95); }
.home-layers .picked-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; width:100%; }
.home-layers .picked-list li{ min-width:0; }
.home-layers .picked-link{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  text-decoration:none;
  color: rgba(10,58,74,.96);
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(10,58,74,.12);
  border-radius: 14px;
  padding: .55rem .7rem;
  font-size:.9rem;
  font-weight:800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-layers .picked-link:hover{ background: rgba(255,255,255,.96); border-color: rgba(10,58,74,.20); }

/* Tool card */
.home-layers .tool-card{
  position: relative;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.86));
  border: 1px solid rgba(10,58,74,.12);
  box-shadow: 0 16px 44px rgba(15,23,42,.10);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  min-height: 178px;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  overflow:hidden;
}
.home-layers .tool-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:6px;
  background: var(--brand-base);
  opacity:.95;
}
.home-layers .tool-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(15,23,42,.14);
  border-color: rgba(26,140,148,.22);
}
.home-layers .tool-name{ font-weight:900; color: var(--brand-dark); margin:0 0 6px; font-size:1.08rem; }
.home-layers .tool-text{ color: rgba(10,58,74,.78); margin:0 0 12px; line-height:1.8; font-size:.95rem; }
.home-layers .tool-meta{
  display:flex; justify-content:space-between; align-items:center;
  gap:10px; color: rgba(10,58,74,.70);
  font-size:.88rem;
  border-top: 1px solid rgba(10,58,74,.10);
  padding-top: 10px;
}
.home-layers .tool-meta a{ color: var(--brand-base); text-decoration:none; font-weight:900; }
.home-layers .tool-meta a:hover{ color: var(--brand-dark); text-decoration: underline; }
.home-layers .tool-card.is-soon a{ pointer-events:none; opacity:.7; }
.home-layers .soon-hint{ font-weight:900; color: rgba(10,58,74,.70); }

.home-layers .soon-badge{
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:900; font-size:.85rem;
  padding:.25rem .65rem;
  border-radius:999px;
  background: rgba(10,58,74,.08);
  border: 1px solid rgba(10,58,74,.14);
  color: rgba(10,58,74,.72);
}

/* =========================
   TOOLS CAROUSEL (Single Source)
   - Scroll container: .tools-track (LTR to stabilize scrollLeft)
   - Visual order: .tools-track-inner row-reverse (first card appears right)
   - Mobile: peek + fade, no arrows
   ========================= */
.home-layers .tools-strip{ position:relative; margin-top:14px; display:flex; align-items:center; }

.home-layers .tools-track{
  direction: ltr;
  display:block;
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 2px 12px; /* mobile default */
}
.home-layers .tools-track::-webkit-scrollbar{ display:none; }

.home-layers .tools-track-inner{
  display:inline-flex;
  width:max-content;
  flex-direction: row-reverse;
  gap: 12px;
}

.home-layers .tools-track-inner .tool-card{
  direction: rtl;
  flex: 0 0 86vw;      /* mobile peek */
  max-width: 86vw;
}

/* Mobile affordance: edge fade */
@media (max-width: 576px){
  .home-layers .strip-nav{ display:none !important; }

  .home-layers .tools-strip::after{
    content:"";
    position:absolute;
    top:0; bottom:0;
    right:0;
    width: 34px;
    pointer-events:none;
    background: linear-gradient(270deg, rgba(255,255,255,.92), rgba(255,255,255,0));
  }
}

/* Tablet+ : show arrows + narrower cards */
@media (min-width: 577px){
  .home-layers .tools-track{ padding: 2px 42px; } /* room for arrows */

  .home-layers .tools-track-inner .tool-card{
    flex: 0 0 clamp(240px, 44vw, 360px);
    max-width: clamp(240px, 44vw, 360px);
  }

  .home-layers .strip-nav{
    position:absolute;
    top:50%;
    transform: translateY(-50%);
    width:44px;height:44px;border-radius:999px;
    border: 1px solid rgba(10,58,74,.18);
    background: rgba(255,255,255,.88);
    color: rgba(10,58,74,.92);
    font-weight:900;
    font-size: 1.35rem;
    line-height:1;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-shadow: 0 16px 40px rgba(15,23,42,.14);
    z-index: 50;
    cursor:pointer;
  }
  .home-layers .strip-nav:hover{ background: rgba(255,255,255,.96); border-color: rgba(10,58,74,.26); }
  .home-layers .strip-nav:disabled{ opacity:.35; cursor:not-allowed; box-shadow:none; }

  /* RTL: NEXT on the left, PREV on the right */
  .home-layers .strip-nav.prev{ right: -10px; left: auto; }
  .home-layers .strip-nav.next{ left: -10px; right: auto; }
}

/* Desktop: three-cards feel */
@media (min-width: 992px){
  .home-layers .tools-track-inner .tool-card{
    flex: 0 0 clamp(260px, 30vw, 360px);
    max-width: clamp(260px, 30vw, 360px);
  }
}

/* =========================
   RESPONSIVE (Hero minor)
   ========================= */
@media (max-width: 992px){
  .home-hero{ min-height:auto; padding:58px 0 150px; }
  .home-hero .row.align-items-center.g-4{ --bs-gutter-x: 1.5rem; }
  .home-hero .col-lg-5{ padding-right:0 !important; }
  .hero-wheel-wrap{ min-height: 340px; }
  .hero-home--on-dark .hero-wheel{ transform: scale(1.06); }
}
@media (max-width: 576px){
  .home-hero{ padding:58px 0 140px; }
  .hero-wheel-wrap{ min-height: 300px; }
}

/* =========================
   Bottom two panels
   ========================= */
.home-layers .bottom-narrative--two{
  margin-top: 22px;
  padding: 22px 0 0;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 992px){
  .home-layers .bottom-narrative--two{ grid-template-columns: 1fr; }
}
.home-layers .bottom-panel{
  border-radius: var(--home-radius);
  padding: 20px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.86));
  border: 1px solid rgba(10,58,74,.12);
  box-shadow: var(--home-shadow);
}
.home-layers .bottom-panel h2{
  font-weight:900;
  font-size:1.45rem;
  margin:0 0 8px;
  color: var(--brand-dark);
}
.home-layers .bottom-panel p{
  margin:0 0 12px;
  color: rgba(10,58,74,.80);
  line-height:1.95;
}
.home-layers .bottom-panel .mini{ margin-top:1rem; font-size:1rem; opacity:.95; }
.home-layers .mini-list{ margin:.35rem 0 0; padding:0 1.2rem 0; }
.home-layers .mini-steps{ margin:.35rem 0 0; padding:0 1.2rem 0; }
