/* =========================================================
   ClearTitle AI™ — Report Preview Center (modal-first)
   Files:
     - preview_center.html
     - preview_center.css
     - preview_center.js
   ========================================================= */

:root{
  --bg0:#050810;
  --bg1:#0b1220;
  --panel:rgba(15,23,42,.62);
  --panel2:rgba(15,23,42,.46);
  --stroke:rgba(255,255,255,.10);
  --stroke2:rgba(255,255,255,.16);
  --text:#eaf2ff;
  --muted:#a8bed6;
  --muted2:#7d92ab;
  --accent:#60a5fa;
  --accent2:#22d3ee;
  --warn:#fbbf24;
  --shadow: 0 26px 80px rgba(0,0,0,.55);
  --r:22px;
  --r2:18px;
  --max: 1120px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 18% 12%, rgba(96,165,250,.18), transparent 60%),
    radial-gradient(1000px 700px at 85% 80%, rgba(34,211,238,.14), transparent 55%),
    radial-gradient(700px 540px at 60% 32%, rgba(251,191,36,.09), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{ color: inherit; text-decoration:none; }
button{ font-family: inherit; }

/* -------- Orb mark -------- */
.orb{
  width:12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 5px rgba(96,165,250,.12);
  display:inline-block;
}
.orb--sm{ width:10px; height:10px; box-shadow: 0 0 0 4px rgba(96,165,250,.12); }

/* -------- Buttons -------- */
.btn{
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 750;
  font-size: 13.5px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  backdrop-filter: blur(10px);
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.20); }
.btn:active{ transform: translateY(0px); }

.btn--primary{
  border-color: rgba(96,165,250,.35);
  background: linear-gradient(135deg, rgba(96,165,250,.20), rgba(34,211,238,.12));
}
.btn--primary:hover{ border-color: rgba(96,165,250,.55); background: linear-gradient(135deg, rgba(96,165,250,.26), rgba(34,211,238,.16)); }

.btn--ghost{
  background: rgba(255,255,255,.04);
}
.btn--sm{ padding: 10px 12px; font-size: 12.6px; border-radius: 12px; }
.btn--full{ width: 100%; justify-content:center; }

/* -------- Page / Hero -------- */
.page{ max-width: var(--max); margin: 26px auto; padding: 0 18px 42px; }

.hero{
  border-radius: 28px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(15,23,42,.78), rgba(15,23,42,.52));
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}
.hero::before{
  content:"";
  position:absolute; inset:-120px;
  background:
    radial-gradient(900px 280px at 12% 10%, rgba(96,165,250,.22), transparent 60%),
    radial-gradient(820px 260px at 90% 0%, rgba(34,211,238,.18), transparent 58%),
    radial-gradient(720px 240px at 45% 35%, rgba(251,191,36,.12), transparent 65%);
  transform: rotate(2deg);
  pointer-events:none;
}
.hero__inner{ position:relative; padding: 26px 26px 22px; }
.hero__kicker{
  display:flex; align-items:center; gap:10px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing:.16px;
  text-transform: uppercase;
  font-size: 12px;
}
.hero__title{ margin: 14px 0 10px; font-size: 32px; line-height:1.12; letter-spacing:.25px; }
.hero__subtitle{ margin: 0; color: var(--muted); font-size: 15.2px; line-height: 1.62; max-width: 86ch; }

.hero__actions{
  margin-top: 16px;
  display:flex; flex-wrap: wrap; gap: 10px;
}

.hero__meta{
  margin-top: 16px;
  display:flex; flex-wrap:wrap; gap:10px;
}
.pill{
  display:inline-flex; gap:8px; align-items:center;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size: 12.6px;
  font-weight: 650;
}
.pill b{ color: var(--text); }
.pill__label{
  font-size: 11.2px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(96,165,250,.12);
  color: #cfe5ff;
  font-weight: 900;
  letter-spacing:.16px;
}

/* -------- Mini cards -------- */
.mini{ margin-top: 14px; }
.mini__grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mini__card{
  border: 1px solid var(--stroke);
  background: rgba(15,23,42,.50);
  border-radius: 20px;
  padding: 14px 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.mini__k{
  color: var(--muted2);
  font-size: 12px;
  letter-spacing:.16px;
  text-transform: uppercase;
  font-weight: 850;
  margin-bottom: 6px;
}
.mini__v{ font-weight: 900; font-size: 14.3px; }
.mini__s{ margin-top: 6px; color: var(--muted); font-size: 12.8px; line-height: 1.5; }

.foot{ margin-top: 16px; }
.foot__fine{ color: var(--muted2); font-size: 11.6px; line-height: 1.5; padding: 0 2px; }

/* =========================================================
   MODAL
   ========================================================= */
.modal{ position: fixed; inset: 0; display:none; z-index: 9999; }
.modal.is-open{ display:block; }
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(6px);
}
.modal__dialog{
  position:relative;
  width: min(1180px, calc(100% - 28px));
  height: min(82vh, 760px);
  margin: 7vh auto 0;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(7,10,18,.92), rgba(9,14,24,.90));
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction: column;
}
.modal__header{
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.03);
}
.modal__title{ font-weight: 950; font-size: 16px; letter-spacing:.2px; }
.modal__subtitle{ margin-top: 4px; color: var(--muted); font-size: 12.8px; line-height: 1.45; }
.modal__headerActions{ display:flex; gap: 8px; flex-wrap: wrap; align-items:center; justify-content:flex-end; }

