/* ============================================================
   Sortify legal pages — shared styles (terms.html, privacy.html)
   Requires colors_and_type.css loaded first.
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--s-6);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--beige) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
}
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.back-home {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  box-shadow: 0 3px 0 rgba(43, 36, 24, 0.10);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.back-home:hover { background: var(--surface-raised); }
.back-home:active { transform: translateY(2px); }
.back-home svg { width: 16px; height: 16px; flex: none; }

/* ---------- Document header ---------- */
.doc-head {
  padding: var(--s-16) 0 var(--s-10) 0;
}
.doc-head .eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin: 0 0 var(--s-3) 0;
}
.doc-head h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: var(--lh-tight);
  margin-bottom: var(--s-4);
  text-wrap: balance;
}
.doc-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--yellow);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  box-shadow: inset 0 -3px 0 var(--yellow-dark), 0 3px 0 rgba(43, 36, 24, 0.10);
}
.doc-head .doc-intro {
  font-size: 17px;
  max-width: 64ch;
  margin-top: var(--s-5);
  text-wrap: pretty;
}

/* ---------- Document body ---------- */
.doc-body {
  padding-bottom: var(--s-20);
}
.doc-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: var(--s-10);
}
.doc-section {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s-5);
  align-items: start;
}
.doc-section .sec-num {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #FFFFFF;
  background: var(--orange);
  box-shadow: inset 0 -3px 0 var(--orange-dark), 0 3px 0 rgba(43, 36, 24, 0.10);
}
.doc-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--s-3);
}
.doc-section p {
  font-size: 15.5px;
  margin-bottom: var(--s-3);
  text-wrap: pretty;
}
.doc-section p:last-child { margin-bottom: 0; }
.doc-section ul {
  margin: 0 0 var(--s-3) 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.doc-section ul:last-child { margin-bottom: 0; }
.doc-section li {
  font-size: 15.5px;
  color: var(--fg-2);
  line-height: var(--lh-loose);
}
.doc-section li::marker { color: var(--orange); }
.doc-section a {
  color: var(--orange-dark);
  font-weight: 600;
  text-decoration-color: var(--orange);
}

/* Highlighted promise rows (no ads / no selling data) */
.promise-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.promise {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.promise .promise-ico {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: var(--green);
  box-shadow: inset 0 -2px 0 var(--green-dark), 0 2px 0 rgba(43, 36, 24, 0.10);
}
.promise .promise-ico svg { width: 18px; height: 18px; }
.promise strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.promise span {
  font-size: 13px;
  color: var(--fg-2);
  line-height: var(--lh-base);
}
@media (max-width: 640px) {
  .promise-row { grid-template-columns: 1fr; }
  .doc-section { grid-template-columns: 1fr; gap: var(--s-3); }
}

/* Contact callout at the end of the card */
.doc-contact {
  background: var(--brand-soft);
  border: 1px solid var(--orange);
  border-radius: var(--r-md);
  padding: var(--s-5) var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.doc-contact img {
  width: 56px;
  height: 56px;
  flex: none;
  display: block;
}
.doc-contact .doc-contact-text { flex: 1; min-width: 220px; }
.doc-contact h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 2px;
}
.doc-contact p { font-size: 14px; margin: 0; }
.doc-contact .btn-mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #FFFFFF;
  background: var(--orange);
  text-decoration: none;
  border-radius: var(--r-pill);
  padding: 10px 20px;
  box-shadow: inset 0 -3px 0 var(--orange-dark), 0 3px 0 rgba(43, 36, 24, 0.10);
  transition: filter var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.doc-contact .btn-mail:hover { filter: brightness(1.05); }
.doc-contact .btn-mail:active { transform: translateY(2px); }

/* ---------- Footer ---------- */
footer {
  background: var(--beige);
  border-top: 1px solid var(--line);
  padding: var(--s-10) 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2) var(--s-5);
  font-size: var(--t-small);
}
.footer-links a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.footer-links a:hover { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 3px; }
.footer-meta {
  font-size: var(--t-caption);
  color: var(--ink-2);
}
.footer-meta a {
  color: var(--orange-dark);
  font-weight: 600;
  text-decoration: none;
}
.footer-meta a:hover { text-decoration: underline; }
