/* Lifethread marketing site — aligned with ios/BalanceUp/App/Theme.swift */
:root {
  --teal: #4db5a6;
  --deep-teal: #1f4a5c;
  --mint: #8fd4c0;
  --coral: #f08a6e;
  --sand: #faf9ee;
  --background: #f7faf5;
  --header-wash: #ebf7f2;
  --text: #212e33;
  --text-secondary: #737f85;
  --card: #ffffff;
  --nav-action: #296175;
  --radius-card: 22px;
  --radius-btn: 14px;
  --shadow-card: 0 6px 14px rgba(0, 0, 0, 0.06);
  --max-content: 44rem;
  --max-wide: 56rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Quicksand", system-ui, -apple-system, sans-serif;
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(
    180deg,
    #fafefc 0%,
    var(--background) 42%,
    var(--header-wash) 100%
  );
  display: flex;
  flex-direction: column;
}

a {
  color: var(--teal);
  font-weight: 600;
}

img {
  max-width: 100%;
  height: auto;
}

/* —— Site chrome —— */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  width: 100%;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-link:hover .wordmark-img {
  opacity: 0.92;
}

.knot-chip {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--background);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.knot-chip img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.wordmark-img {
  height: 28px;
  width: auto;
  display: block;
  transition: opacity 0.15s ease;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
  font-size: 0.875rem;
}

.site-nav a {
  color: var(--nav-action);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--deep-teal);
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--deep-teal);
}

/* —— Layout —— */

.shell {
  flex: 1;
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.shell-narrow {
  max-width: var(--max-content);
}

/* —— Home hero —— */

.hero-lockup {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}

.hero-knot {
  width: min(88px, 22vw);
  height: min(88px, 22vw);
  margin: 0 auto 1.25rem;
  display: block;
  object-fit: contain;
}

.hero-wordmark {
  height: clamp(36px, 8vw, 52px);
  width: auto;
  margin: 0 auto 0.75rem;
  display: block;
}

.hero-tagline {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.01em;
}

.hero-lede {
  margin: 0 auto 2rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 500;
}

/* —— Cards —— */

.card-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid.features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: var(--shadow-card);
}

.feature-card h3 {
  margin: 0.65rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  font-weight: 500;
}

.icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--mint) 28%, transparent);
  display: grid;
  place-items: center;
  color: var(--teal);
}

.icon-badge svg {
  width: 22px;
  height: 22px;
}

.section-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.section-lede {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 32rem;
}

/* Connections — iOS-style grouped list (Account → Connections) */
.connections-section {
  margin-bottom: 2.5rem;
}

.connections-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.connection-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem 1rem;
  padding: 0.95rem 1.2rem;
}

.connection-row + .connection-row {
  border-top: 1px solid rgba(33, 46, 51, 0.08);
}

.connection-row .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--mint) 32%, var(--card));
}

.connection-row .icon-badge svg {
  width: 22px;
  height: 22px;
  color: var(--deep-teal);
}

.connection-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.connection-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.connection-detail {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-secondary);
}

.connection-tag {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--deep-teal);
  background: color-mix(in srgb, var(--mint) 30%, transparent);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.connections-footnote {
  margin: 0.85rem 0 0;
  padding: 0 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 34rem;
}

.privacy-note {
  margin: 0 0 2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--mint) 18%, var(--card));
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  font-weight: 500;
}

.privacy-note strong {
  font-weight: 700;
  color: var(--deep-teal);
}

.cta-row {
  text-align: center;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--deep-teal));
  box-shadow: 0 8px 22px rgba(31, 74, 92, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(31, 74, 92, 0.28);
}

.fine-print {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

/* —— Legal / support pages —— */

.page-head {
  padding: 0.5rem 0 1.75rem;
}

.page-head h1 {
  margin: 0.25rem 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.125rem);
  font-weight: 700;
  color: var(--text);
}

.page-head .meta,
.page-head .lede {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 500;
}

.page-head .lede {
  font-size: 1.05rem;
  margin-top: 0.5rem;
  max-width: 36rem;
}

.prose {
  line-height: 1.65;
  font-weight: 500;
}

.prose h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 1.85rem 0 0.5rem;
  color: var(--deep-teal);
}

.prose h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.4rem;
  color: var(--text);
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose a {
  color: var(--teal);
}

.prose code {
  font-size: 0.88em;
  background: color-mix(in srgb, var(--mint) 35%, transparent);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  color: var(--deep-teal);
  font-weight: 600;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

/* —— Plaid return —— */

.plaid-hero {
  text-align: center;
  padding: 4rem 1.25rem;
  max-width: 24rem;
  margin: 0 auto;
}

.plaid-hero .hero-knot {
  width: 72px;
  height: 72px;
}

.plaid-hero h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 0.75rem;
}

.plaid-hero p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  font-weight: 500;
}

/* —— Footer —— */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  justify-content: center;
  align-items: center;
  font-size: 0.875rem;
  padding: 2rem 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.site-footer a {
  color: var(--nav-action);
  text-decoration: none;
  font-weight: 600;
}

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

.site-footer .copy {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav {
    padding-left: 0.15rem;
  }
}