.modal__body{
  flex:1;
  display:grid;
  grid-template-columns: 310px 1fr;
  min-height:0; /* important for scroll areas */
}
.modal__footer{
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  background: rgba(7,10,18,.92); /* more opaque than .03 */
  backdrop-filter: blur(10px);
}

/* Left rail */
.rail{
  border-right: 1px solid rgba(255,255,255,.08);
  background: rgba(2,6,23,.20);
  padding: 16px 14px 14px;
  display:flex;
  flex-direction: column;
  gap: 12px;
  min-height:0;
  overflow-y: auto;
  padding-bottom: 90px; /* so the bottom CTA isn't covered */
}


.rail__brand{ display:flex; gap: 10px; align-items:center; padding: 6px 6px 2px; }
.rail__logo{ width: 34px; height: 34px; border-radius: 14px; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(96,165,250,.20), rgba(34,211,238,.12));
  border: 1px solid rgba(96,165,250,.25);
}
.rail__name{ font-weight: 950; font-size: 13.6px; }
.rail__sub{ color: var(--muted); font-size: 12.2px; margin-top: 2px; }

.rail__nav{ display:flex; flex-direction: column; gap: 6px; padding: 6px 4px 0; }
.rail__link{
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-weight: 800;
  font-size: 12.8px;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.rail__link:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: var(--text); }
.rail__link.is-active{
  background: linear-gradient(135deg, rgba(96,165,250,.20), rgba(34,211,238,.12));
  border-color: rgba(96,165,250,.35);
  color: #d7ecff;
}
.rail__divider{ height:1px; background: rgba(255,255,255,.08); margin: 2px 4px; }
.rail__block{ padding: 0 6px; }
.rail__label{ color: var(--muted2); font-size: 12px; font-weight: 900; letter-spacing:.14px; text-transform: uppercase; margin-bottom: 8px; }
.rail__cta{
  display:block;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 850;
  margin-bottom: 8px;
}
.rail__cta:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.rail__pill{
  display:inline-flex;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,.30);
  background: rgba(96,165,250,.10);
  font-weight: 950;
  color: #d7ecff;
  font-size: 12.6px;
}
.rail__muted{ margin-top: 8px; color: var(--muted); font-size: 12.2px; line-height: 1.45; }

.rail__stickyCta{
  margin-top: auto;
  padding: 10px 6px 0;
}
.rail__fine{
  margin-top: 8px;
  color: var(--muted2);
  font-size: 11.5px;
  line-height: 1.45;
}

/* Right content */
.content{
  min-height:0;
  overflow: auto;
  padding: 16px 16px 18px;
  scroll-behavior: smooth;
}
.content__footer{ padding: 8px 6px 0; }
.content__fine{ color: var(--muted2); font-size: 11.6px; line-height: 1.5; }

