/* =========================================================
   LEGAL HUB PAGE
   General legal navigation for Capital Chain.
   ========================================================= */

.legal-page{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 7% 34%,rgba(2,81,255,.045),transparent 24%),
    radial-gradient(circle at 92% 72%,rgba(2,81,255,.04),transparent 26%),
    #0b0d0f;
}

.legal-eyebrow,
.legal-section-index,
.legal-document-label,
.legal-panel-label{
  color:#397dff;
  font-size:13px;
  line-height:1;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.legal-text-link,
.legal-document-link{
  display:inline-flex;
  align-items:center;
  gap:9px;
  width:max-content;
  color:#eef2f6;
  font-size:15px;
  line-height:1.3;
  font-weight:600;
  text-decoration:none;
  transition:color .22s ease;
}

.legal-text-link span,
.legal-document-link span{
  transition:transform .22s ease;
}

.legal-text-link:hover,
.legal-document-link:hover{
  color:#79a5ff;
}

.legal-text-link:hover span,
.legal-document-link:hover span{
  transform:translateX(3px);
}

/* HERO */
.legal-hero{
  position:relative;
  width:min(1320px,calc(100% - 72px));
  min-height:540px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);
  gap:62px;
  align-items:center;
  isolation:isolate;
}

.legal-hero-ambient{
  position:absolute;
  z-index:-2;
  top:-180px;
  right:-90px;
  width:820px;
  height:720px;
  pointer-events:none;
  background:
    radial-gradient(circle at 56% 42%,
      rgba(2,81,255,.22) 0%,
      rgba(2,81,255,.095) 32%,
      rgba(2,81,255,.028) 52%,
      rgba(2,81,255,0) 73%);
  filter:blur(8px);
}

.legal-hero-copy{
  position:relative;
  z-index:2;
  max-width:790px;
  padding:66px 0 74px;
}

.legal-hero h1{
  margin:22px 0 26px;
  color:#f8f8f9;
  font-size:clamp(58px,5.25vw,78px);
  line-height:1.02;
  letter-spacing:-.054em;
  font-weight:600;
}

.legal-hero-copy>p{
  max-width:720px;
  margin:0;
  color:#d0d4da;
  font-size:20px;
  line-height:1.65;
  letter-spacing:-.02em;
}

.legal-hero-actions{
  display:flex;
  align-items:center;
  gap:28px;
  margin-top:38px;
}

.legal-hero-visual{
  position:relative;
  justify-self:end;
  width:min(440px,35vw);
  aspect-ratio:1;
}

.legal-doc-stack{
  position:absolute;
  left:50%;
  top:50%;
  width:205px;
  height:270px;
  border:1px solid rgba(84,134,255,.23);
  border-radius:24px;
  background:#10151e;
  box-shadow:0 20px 60px rgba(0,0,0,.28);
}

.legal-doc-back{
  transform:translate(-34%,-57%) rotate(8deg);
  opacity:.42;
}

.legal-doc-mid{
  transform:translate(-61%,-44%) rotate(-8deg);
  opacity:.64;
}

.legal-doc-front{
  transform:translate(-50%,-50%);
  padding:34px 28px;
  background:
    radial-gradient(circle at 28% 12%,rgba(2,81,255,.13),transparent 35%),
    #111722;
  animation:legalDocFloat 5.8s ease-in-out infinite;
}

.legal-doc-line{
  display:block;
  width:78%;
  height:8px;
  margin-bottom:15px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
}

.legal-doc-line-wide{
  width:92%;
  height:11px;
  background:rgba(111,157,255,.55);
}

.legal-doc-line-short{
  width:54%;
}

.legal-doc-seal{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  margin:38px auto 0;
  border:1px solid rgba(2,81,255,.34);
  border-radius:50%;
  background:rgba(2,81,255,.06);
  color:#dce7ff;
  font-size:24px;
  box-shadow:0 0 28px rgba(2,81,255,.11);
}

.legal-float-tag{
  position:absolute;
  min-width:120px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  background:rgba(13,18,27,.90);
  box-shadow:0 15px 35px rgba(0,0,0,.20);
  backdrop-filter:blur(8px);
}

.legal-float-tag span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#0251ff;
  box-shadow:0 0 12px rgba(2,81,255,.72);
}

