/* ============================================================
   DPAI — Terms of Service ("Pre-Flight Briefing")
   Extends styles/site.css. Only the net-new patterns live here:
   the boarding-pass summary tweaks, the sticky "flight plan" TOC,
   and the numbered clause blocks with plain-English callouts.
   ============================================================ */

/* ---- Hero (centered legal variant) ---- */
.terms-hero .wrap {
  max-width: 860px;
  text-align: center;
  padding-top: clamp(52px, 8vw, 100px);
  padding-bottom: clamp(46px, 7vw, 84px);
}
.terms-hero h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  margin: 16px 0 18px;
  letter-spacing: -0.02em;
}
.terms-hero .hero-sub { margin-inline: auto; }

/* ============================================================
   30-SECOND "SAFETY BRIEFING" — floating bifold card
   Navy safety-card masthead + a two-page body (cover + checklist),
   on a pointer-tilt / glare / float scene (like the homepage outro).
   ============================================================ */
.terms-summary { padding-top: clamp(40px, 6vw, 64px); }

.brief-scene { perspective: 1100px; }
.brief-float { animation: brief-float 6s ease-in-out infinite; will-change: transform; }
@keyframes brief-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.briefcard {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.25s ease;
  box-shadow: 0 40px 90px -40px rgba(10, 28, 43, 0.55);
}
.brief-scene:hover .briefcard { box-shadow: 0 60px 110px -38px rgba(10, 28, 43, 0.55); }

/* pointer-tracking glare */
.bc-glare {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 46%);
  opacity: 0; transition: opacity 0.3s ease; mix-blend-mode: screen;
}
.brief-scene:hover .bc-glare { opacity: 1; }

/* ---- Masthead (navy safety-card strip) ---- */
.bc-mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(22px, 3vw, 34px);
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
.bc-mast .bc-logo { height: 30px; width: auto; flex: none; filter: brightness(0) invert(1); }
.bc-id { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.bc-kick { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #9fc0d8; }
.bc-type { font-size: clamp(1.05rem, 2.4vw, 1.45rem); font-weight: 800; letter-spacing: 0.01em; line-height: 1; color: #fff; }
.bc-rev { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }

/* ---- Two-page body ---- */
.bc-body { display: grid; grid-template-columns: 0.92fr auto 1.08fr; }

/* ---- Left page: the "cover" ---- */
.bc-cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(165deg, #fff, var(--blue-softer));
  padding: clamp(26px, 3.4vw, 40px);
}
.bc-cover h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-bottom: 12px; }
.bc-cover h2 span { color: var(--blue-deep); }
.bc-cover p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---- Center fold crease ---- */
.bc-fold {
  position: relative;
  width: 0;
  border-left: 2px dashed var(--line);
  margin: clamp(22px, 3vw, 32px) 0;
}
.bc-fold::before,
.bc-fold::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-softer);
  border: 1px solid var(--line);
}
.bc-fold::before { top: -9px; }
.bc-fold::after { bottom: -9px; }

/* ---- Right page: the checklist ---- */
.bc-list {
  list-style: none;
  margin: 0;
  padding: clamp(20px, 2.8vw, 30px) clamp(24px, 3.2vw, 38px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bc-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  font-size: 0.97rem;
  color: var(--ink-soft);
  line-height: 1.4;
  border-bottom: 1px dashed var(--line);
}
.bc-list li:last-child { border-bottom: 0; }
.bc-list li b { color: var(--ink); }
.bc-mark {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.bc-mark svg { width: 14px; height: 14px; }
.bc-list li.do   .bc-mark { background: rgba(40, 200, 100, 0.16); color: #1a9b63; }
.bc-list li.dont .bc-mark { background: rgba(209, 73, 91, 0.16); color: #d1495b; }
.bc-list li.note .bc-mark { background: var(--gold-soft); color: var(--gold-deep); }

/* ============================================================
   BRIEFING BODY · sticky TOC + clause stack
   ============================================================ */
.terms-grid {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

/* ---- Left rail: "flight plan" table of contents ---- */
.toc {
  position: sticky;
  top: 92px;
  align-self: start;
}
.toc-lab {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.toc-lab svg { width: 15px; height: 15px; color: var(--gold-deep); }
.toc nav { display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.toc-link span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  transition: color 0.18s ease;
}
.toc-link:hover { background: var(--blue-softer); color: var(--ink); }
.toc-link.is-active {
  background: var(--blue-softer);
  color: var(--blue-deep);
  border-left-color: var(--gold);
  font-weight: 600;
}
.toc-link.is-active span { color: var(--gold-deep); }

/* ---- Right column: clause blocks ---- */
.clauses { min-width: 0; }
.clause {
  scroll-margin-top: 92px;
  padding-bottom: clamp(28px, 4vw, 44px);
  margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px dashed var(--line);
}
.clause:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.clause h3 {
  font-size: clamp(1.32rem, 3vw, 1.85rem);
  margin: 8px 0 14px;
}
.clause p { color: var(--ink-soft); margin-bottom: 12px; }
.clause p:last-child { margin-bottom: 0; }
.clause a { color: var(--blue-deep); font-weight: 600; }
.clause a:hover { text-decoration: underline; }
.clause ul {
  margin: 4px 0 14px;
  padding-left: 20px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.clause ul li::marker { color: var(--gold-deep); }
.clause strong { color: var(--ink); }

/* "In plain English" gold callout (mirrors .usecase-output) */
.clause .plain {
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.96rem;
}
.clause .plain b { color: var(--gold-deep); }

/* ---- Closing contact band ---- */
.terms-contact .statement h2 { margin-bottom: 14px; }
.terms-contact .statement .terms-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 26px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .bc-body { grid-template-columns: 1fr; }
  .bc-fold {
    width: auto;
    height: 0;
    border-left: 0;
    border-top: 2px dashed var(--line);
    margin: 0 clamp(24px, 6vw, 38px);
  }
  .bc-fold::before { top: 50%; left: -9px; transform: translateY(-50%); }
  .bc-fold::after { top: 50%; left: auto; right: -9px; bottom: auto; transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .brief-float { animation: none; }
  .briefcard { transform: none !important; }
}

@media (max-width: 860px) {
  .terms-grid { grid-template-columns: 1fr; }
  .toc {
    position: static;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow);
    margin-bottom: clamp(28px, 6vw, 40px);
  }
  .toc nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 10px;
  }
}
@media (max-width: 480px) {
  .toc nav { grid-template-columns: 1fr; }
  .terms-contact .statement .terms-contact-actions .btn { width: 100%; }
}
