/* STORM — Security, Trust & Compliance page
   Uses the shared tokens from storm-minimal.css (--m-*). */

body[data-page="security-trust"] { margin: 0; color: var(--m-copy); background: var(--m-white); }
body[data-page="security-trust"] main, body[data-page="security-trust"] main *, body[data-page="security-trust"] main *::before, body[data-page="security-trust"] main *::after { box-sizing: border-box; }
body[data-page="security-trust"] main { overflow: hidden; }
body[data-page="security-trust"] main img { max-width: 100%; height: auto; }

.trust-shell { width: min(1220px, calc(100% - 56px)); margin-inline: auto; }
.trust-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.trust-kicker { display: inline-block; color: var(--m-orange); font: 600 14px/1.3 var(--m-ui); letter-spacing: .01em; }
.trust-title { margin: 14px 0 0; color: var(--m-black); font-size: clamp(30px, 3.4vw, 46px); }
.trust-lede { max-width: 620px; margin: 18px 0 0; color: var(--m-copy); font-size: 17px; line-height: 1.7; }
.trust-note { margin: 18px 0 0; color: var(--m-grey); font-size: 14px; font-style: italic; line-height: 1.6; }

/* ---------- Buttons ---------- */
.trust-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust-btn { min-height: 50px; padding: 13px 22px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 5px; font: 500 15px/1.2 var(--m-ui); text-decoration: none; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.trust-btn--primary { color: #fff; background: var(--m-blue); }
.trust-btn--primary:hover, .trust-btn--primary:focus-visible { background: var(--m-blue-dark); }
.trust-btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.trust-btn--ghost:hover, .trust-btn--ghost:focus-visible { background: rgba(255,255,255,.08); }
.trust-btn--light { flex: 0 0 auto; color: var(--m-blue); background: #fff; }
.trust-btn--light:hover, .trust-btn--light:focus-visible { background: var(--m-blue-soft); }

/* ---------- Hero ---------- */
.trust-hero { padding: clamp(72px, 8vw, 112px) 0 clamp(72px, 8vw, 104px); color: #fff; background: var(--m-slate); }
.trust-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.trust-hero h1 { max-width: 760px; margin: 18px 0 0; color: #fff; }
.trust-hero-copy { max-width: 660px; margin: 22px 0 0; color: #d4dae4; font-size: 17px; line-height: 1.7; }
.trust-hero-copy + .trust-hero-copy { margin-top: 14px; }

.trust-layers { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.trust-layer { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.04); }
.trust-layer:nth-child(2) { margin-left: 22px; }
.trust-layer:nth-child(3) { margin-left: 44px; border-color: rgba(122,165,255,.55); background: rgba(2,86,255,.16); }
.trust-layer-num { flex: 0 0 auto; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; color: #fff; background: rgba(255,255,255,.08); font: 700 14px/1 var(--m-ui); }
.trust-layer strong { display: block; color: #fff; font: 700 17px/1.25 var(--m-head); }
.trust-layer div > span { display: block; margin-top: 3px; color: #b6c0cf; font-size: 14px; }
.trust-layers-note { margin: 6px 0 0 44px; color: #b6c0cf; font-size: 13px; line-height: 1.5; }

/* ---------- Sections ---------- */
.trust-section { padding: clamp(72px, 8vw, 110px) 0; background: var(--m-white); }
.trust-section--surface { background: var(--m-surface); }
.trust-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; margin-bottom: 40px; }
.trust-head .trust-title { max-width: 640px; }
.trust-head .trust-lede { max-width: 520px; margin: 0; }
.trust-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.trust-cert-logos { display: block; width: 260px; margin-top: 30px; }
.trust-stack { display: grid; gap: 40px; }
.trust-stack > *, .trust-split > *, .trust-hero-grid > * { min-width: 0; }
.trust-stack .trust-split-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; align-items: end; }
.trust-stack .trust-split-head > :not(.trust-cert-logos):not(.trust-badges) { grid-column: 1; }
.trust-stack .trust-cert-logos { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin-top: 0; }

/* Certifications table */
.trust-table-wrap { overflow-x: auto; border: 1px solid var(--m-line); border-radius: 8px; background: #fff; }
.trust-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.trust-table th, .trust-table td { padding: 14px 16px; border-bottom: 1px solid var(--m-line); text-align: left; vertical-align: middle; }
.trust-table thead th { color: var(--m-grey); background: var(--m-surface); font: 600 12px/1.3 var(--m-ui); }
.trust-table tbody th { color: var(--m-black); font-weight: 700; white-space: nowrap; }
.trust-table tbody tr:last-child > * { border-bottom: 0; }

/* Certifications & assurance: minimal two-column table */
.trust-assurance { max-width: 880px; }
.trust-table-wrap:has(.trust-table--assurance) { overflow: visible; border: 0; border-radius: 0; background: none; }
.trust-table--assurance { min-width: 0; table-layout: fixed; font-size: 15px; }
.trust-table--assurance th, .trust-table--assurance td { padding: 18px 0; border-bottom: 1px solid var(--m-line); vertical-align: top; }
.trust-table--assurance th:first-child { width: 42%; padding-right: 24px; }
.trust-table--assurance thead th { padding-top: 0; padding-bottom: 12px; border-bottom: 1px solid var(--m-black); background: none; color: var(--m-grey); font: 600 12px/1.3 var(--m-ui); letter-spacing: .06em; text-transform: uppercase; }
.trust-table--assurance tbody th { color: var(--m-black); font-weight: 700; white-space: normal; }
.trust-table--assurance tbody td { color: var(--m-copy); }
.trust-table--assurance tbody tr:last-child > * { border-bottom: 1px solid var(--m-line); }

.trust-doc-note { max-width: 720px; margin: 22px 0 0; color: var(--m-grey); font-size: 14px; line-height: 1.65; }
.trust-doc-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--m-blue); font: 600 15px/1.3 var(--m-ui); text-decoration: none; }
.trust-doc-link span { transition: transform .2s ease; }
.trust-doc-link:hover, .trust-doc-link:focus-visible { color: var(--m-blue-dark); text-decoration: underline; text-underline-offset: 4px; }
.trust-doc-link:hover span, .trust-doc-link:focus-visible span { transform: translateX(3px); }
.trust-doc-link:focus-visible { outline: 2px solid var(--m-blue); outline-offset: 4px; border-radius: 3px; }

/* Hosting facts */
.trust-facts { margin: 0; border: 1px solid var(--m-line); border-radius: 8px; background: #fff; }
.trust-fact { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--m-line); }
.trust-fact:last-child { border-bottom: 0; }
.trust-fact dt { color: var(--m-black); font-weight: 700; }
.trust-fact dd { margin: 0; }

/* Application controls */
.trust-controls { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.trust-controls li { position: relative; padding: 22px 20px 20px 52px; border: 1px solid var(--m-line); border-radius: 8px; background: #fff; color: var(--m-black); font-weight: 600; line-height: 1.4; }
.trust-controls li::before { position: absolute; top: 22px; left: 20px; width: 20px; height: 20px; content: ""; border-radius: 50%; background: var(--m-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.2l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }

/* Defence in depth (reuses the minimal two-column table) */
.trust-table--layers th:first-child { width: 24%; }
.trust-table--layers tbody td { line-height: 1.65; }

/* Documentation list */
.trust-docs { margin: 0; padding: 0; list-style: none; border: 1px solid var(--m-line); border-radius: 8px; background: #fff; }
.trust-docs li { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--m-line); color: var(--m-black); font-weight: 600; }
.trust-docs li:last-child { border-bottom: 0; }
.trust-docs li::before { flex: 0 0 auto; width: 26px; height: 26px; content: ""; border-radius: 5px; background: var(--m-blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3.5h7l4 4v13H7z M14 3.5v4h4' fill='none' stroke='%230256ff' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* Closing call to action */
.trust-final { padding: clamp(64px, 7vw, 92px) 0; color: #fff; background: var(--m-blue); }
.trust-final-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.trust-final .trust-kicker { color: #fff; opacity: .8; }
.trust-final h2 { margin: 12px 0 0; color: #fff; font-size: clamp(30px, 3.6vw, 48px); }
.trust-final p { max-width: 640px; margin: 16px 0 0; color: #e6eeff; font-size: 17px; line-height: 1.65; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .trust-hero-grid, .trust-split { grid-template-columns: 1fr; }
  .trust-layers { max-width: 560px; }
  .trust-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .trust-stack .trust-split-head { grid-template-columns: 1fr; }
  .trust-stack .trust-cert-logos { grid-column: 1; grid-row: auto; margin-top: 26px; }
}
@media (max-width: 720px) {
  .trust-shell { width: calc(100% - 32px); }
  .trust-layer:nth-child(2), .trust-layer:nth-child(3) { margin-left: 0; }
  .trust-layers-note { margin-left: 0; }
  .trust-controls { grid-template-columns: 1fr; }
  .trust-table--layers th:first-child { width: 34%; }
  .trust-fact { grid-template-columns: 1fr; gap: 6px; }
  .trust-table--assurance th:first-child { width: 46%; padding-right: 14px; }
  .trust-table--assurance { font-size: 14.5px; }
  .trust-final-inner { flex-direction: column; align-items: flex-start; }
  .trust-btn { width: 100%; justify-content: center; }
}

/* Certification badges (same artwork as the homepage) */
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.trust-badges li { display: block; }
.trust-badges .cert-badge { display: block; width: 78px; height: 78px; border-radius: 50%; box-shadow: 0 6px 16px rgba(20,31,55,.14); transition: transform .2s ease; }
.trust-badges .cert-badge:hover { transform: translateY(-3px) rotate(-3deg); }
.trust-stack .trust-badges { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin-top: 0; display: grid; grid-template-columns: repeat(3, max-content); }

/* Infrastructure certification tags */
.trust-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.trust-chips li { padding: 5px 11px; border: 1px solid #cfdcf5; border-radius: 999px; color: #1f3d75; background: var(--m-blue-soft); font: 600 12.5px/1.2 var(--m-ui); }
.trust-fact dd { color: var(--m-copy); line-height: 1.55; }

@media (max-width: 1050px) {
  .trust-stack .trust-badges { grid-column: 1; grid-row: auto; margin-top: 26px; display: flex; }
}
@media (max-width: 520px) {
  .trust-badges, .trust-stack .trust-badges { display: grid; grid-template-columns: repeat(3, max-content); gap: 10px; }
  .trust-badges .cert-badge { width: 72px; height: 72px; }
}
