/* Privacy policy, terms of service and contact, styled to match the landing
 * design.
 *
 * Every colour here comes from the tokens landing.css already defines, so
 * these pages follow the theme toggle without carrying their own palette.
 * Nothing is redefined: --tx, --tx-2, --bd, --card and friends are the same
 * variables the landing sections use.
 *
 * Kept separate from landing.css so that file stays byte-identical to the
 * design as exported.
 */

/* ── Shared page shell ─────────────────────────────────────────────────── */

.page-hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--bd);
  background: var(--bg-2);
}

.page-hero .shell {
  display: block;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0;
  color: var(--tx);
}

.page-hero .last-updated,
.page-hero .page-sub {
  margin: 0.85rem 0 0;
  color: var(--tx-2);
  font-size: 1.02rem;
  max-width: 60ch;
}

/* ── Legal documents ───────────────────────────────────────────────────── */

.legal-page {
  background: var(--bg);
}

.legal-content {
  padding-block: clamp(2rem, 6vw, 3.5rem) clamp(3rem, 9vw, 6rem);
}

/* The document and its contents list. Grid rather than the Bootstrap columns
 * the markup was written for — this design does not load Bootstrap, so the
 * col-md-* classes carry no width of their own. */
.legal-content .shell > .row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.legal-nav {
  position: sticky;
  top: 5.5rem;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: var(--card);
  padding: 1.15rem 1.25rem;
}

.legal-nav h4 {
  margin: 0 0 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
}

.legal-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.legal-nav a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  color: var(--tx-2);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.35;
  transition: background 0.15s ease, color 0.15s ease;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  background: var(--card-2);
  color: var(--tx);
}

.legal-body {
  min-width: 0;
  color: var(--tx-2);
  /* Legal text is read, not scanned. Holding the measure near 70 characters
   * matters more here than on the marketing sections. */
  max-width: 70ch;
  font-size: 1.02rem;
  line-height: 1.75;
}

.legal-body section {
  padding-block: 0 clamp(1.5rem, 4vw, 2.4rem);
  scroll-margin-top: 5.5rem;
}

.legal-body section + section {
  border-top: 1px solid var(--bd);
  padding-top: clamp(1.5rem, 4vw, 2.4rem);
}

.legal-body h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--tx);
}

.legal-body h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--tx);
}

.legal-body h4 {
  margin: 1.3rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tx);
}

.legal-body p {
  margin: 0 0 1rem;
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 1.15rem;
  padding-inline-start: 1.35rem;
}

.legal-body li {
  margin-bottom: 0.45rem;
}

.legal-body a {
  color: #25d366;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 211, 102, 0.35);
}

.legal-body a:hover {
  border-bottom-color: #25d366;
}

.legal-body strong {
  color: var(--tx);
  font-weight: 700;
}

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.35rem;
  font-size: 0.94rem;
}

.legal-body th,
.legal-body td {
  border: 1px solid var(--bd);
  padding: 0.6rem 0.75rem;
  text-align: start;
  vertical-align: top;
}

.legal-body th {
  background: var(--card);
  color: var(--tx);
  font-weight: 700;
}

/* Callout used for the Meta permission explanations. */
.permission-explanation {
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: var(--card);
  padding: 1.05rem 1.2rem;
  margin: 0 0 1.15rem;
}

.permission-explanation h4 {
  margin-top: 0;
}

.permission-explanation :last-child {
  margin-bottom: 0;
}

/* ── Contact ───────────────────────────────────────────────────────────── */

.contact-page {
  background: var(--bg);
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 9vw, 6rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-card {
  border: 1px solid var(--bd);
  border-radius: 18px;
  background: var(--card);
  padding: clamp(1.25rem, 3vw, 1.9rem);
}

.contact-detail + .contact-detail {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--bd);
}

.contact-detail h3 {
  margin: 0 0 0.3rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
}

.contact-detail p,
.contact-detail address {
  margin: 0;
  font-style: normal;
  color: var(--tx-2);
  line-height: 1.6;
}

.contact-detail a {
  color: #25d366;
  text-decoration: none;
}

.contact-detail a:hover {
  text-decoration: underline;
}

/* Form controls. The React form and the noscript fallback share these, so
 * both look the same whether or not the bundle loads. */
.contact-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form .form-group {
  margin-bottom: 1rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tx);
}

.contact-form .form-control,
#contact-form-app input,
#contact-form-app textarea,
#contact-form-app select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--bd-2);
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--tx);
  font: inherit;
  font-size: 0.96rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form .form-control::placeholder,
#contact-form-app input::placeholder,
#contact-form-app textarea::placeholder {
  color: var(--tx-3);
}

.contact-form .form-control:focus,
#contact-form-app input:focus,
#contact-form-app textarea:focus,
#contact-form-app select:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}

.contact-form textarea.form-control {
  min-height: 9rem;
  resize: vertical;
}

@media (max-width: 860px) {
  .legal-content .shell > .row,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-nav {
    position: static;
  }
}

@media (max-width: 560px) {
  .contact-form .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
