/* ============================================================
   PROVADIA — The Chamber of Trust (privacy + terms pages)
   design/trust.css — companion to pages.css / sections/panels.css.
   Palette law (town only): field #141210 · antique gold #C9A227 ·
   bone cream #E9DDC6 · deep brown #30251B · pale gold #FFEFC1
   (the room pages' light text tone — pages.css --pale — used for
   titles, highlights and washes). The bright ignition gold is RESERVED for
   portal-ring light only and is deliberately NOT used here.
   Type: Cinzel (display) + Inter (body) — loaded by the host page.
   NO-JS law: every element below is fully visible by default.
   Dimmed scroll staging is applied ONLY under html.js (the class
   trust.js adds), so a page without JS never hides anything.
   ============================================================ */

/* ---------- The chamber ---------- */
.trust-chamber{
  position:relative;
  max-width:680px;
  margin:0 auto 18px;
  padding:2.75rem 2.5rem 2.5rem;
  background:rgba(20,18,16,.9);
  border:1px solid rgba(201,162,39,.38);
  color:#E9DDC6;
  box-sizing:border-box;
}
.trust-chamber *{box-sizing:border-box}
.trust-chamber::before{
  content:"";
  position:absolute;inset:6px;
  border:1px solid rgba(201,162,39,.18);
  pointer-events:none;
}
.trust-eyebrow{
  margin:0 0 1rem;
  font-family:Cinzel,serif;
  font-size:.68rem;font-weight:600;
  letter-spacing:.32em;text-transform:uppercase;
  color:#C9A227;line-height:1.5;text-align:center;
}
.trust-eyebrow::after{
  content:"";display:block;
  width:44px;height:1px;background:#C9A227;
  margin:.85rem auto 0;opacity:.75;
}

/* ---------- Centrepiece: twin scales over a sealed codex ---------- */
.trust-scales{
  display:block;
  width:min(400px,100%);
  height:auto;
  margin:.4rem auto 1.2rem;
}
/* The beam starts tipped -2.5deg and settles level, once, on load.
   transform-origin sits at the beam's centre pivot (200,62 in the
   400x300 viewBox); transform-box:view-box makes that origin exact
   at any rendered size. */
.trust-scales .beam{
  transform-box:view-box;
  transform-origin:200px 62px;
  transform:rotate(-2.5deg);
  animation:trust-beam-settle 2.2s ease-out forwards;
}
@keyframes trust-beam-settle{
  0%{transform:rotate(-2.5deg)}
  55%{transform:rotate(.7deg)}
  78%{transform:rotate(-.25deg)}
  100%{transform:rotate(0deg)}
}

.trust-title{
  margin:0 0 1rem;
  font-family:Cinzel,serif;font-weight:700;
  font-size:clamp(1.45rem,5.4vw,2rem);
  line-height:1.15;letter-spacing:.05em;
  color:#FFEFC1;text-transform:uppercase;text-align:center;
}
.trust-lede{
  margin:0 auto 1.6rem;max-width:56ch;
  font-size:1rem;line-height:1.65;
  color:rgba(233,221,198,.86);text-align:center;
}
/* Hidden film slot: the captain's Flow clip lands here later
   without rework; it occupies no space while hidden. */
.trust-film{display:none}

/* ---------- The four vows ---------- */
.trust-vows{display:grid;grid-template-columns:1fr;gap:14px}
.trust-vow{
  position:relative;
  border:1px solid rgba(201,162,39,.28);
  background:rgba(48,37,27,.35);
  padding:1.35rem 1.4rem 1.25rem 1.4rem;
}
/* Tip dot: 9px gold circle marking the vow's anchor point. */
.vow-dot{
  position:absolute;top:1.55rem;left:1.4rem;
  width:9px;height:9px;border-radius:50%;
  background:#C9A227;
  box-shadow:0 0 0 3px rgba(201,162,39,.18);
}
/* Mobile (<760px): the leader line is a simple top border on the
   card. Scoped to small screens: on desktop the ::before hairline
   below is the leader, and the card keeps its uniform 1px frame. */
@media (max-width:759px){
  .trust-vow{border-top:2px solid rgba(201,162,39,.45)}
  /* The leader on mobile: a vertical hairline dropping from the
     card's top border straight through the tip dot's centre, so
     dot and line are one connected bullet at every width. */
  .trust-vow::before{
    content:"";
    position:absolute;top:0;left:calc(1.4rem + 4px);
    width:1px;height:calc(1.55rem + 4px);
    background:rgba(201,162,39,.65);
  }
}
.vow-num{
  margin:0 0 .55rem;padding-left:26px;
  font-family:Cinzel,serif;font-size:.66rem;font-weight:600;
  letter-spacing:.28em;color:#C9A227;
}
.vow-name{
  margin:0 0 .6rem;
  font-family:Cinzel,serif;font-weight:700;
  font-size:1.02rem;line-height:1.3;letter-spacing:.06em;
  color:#FFEFC1;text-transform:uppercase;
}
.vow-body{margin:0;font-size:.94rem;line-height:1.65;color:rgba(233,221,198,.84)}

