/* ReplyWise legal pages — matches landing.html (cream · teal · mint) */
:root {
  --bg: #F7F4F0;
  --bg2: #EDE9E3;
  --card: #FFFFFF;
  --text: #1C1917;
  --text2: #78716C;
  --text3: #A8A29E;
  --accent: #0D9488;
  --accent-hover: #0a7a70;
  --mint: #6EE7B7;
  --dark: #1C1917;
  --head: 'Cabinet Grotesk', sans-serif;
  --body: 'Instrument Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav — aligned with landing */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 240, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.legal-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.legal-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.legal-nav-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.legal-nav-name {
  font-family: var(--head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.legal-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legal-nav-links a:not(.legal-nav-cta) {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.15s;
}

.legal-nav-links a:not(.legal-nav-cta):hover {
  color: var(--accent);
}

.legal-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff !important;
  font-family: var(--head);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.legal-nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .legal-nav-links span { display: none; }
  .legal-nav-links { gap: 12px; }
}

/* Main */
.legal-main {
  flex: 1;
  padding: 40px 0 72px;
  position: relative;
}

.legal-main::before {
  content: '';
  position: absolute;
  top: 0;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.legal-card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 20px;
  padding: 40px 38px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

@media (max-width: 600px) {
  .legal-card { padding: 28px 22px; border-radius: 16px; }
}

.legal-card h1 {
  font-family: var(--head);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-meta {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.legal-card h2 {
  font-family: var(--head);
  font-size: 17px;
  font-weight: 800;
  margin: 26px 0 10px;
  color: var(--text);
}

.legal-card h2:first-of-type { margin-top: 0; }

.legal-card p,
.legal-card li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text2);
  margin-bottom: 12px;
}

.legal-card ul,
.legal-card ol {
  padding-left: 22px;
  margin-bottom: 12px;
}

.legal-card li { margin-bottom: 8px; }

.legal-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.legal-card a:hover {
  text-decoration: underline;
}

.legal-note {
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.55;
  margin: 16px 0;
}

/* Footer — same family as landing */
.legal-footer {
  background: var(--dark);
  padding: 48px 0 28px;
  margin-top: auto;
}

.legal-footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .legal-footer-top { grid-template-columns: 1fr; }
}

.legal-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.legal-footer-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.legal-footer-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.legal-footer-name {
  font-family: var(--head);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.legal-footer-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.6;
  max-width: 280px;
}

.legal-footer-desc strong {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.legal-footer-col-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.48);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.legal-footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.legal-footer-links a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.legal-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.legal-footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.32);
}
