/* Kypo Suite — shared kypo.app site branding (matches in-app logo palette). */
:root {
  color-scheme: light dark;
  --brand-blue: #64b5f6;
  --brand-green: #69f0ae;
  --brand-gradient: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-green) 100%);
  --accent: #4caf50;
  --accent-hover: #43a047;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --text: #1a1d21;
  --text-secondary: #495057;
  --muted: #868e96;
  --border: #dee2e6;
  --header-bg: rgba(255, 255, 255, 0.82);
  --glow-blue: rgba(100, 181, 246, 0.14);
  --glow-green: rgba(105, 240, 174, 0.12);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 720px;
  --font: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #69f0ae;
    --accent-hover: #81f7bd;
    --bg: #0e0e12;
    --surface: #16161d;
    --surface-elevated: #1c1c24;
    --text: #f2f2f7;
    --text-secondary: #c7c7cc;
    --muted: #868e96;
    --border: #2a2a35;
    --header-bg: rgba(14, 14, 18, 0.88);
    --glow-blue: rgba(100, 181, 246, 0.08);
    --glow-green: rgba(105, 240, 174, 0.06);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--glow-blue), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--glow-green), transparent 50%),
    var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 14px 24px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header--solo {
  justify-content: center;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 22%;
  box-shadow: 0 2px 8px rgba(100, 181, 246, 0.25);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.88rem;
}

.site-nav a {
  color: var(--text-secondary);
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--accent);
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.site-main--narrow {
  max-width: 440px;
}

.site-footer {
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 10px;
}

.site-footer p {
  margin: 0;
}

/* ── Home hero ────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 48px 0 24px;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-logo img {
  width: 72px;
  height: 72px;
  border-radius: 22%;
  box-shadow: var(--shadow), 0 0 0 1px rgba(100, 181, 246, 0.15);
}

.hero-logo .wordmark {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto 32px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-card {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.hero-card:hover {
  text-decoration: none;
  border-color: var(--brand-blue);
  transform: translateY(-1px);
}

.hero-card--muted {
  color: var(--muted);
}

/* ── Legal / prose pages ──────────────────────────────────────────────────── */

.prose h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.prose .meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose p,
.prose li {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

/* ── Delete-account panel ───────────────────────────────────────────────────── */

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-card p.lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-title img {
  display: block;
  margin: 0 auto 14px;
  border-radius: 22%;
  box-shadow: 0 4px 16px rgba(100, 181, 246, 0.2);
}

.page-title {
  text-align: center;
  margin-bottom: 28px;
}

.page-title h1 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted);
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--glow-blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #0d1b12;
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #0a1410;
  }
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-google {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 12px;
}

.btn-google:hover:not(:disabled) {
  border-color: var(--brand-blue);
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  margin-top: 20px;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  margin-top: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
}

.warning strong {
  display: block;
  color: #f87171;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.warning p {
  margin: 0;
  font-size: 0.9rem;
  color: #fca5a5;
}

@media (prefers-color-scheme: light) {
  .warning strong { color: #dc2626; }
  .warning p { color: #b91c1c; }
}

.signed-in {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.signed-in span {
  color: var(--text);
  font-weight: 600;
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}

.status.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

@media (prefers-color-scheme: light) {
  .status.error { color: #b91c1c; }
  .status.success { color: #15803d; }
}

.hidden {
  display: none !important;
}