/* Desktop: 2x2 grid; the leader line becomes a 34px horizontal
   hairline running from the tip dot toward the card's text. */
@media (min-width:760px){
  .trust-vows{grid-template-columns:1fr 1fr}
  .trust-vow::before{
    content:"";
    /* top = dot top (1.88rem) + 4px, so the 1px line passes through
       the 9px dot's centre instead of clipping its top edge. */
    position:absolute;top:calc(1.88rem + 4px);left:1.4rem;
    width:34px;height:1px;
    background:rgba(201,162,39,.65);
  }
  .vow-dot{top:1.88rem}
  .vow-num{padding-left:48px}
}

/* Scroll staging — ONLY when JS is present (html.js). Each vow
   starts dimmed and lowered; trust.js adds .is-lit as it enters. */
html.js .trust-vow{opacity:.25;transform:translateY(10px)}
html.js .trust-vow.is-lit{
  opacity:1;transform:none;
  transition:opacity .6s ease,transform .6s ease;
}

/* ---------- Full-text head: intro, index, print ---------- */
.trust-fulltext-head{
  max-width:680px;margin:0 auto 18px;
  padding:1.6rem 2.5rem 1.5rem;
  background:rgba(20,18,16,.9);
  border:1px solid rgba(201,162,39,.38);
  box-sizing:border-box;
}
.trust-fulltext-title{
  margin:0 0 .7rem;
  font-family:Cinzel,serif;font-weight:700;
  font-size:1.35rem;letter-spacing:.06em;
  color:#FFEFC1;text-transform:uppercase;
}
.trust-fulltext-note{margin:0 0 1.1rem;font-size:.95rem;line-height:1.65;color:rgba(233,221,198,.84)}
.trust-index ul{list-style:none;margin:0 0 1.2rem;padding:0}
.trust-index li{border-top:1px solid rgba(201,162,39,.22);padding:.55rem 0}
.trust-index a{
  color:#C9A227;text-decoration:none;
  font-family:Cinzel,serif;letter-spacing:.08em;font-size:.84rem;text-transform:uppercase;
}
.trust-index a:hover,.trust-index a:focus{color:#FFEFC1}
/* The print control exists only when JS can run it (html.js):
   a real-looking button that silently does nothing would be
   placeholder functionality, which the Receipt Law forbids. */
.trust-print{display:none}
html.js .trust-print{display:inline-block}
.trust-print{
  appearance:none;cursor:pointer;
  background:rgba(201,162,39,.08);
  border:1px solid rgba(201,162,39,.55);
  color:#FFEFC1;
  font-family:Cinzel,serif;letter-spacing:.12em;font-size:.72rem;
  text-transform:uppercase;
  padding:.62rem 1rem;
  transition:background .2s,border-color .2s;
}
.trust-print:hover{background:rgba(201,162,39,.2);border-color:#C9A227}
/* Visible keyboard focus, in the house manner (shared.css uses a
   pale outline on the shell pages; the legal pages do not load
   shared.css, so trust.css carries its own). Colour change alone
   on :focus is not enough to track keyboard travel. */
.trust-print:focus-visible,.trust-index a:focus-visible{
  outline:2px solid #FFEFC1;outline-offset:3px;
}

/* ---------- Small screens (<=375px must work) ---------- */
@media (max-width:640px){
  .trust-chamber{padding:2.1rem 1.35rem 1.9rem}
  .trust-fulltext-head{padding:1.3rem 1.35rem 1.25rem}
  .trust-title{font-size:1.4rem}
}

/* ---------- Reduced motion: nothing moves, everything shows ---------- */
@media (prefers-reduced-motion:reduce){
  .trust-scales .beam{animation:none;transform:rotate(0deg)}
  html.js .trust-vow{opacity:1;transform:none;transition:none}
  .trust-print{transition:none}
}

/* ---------- Print: the law on paper, black on white ---------- */
@media print{
  .doors,.trust-scales,.trust-print,.trust-film{display:none!important}
  body,.room,.trust-chamber,.trust-fulltext-head,.town-panel{
    background:#fff!important;color:#000!important;
  }
  .trust-chamber,.trust-fulltext-head,.trust-vow,.town-panel{
    border-color:#000!important;page-break-inside:avoid;
  }
  .trust-eyebrow,.trust-title,.trust-fulltext-title,.vow-num,.vow-name,
  .panel-title,.panel-eyebrow,.trust-index a{color:#000!important}
  .trust-lede,.trust-fulltext-note,.vow-body,.panel-body{color:#000!important}
  /* The room head and foot sit outside the blocks above: without
     these, the page title prints pale-on-white (invisible), the
     lede and the contract address print as faint washes, and
     panel/footer links keep their pale-gold screen colour. */
  .room-eyebrow,.room-title,.room-lede{color:#000!important}
  .footer-contract,.sign-off{color:#000!important}
  .town-panel a,.room-foot a{color:#000!important;text-decoration-color:#000!important}
  html.js .trust-vow{opacity:1!important;transform:none!important}
  .vow-dot{box-shadow:none}
}
