/* Shared stylesheet for all incri.app pages */
:root {
  --bg: #0b0d10;
  --bg-panel: #14171b;
  --text: #f2f3f5;
  --text-dim: #9aa0a8;
  --accent: #d7ff3e;
  --border: #23262b;
  --error: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 6vw;
  max-width: 900px;
  margin: 0 auto;
}
.site-header.wide { max-width: 1100px; }

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

.back-link,
.login-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--text); }

.login-link {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.login-link:hover { border-color: var(--text-dim); color: var(--text); }

/* ---------- Home ---------- */
.hero {
  max-width: 780px;
  margin: 8vh auto 0;
  padding: 0 6vw 10vh;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.hero h1 span { color: var(--accent); }

.sub {
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto 40px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: #0b0d10;
  border-color: var(--accent);
}
.btn-primary:hover { filter: brightness(1.08); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 12vh auto 0;
  padding: 0;
}
.feature {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: left;
}
.feature h3 { margin: 0 0 8px; font-size: 1rem; }
.feature p { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 6vh 6vw;
}
.site-footer a { color: var(--text-dim); }

/* ---------- Content / legal pages ---------- */
.content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 6vw 10vh;
  line-height: 1.6;
}
.content h1 { font-size: 1.8rem; letter-spacing: -0.02em; }
.content h2 { font-size: 1.2rem; margin-top: 2.5rem; }
.content ol, .content ul { padding-left: 1.3rem; }
.content li { margin-bottom: 0.5rem; }
.content a { color: var(--accent); }
.note { color: var(--text-dim); font-size: 0.92rem; }

code {
  background: #17191d;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.9em;
}

/* Termly embeds */
.content.policy { max-width: 900px; }

[name="termly-embed"] {
  display: block;
  background: #fff;
  color: #1a1c1f;
  border-radius: 14px;
  overflow: hidden;
  min-height: 60vh;
  padding: 32px;
}
[name="termly-embed"] * { color: inherit; }

/* ---------- Centered status pages (confirm, auth-callback) ---------- */
body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vw;
}
body.centered main { max-width: 420px; text-align: center; }
body.centered .logo {
  display: inline-flex;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 40px;
}
body.centered .logo img { width: 24px; height: 24px; }
body.centered h1 { font-size: 1.5rem; margin: 0 0 12px; letter-spacing: -0.02em; }
body.centered p { color: var(--text-dim); line-height: 1.5; margin: 0; }

.badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
  line-height: 1;
}
.badge.ok { background: var(--accent); color: #0b0d10; }
.badge.error { background: rgba(255, 107, 107, 0.16); color: var(--error); }

.open-app {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 28px;
  background: var(--accent);
  color: #0b0d10;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}
