/* Matches APP_DESIGN + home dashboard (tabs/index) */
:root {
  --bg: #faf8f8;
  --bg-alt: #f5f0ff;
  --bg-gradient-start: #fff8fd;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-soft: #efe9ff;
  --primary: #4ade80;
  --primary-dark: #22c55e;
  --primary-soft: rgba(74, 222, 128, 0.18);
  --accent: #7b5cff;
  --accent-deep: #4f2fff;
  --accent-icon: #6a46ff;
  --accent-soft: #eee6ff;
  --black: #111827;
  --danger: #ef4444;
  --max-width: 720px;
  --max-width-wide: 960px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --shadow-sm: 0 2px 8px rgba(123, 92, 255, 0.06);
  --shadow-md: 0 8px 24px rgba(123, 92, 255, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent-icon);
}

a:hover {
  text-decoration: none;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header-inner--wide {
  max-width: var(--max-width-wide);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}

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

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

article {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.updated {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

h2 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

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

h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p,
ul {
  margin: 0 0 14px;
}

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer--wide {
  max-width: var(--max-width-wide);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 48px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.footer-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
}

/* —— Home / landing —— */

.page-home .hero--landing {
  text-align: center;
  padding: 48px 20px 40px;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-alt) 55%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-soft);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-icon);
  background: var(--accent-soft);
  border-radius: 999px;
}

.hero-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-alt) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.brand-lockup--hero {
  gap: 16px;
}

.brand-lockup-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
}

.brand-lockup--hero .brand-lockup-icon {
  width: 112px;
  height: 112px;
  border-radius: 28px;
}

.brand-lockup-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.brand-lockup--hero .brand-lockup-name {
  font-size: clamp(30px, 5vw, 40px);
}

.hero--landing h1 {
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.hero-lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  border: 1px solid transparent;
  box-shadow: 0 12px 24px rgba(79, 47, 255, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.05);
  color: #ffffff;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-soft);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.section {
  padding: 48px 20px;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 36px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px 24px 24px 20px;
  box-shadow: var(--shadow-sm);
}

.step-visual {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 12px;
}

.step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
}

.article-brand-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-alt) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}

.site-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.site-footer-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.site-footer-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card-grid {
  display: grid;
  gap: 16px;
}

.card-grid--legal {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.card h2,
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.disclaimer {
  margin: 28px 0 0;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  text-align: center;
}

/* Legacy hero (if reused) */
.hero {
  text-align: center;
  padding: 48px 20px 24px;
}

.hero h1 {
  font-size: 36px;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 480px;
  margin: 12px auto 24px;
}

@media (max-width: 900px) {
  .feature-grid,
  .card-grid--legal {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .page-home .hero--landing {
    padding-top: 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .feature-grid,
  .card-grid--legal {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    gap: 12px;
  }

  .nav a[href='#how-it-works'] {
    display: none;
  }
}

/* —— Password reset —— */

.reset-card h1 {
  margin-bottom: 10px;
}

.reset-state[hidden] {
  display: none !important;
}

.reset-muted {
  color: var(--muted);
  font-size: 15px;
}

.reset-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reset-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 6px;
}

.reset-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}

.reset-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.reset-reqs {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}

.reset-reqs .req-unmet {
  color: var(--muted);
}

.reset-reqs .req-met {
  color: var(--primary-dark);
}

.reset-reqs .req-met::before {
  content: '✓ ';
}

.reset-form-error {
  min-height: 1.25em;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--danger, #ef4444);
}

.reset-submit {
  width: 100%;
  margin-top: 8px;
  border: none;
  cursor: pointer;
}

.reset-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  article {
    padding: 24px 18px;
  }

  h1 {
    font-size: 24px;
  }
}