.legal-float-tag strong{
  color:#dfe5ee;
  font-size:12px;
  font-weight:600;
}

.legal-tag-terms{left:0;top:40%}
.legal-tag-privacy{right:0;top:24%}
.legal-tag-risk{right:2%;bottom:19%}

/* OVERVIEW */
.legal-overview{
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
  gap:88px;
  align-items:center;
  padding-top:108px;
  padding-bottom:118px;
}

.legal-overview-heading{
  max-width:610px;
}

.legal-overview-heading .legal-section-index{
  display:block;
  margin-bottom:22px;
}

.legal-overview-heading h2,
.legal-section-heading h2{
  margin:0;
  color:#f5f5f6;
  font-size:clamp(40px,4vw,56px);
  line-height:1.08;
  letter-spacing:-.045em;
  font-weight:600;
}

.legal-overview-copy{
  padding-top:28px;
  border-top:1px solid rgba(255,255,255,.10);
}

.legal-overview-copy p{
  margin:0 0 25px;
  color:#c4c8cf;
  font-size:19px;
  line-height:1.74;
}

.legal-overview-copy p:last-child{
  margin-bottom:0;
}

/* SECTION SYSTEM */
.legal-section{
  position:relative;
  padding-top:110px;
  padding-bottom:118px;
  scroll-margin-top:130px;
}

.legal-alt{
  background:
    radial-gradient(circle at 6% 30%,rgba(2,81,255,.05),transparent 27%),
    #10141b;
}

.legal-section-heading{
  max-width:940px;
  margin:0 auto;
  text-align:center;
}

.legal-section-heading .legal-section-index{
  display:block;
  margin-bottom:22px;
}

.legal-section-heading p{
  max-width:760px;
  margin:22px auto 0;
  color:#b8bdc5;
  font-size:18px;
  line-height:1.68;
}

/* LEGAL DOCUMENTS */
.legal-document-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  max-width:1120px;
  margin:56px auto 0;
}

.legal-document-card{
  min-height:300px;
  display:flex;
  flex-direction:column;
  padding:31px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:23px;
  background:
    radial-gradient(circle at 12% 2%,rgba(2,81,255,.085),transparent 36%),
    #0f1319;
  transition:transform .24s ease,border-color .24s ease,background .24s ease;
}

.legal-document-card:hover{
  transform:translateY(-4px);
  border-color:rgba(2,81,255,.31);
  background:
    radial-gradient(circle at 12% 2%,rgba(2,81,255,.12),transparent 38%),
    #111722;
}

.legal-document-card h3{
  margin:28px 0 14px;
  color:#f5f6f7;
  font-size:26px;
  line-height:1.23;
  letter-spacing:-.034em;
}

.legal-document-card p{
  margin:0;
  color:#adb3bc;
  font-size:15px;
  line-height:1.68;
}

.legal-document-link{
  margin-top:auto;
  padding-top:30px;
}

/* REVIEW LIST */
.legal-review-list{
  max-width:1100px;
  margin:56px auto 0;
  border-top:1px solid rgba(255,255,255,.10);
}

.legal-review-row{
  display:grid;
  grid-template-columns:74px minmax(0,1fr);
  gap:28px;
  padding:31px 0 34px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.legal-review-row>span{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border:1px solid rgba(2,81,255,.40);
  border-radius:16px;
  color:#8db4ff;
  background:#0f151f;
  font-size:12px;
  font-weight:600;
}

.legal-review-row>div{
  display:grid;
  grid-template-columns:minmax(230px,.34fr) minmax(0,.66fr);
  gap:54px;
  align-items:start;
}

.legal-review-row h3{
  margin:0;
  color:#f3f4f5;
  font-size:25px;
  line-height:1.25;
  letter-spacing:-.034em;
}

.legal-review-row p{
  margin:0;
  color:#b5bbc4;
  font-size:16px;
  line-height:1.7;
}

/* SUPPORT */
.legal-support-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:54px;
  align-items:center;
  max-width:1100px;
  margin:0 auto;
  padding:40px;
  border:1px solid rgba(2,81,255,.20);
  border-radius:25px;
  background:
    radial-gradient(circle at 92% 8%,rgba(2,81,255,.13),transparent 34%),
    #0f1319;
}

.legal-support-panel h2{
  margin:22px 0 13px;
  color:#f4f5f6;
  font-size:clamp(34px,3.3vw,46px);
  line-height:1.1;
  letter-spacing:-.042em;
  font-weight:600;
}

