/*
 * Shared public-site styles for groopie.org.
 *
 * Two surfaces use this file: the legal pages (privacy) and the invite
 * landing page. Colors mirror frontend/src/constants/theme.ts so the web
 * presence matches the app. No webfonts or third-party requests: the legal
 * pages and invite links must work without loading anything external.
 */

:root {
  --canvas: #f7f3ea;
  --surface: #ffffff;
  --ink: #14130f;
  --muted: #6b675c;
  --accent: #bf421e;
  --accent-surface: #fdeee8;
  --line: #e9e1d3;
  --surface-muted: #e5ddce;
  --radius-card: 10px;
  --radius-control: 12px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.site-header,
.site-footer {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 24px;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

main {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.prose {
  max-width: 700px;
}

.prose h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin: 40px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 16px;
}

.lead-muted {
  color: var(--muted);
  font-size: 13px;
}

.prose strong {
  font-weight: 650;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.prose li {
  margin: 0 0 6px;
}

.prose hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-surface);
}

.prose table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--surface-muted);
  font-weight: 650;
}

.prose code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-muted);
  font-size: 0.92em;
}

.site-footer {
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer a {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Policies hub ------------------------------------------------------------ */

.hub {
  max-width: 700px;
  padding-top: 28px;
  padding-bottom: 32px;
}

.hub-title {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hub-lede {
  max-width: 520px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.policy-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.policy-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.policy-row:last-child {
  border-bottom: 0;
}

.policy-row:hover {
  background: var(--canvas);
}

.policy-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.policy-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.15s ease;
}

.policy-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.policy-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.policy-title {
  font-size: 15px;
  font-weight: 650;
  transition: color 0.15s ease;
}

.policy-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.policy-arrow {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 18px;
  transition: transform 0.15s ease;
}

.policy-row:hover .policy-icon,
.policy-row:focus-visible .policy-icon,
.policy-row:hover .policy-title,
.policy-row:focus-visible .policy-title {
  color: var(--accent);
}

.policy-row:hover .policy-arrow,
.policy-row:focus-visible .policy-arrow {
  transform: translateX(3px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  filter: brightness(0.94);
}

.text-link {
  font-size: 14px;
  font-weight: 600;
}

/* Invite landing -------------------------------------------------------- */

.join {
  max-width: 560px;
  padding-top: 56px;
}

.join-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.join-card h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.join-sub {
  margin: 0 0 22px;
  color: var(--muted);
}

.join-code {
  display: inline-block;
  margin: 0 0 22px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.join-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.join-status {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.join-status[data-tone="danger"] {
  color: #b3271b;
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    width: 100%;
    gap: 6px 12px;
  }

  .hub {
    padding-top: 24px;
  }

  .prose h1 {
    font-size: 34px;
  }

  .prose table {
    font-size: 13px;
  }

  .join-card {
    padding: 22px;
  }
}
