@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap");

:root {
  --bg: #f6f1e7;
  --bg-deep: #efe6d8;
  --paper: #ffffff;
  --ink: #1f1a14;
  --muted: #605850;
  --accent: #1b6a5b;
  --accent-soft: #d7efe9;
  --shadow: 0 24px 60px rgba(31, 26, 20, 0.14);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #fefbf5 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: "Source Serif 4", "Times New Roman", serif;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(27, 106, 91, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 6vw 12px;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.brand-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  font-weight: 600;
}

.brand-sub {
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  transition: background 200ms ease, color 200ms ease;
}

.site-nav a:hover,
.site-nav a:focus {
  background: var(--accent-soft);
  color: var(--accent);
}

main {
  padding: 0 6vw 72px;
}

.hero {
  max-width: 820px;
  margin: 24px auto 48px;
}

.eyebrow {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 12px;
}

.hero h1 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  margin: 0 0 16px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}

.doc-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(215, 239, 233, 0.4));
  padding: 24px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  transform: translateY(12px);
  opacity: 0;
  animation: rise 700ms ease forwards;
}

.doc-card:nth-child(2) {
  animation-delay: 120ms;
}

.doc-card:nth-child(3) {
  animation-delay: 240ms;
}

.doc-card:nth-child(4) {
  animation-delay: 360ms;
}

.doc-card h2 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.4rem;
  margin: 0;
}

.doc-card .doc-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.doc-card .doc-link {
  margin-top: auto;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--accent);
  font-weight: 600;
}

.legal-doc {
  max-width: 960px;
  margin: 12px auto 0;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 48px);
  animation: fadeIn 600ms ease;
}

.doc-header {
  border-bottom: 1px solid rgba(31, 26, 20, 0.1);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.doc-kicker {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  color: var(--accent);
  margin: 0 0 12px;
}

.doc-header h1 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin: 0 0 12px;
}

.doc-header .doc-meta {
  color: var(--muted);
  margin: 0;
}

.doc-body {
  font-size: 1.05rem;
  color: var(--ink);
}

.doc-body p {
  margin: 0 0 16px;
}

.doc-body ul,
.doc-body ol {
  padding-left: 22px;
  margin: 0 0 16px;
}

.doc-body li {
  margin-bottom: 10px;
}

.doc-body a {
  color: var(--accent);
  text-decoration: underline;
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.98rem;
}

.doc-body th,
.doc-body td {
  border: 1px solid rgba(31, 26, 20, 0.12);
  padding: 10px 12px;
  text-align: left;
}

.doc-body th {
  background: rgba(27, 106, 91, 0.08);
  font-weight: 600;
}

.doc-body p > strong:only-child {
  display: block;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  margin-top: 18px;
}

.sms-consent-form {
  border: 1px solid rgba(31, 26, 20, 0.14);
  border-radius: 16px;
  background: rgba(27, 106, 91, 0.08);
  padding: 18px;
  margin: 22px 0;
  display: grid;
  gap: 16px;
}

.sms-consent-field {
  display: grid;
  gap: 8px;
}

.sms-consent-label {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 600;
}

.sms-consent-form input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(31, 26, 20, 0.18);
  font-size: 1rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.sms-consent-form input[type="tel"]:focus {
  outline: 2px solid rgba(27, 106, 91, 0.35);
  outline-offset: 2px;
}

.sms-consent-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.sms-consent-checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sms-consent-checkbox-row input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.sms-consent-checkbox-row label {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 500;
}

.sms-consent-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.sms-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.sms-consent-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 700;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  cursor: pointer;
}

.sms-consent-button:disabled {
  background: rgba(31, 26, 20, 0.2);
  cursor: not-allowed;
}

.sms-consent-status {
  min-height: 1.4rem;
  font-weight: 600;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.sms-consent-status[data-tone="success"] {
  color: var(--accent);
}

.sms-consent-status[data-tone="error"] {
  color: #b42318;
}

.sms-consent-status[data-tone="loading"] {
  color: var(--muted);
}

.site-footer {
  padding: 24px 6vw 36px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer span {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    gap: 8px;
  }

  main {
    padding: 0 6vw 48px;
  }

  .legal-doc {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