/* Summary box */
.summary{
  border-radius: 20px;
  border: 1px solid rgba(6,182,212,.26);
  background: linear-gradient(135deg, rgba(6,182,212,.16), rgba(14,116,144,.12));
  padding: 14px 14px;
  margin-bottom: 12px;
}
.summary__title{
  font-weight: 950;
  color: #d7f7ff;
  letter-spacing:.2px;
  margin-bottom: 10px;
}
.summary__list{ margin:0; padding-left: 18px; color: var(--text); }
.summary__list li{ margin: 7px 0; line-height: 1.55; }
.summary__list b{ color: #eaf2ff; }

/* Sections */
.section{
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(15,23,42,.46);
  box-shadow: 0 18px 52px rgba(0,0,0,.35);
  overflow:hidden;
  margin-top: 12px;
}
.section__head{
  display:flex; gap: 12px; align-items:flex-start;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.section__n{
  width: 34px; height: 34px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(96,165,250,.18), rgba(34,211,238,.14));
  border: 1px solid rgba(96,165,250,.22);
  color: #d6ecff;
  font-weight: 950;
}
.section__title{ margin: 0; font-size: 15.5px; letter-spacing:.14px; }
.section__desc{ margin: 6px 0 0; color: var(--muted); font-size: 13.2px; line-height: 1.55; max-width: 90ch; }

.section__grid{
  display:grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
}
.section__copy{
  padding: 14px 14px 16px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.section__shot{
  margin:0;
  padding: 14px 14px 16px;
  background: rgba(2,6,23,.20);
}

.bullets{ margin:0; padding-left: 18px; }
.bullets li{ margin: 7px 0; line-height: 1.6; color: var(--text); }
.bullets b{ color: #d7ecff; }

.tags{ margin-top: 10px; display:flex; flex-wrap:wrap; gap: 8px; }
.tag{
  font-size: 11.5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(138,209,230,.22);
  background: rgba(34,211,238,.08);
  color: #ccefff;
  font-weight: 850;
  white-space: nowrap;
}
.tag--warn{
  border-color: rgba(251,191,36,.28);
  background: rgba(251,191,36,.10);
  color: #ffe6ad;
}

.shot{
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  display:block;
  cursor: zoom-in;
}
.cap{
  margin-top: 8px;
  color: var(--muted2);
  font-size: 11.6px;
  line-height: 1.4;
}

/* Wide section */
.section--wide .section__grid{ grid-template-columns: 1fr; }
.wideShot{ margin:0; padding: 14px 14px; background: rgba(2,6,23,.20); }
.wideCopy{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 14px 14px;
}
.wideCopy__card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 12px 12px;
}
.wideCopy__k{
  color: var(--muted2);
  font-size: 11.8px;
  font-weight: 950;
  letter-spacing:.14px;
  text-transform: uppercase;
}
.wideCopy__v{ margin-top: 6px; font-weight: 950; font-size: 13.2px; }
.wideCopy__s{ margin-top: 6px; color: var(--muted); font-size: 12.4px; line-height: 1.5; }

/* Footer bar */
.footerbar{
  display:flex; align-items:center; justify-content:space-between; gap: 12px;
  padding: 12px 14px;
}
.footerbar__headline{ font-weight: 950; letter-spacing:.2px; }
.footerbar__sub{ margin-top: 2px; color: var(--muted); font-size: 12.6px; line-height: 1.35; }
.footerbar__right{ display:flex; gap: 8px; flex-wrap: wrap; justify-content:flex-end; }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox{ position: fixed; inset: 0; display:none; z-index: 10000; }
.lightbox.is-open{ display:block; }
.lightbox__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.74);
  backdrop-filter: blur(6px);
}
.lightbox__panel{
  position:relative;
  width: min(1100px, calc(100% - 28px));
  height: min(86vh, 880px);
  margin: 5vh auto 0;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(2,6,23,.86);
  box-shadow: 0 28px 90px rgba(0,0,0,.60);
  overflow:hidden;
  display:flex;
  flex-direction: column;
}
.lightbox__close{
  position:absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  cursor:pointer;
}
.lightbox__close:hover{ background: rgba(255,255,255,.10); }
.lightbox__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 44px 14px 12px;
}
.lightbox__hint{
  padding: 8px 14px 12px;
  color: var(--muted2);
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px){
  .mini__grid{ grid-template-columns: 1fr; }
  .modal__dialog{ height: min(86vh, 860px); }
  .modal__body{ grid-template-columns: 1fr; }
  .rail{ border-right:none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .rail__stickyCta{ margin-top: 4px; }
  .section__grid{ grid-template-columns: 1fr; }
  .section__copy{ border-right:none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .wideCopy{ grid-template-columns: 1fr; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce){
  .btn{ transition:none; }
  .content{ scroll-behavior: auto; }
}

/* Scrollbar-only: matches pilot modal scrollbars without changing layout */
.ct-glass-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 209, 230, 0.3) rgba(15, 23, 42, 0.3);
  scroll-behavior: smooth;
}

.ct-glass-scrollbar::-webkit-scrollbar { width: 10px; }
.ct-glass-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 10px;
  margin: 8px 0;
}
.ct-glass-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg,
    rgba(138, 209, 230, 0.4) 0%,
    rgba(96, 165, 250, 0.4) 100%);
  border-radius: 10px;
  border: 2px solid rgba(10, 14, 22, 0.3);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
.ct-glass-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg,
    rgba(138, 209, 230, 0.6) 0%,
    rgba(96, 165, 250, 0.6) 100%);
  border-color: rgba(138, 209, 230, 0.2);
}
.ct-glass-scrollbar::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg,
    rgba(138, 209, 230, 0.8) 0%,
    rgba(96, 165, 250, 0.8) 100%);
}

.sample-link-subtext{
  margin-top: 4px;
  font-size: 0.78rem;
  color: rgba(212, 228, 247, 0.65);
}
.preview-backbar{
  position: sticky;
  top: 0;
  z-index: 9999;
  padding: 10px 16px;
  background: rgba(10, 14, 22, 0.70);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.preview-backbtn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #eaf2ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.preview-backbtn:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(138,209,230,0.25);
  transform: translateY(-1px);
}