.legal-support-panel p{
  max-width:700px;
  margin:0;
  color:#b8bec7;
  font-size:16px;
  line-height:1.7;
}

.legal-cta{
  padding-top:0;
}

/* MOTION */
@keyframes legalDocFloat{
  0%,100%{transform:translate(-50%,-50%) translateY(0)}
  50%{transform:translate(-50%,-50%) translateY(-10px)}
}

/* RESPONSIVE */
@media(max-width:1100px){
  .legal-hero{
    grid-template-columns:minmax(0,1fr) 350px;
    gap:36px;
    width:min(1320px,calc(100% - 54px));
  }

  .legal-hero-visual{
    width:350px;
  }

  .legal-document-grid{
    grid-template-columns:1fr;
  }

  .legal-document-card{
    min-height:260px;
  }
}

@media(max-width:900px){
  .legal-hero{
    min-height:auto;
    grid-template-columns:1fr;
    gap:0;
    padding-top:54px;
    padding-bottom:70px;
  }

  .legal-hero-copy{
    max-width:760px;
    padding:0;
  }

  .legal-hero-visual{
    justify-self:center;
    width:min(420px,70vw);
    margin-top:30px;
  }

  .legal-hero-ambient{
    top:-100px;
    left:50%;
    right:auto;
    transform:translateX(-50%);
  }

  .legal-overview{
    grid-template-columns:1fr;
    gap:34px;
    padding-top:94px;
    padding-bottom:104px;
  }

  .legal-section{
    padding-top:94px;
    padding-bottom:104px;
  }

  .legal-review-row>div{
    grid-template-columns:1fr;
    gap:13px;
  }

  .legal-support-panel{
    grid-template-columns:1fr;
    gap:28px;
  }
}

@media(max-width:620px){
  .legal-hero{
    width:calc(100% - 38px);
    padding-top:44px;
    padding-bottom:62px;
  }

  .legal-eyebrow,
  .legal-section-index,
  .legal-document-label,
  .legal-panel-label{
    font-size:11px;
  }

  .legal-hero h1{
    margin-top:18px;
    font-size:45px;
    letter-spacing:-.047em;
  }

  .legal-hero-copy>p{
    font-size:16px;
    line-height:1.62;
  }

  .legal-hero-actions{
    flex-direction:row;
    align-items:center;
    flex-wrap:nowrap;
    gap:14px;
    margin-top:30px;
  }

  .legal-hero-actions .button{
    min-height:50px;
    padding:0 18px;
    font-size:13px;
    white-space:nowrap;
  }

  .legal-hero-actions .legal-text-link{
    flex:0 0 auto;
    font-size:13px;
    white-space:nowrap;
  }

  .legal-hero-visual{
    width:min(350px,86vw);
  }

  .legal-float-tag{
    min-width:105px;
    padding:9px 10px;
  }

  .legal-tag-terms{left:-12px}
  .legal-tag-privacy{right:-12px}
  .legal-tag-risk{right:-12px}

  .legal-overview{
    padding-top:76px;
    padding-bottom:86px;
  }

  .legal-overview-heading h2,
  .legal-section-heading h2{
    font-size:34px;
  }

  .legal-overview-copy p,
  .legal-section-heading p{
    font-size:16px;
  }

  .legal-section{
    padding-top:76px;
    padding-bottom:86px;
  }

  .legal-section-heading .legal-section-index{
    margin-bottom:16px;
  }

  .legal-document-grid{
    margin-top:44px;
  }

  .legal-document-card{
    min-height:auto;
    padding:26px;
  }

  .legal-review-list{
    margin-top:44px;
  }

  .legal-review-row{
    grid-template-columns:1fr;
    gap:16px;
  }

  .legal-support-panel{
    padding:28px 24px;
  }
}

@media(max-width:360px){
  .legal-hero-actions{
    gap:10px;
  }

  .legal-hero-actions .button{
    min-height:48px;
    padding:0 14px;
    font-size:12px;
  }

  .legal-hero-actions .legal-text-link{
    font-size:12px;
  }
}

@media(prefers-reduced-motion:reduce){
  .legal-doc-front,
  .legal-document-card{
    animation:none !important;
    transition:none !important;
  }
}
