/* ==========================================================================
   Faithful — public website
   Editorial aesthetic: Fraunces serif + Inter, warm cream, purple accent.
   Matches the app's light theme.
   ========================================================================== */

:root {
  --bg: #f5f1ea;
  --surface: #ffffff;
  --surface-soft: #fbf8f2;
  --text: #1f1b2c;
  --text-muted: #6b6478;
  --text-faint: #9c95a8;
  --hairline: #e6dfd1;
  --primary: #665aba;
  --primary-dark: #4a3fa0;
  --primary-soft: #efeaff;
  --secondary: #3d8b86;
  --danger: #c44545;
  --danger-soft: #f9eaea;
  --success: #3a7a5e;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --max-w: 720px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 50% -10%, rgba(102, 90, 186, 0.08), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(61, 139, 134, 0.05), transparent 50%);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 90, 186, 0.25);
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  padding: 28px 0 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.4px;
  color: var(--text);
  border: none;
}
.brand:hover { color: var(--text); }
.brand .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 4px;
}

nav.site-nav {
  display: flex;
  gap: 22px;
  font-size: 13.5px;
  letter-spacing: 0.1px;
}
nav.site-nav a {
  color: var(--text-muted);
  border: none;
  font-weight: 500;
}
nav.site-nav a:hover { color: var(--text); }

main {
  padding: 56px 0 96px;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0 48px;
  margin-top: 48px;
  font-size: 13px;
  color: var(--text-muted);
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--text-muted); }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 12px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.6px;
  color: var(--text);
}
h1 {
  font-size: clamp(38px, 5.5vw, 56px);
  line-height: 1.05;
  font-weight: 600;
  font-style: italic;
  margin: 0 0 18px;
}
h2 {
  font-size: 22px;
  font-style: italic;
  font-weight: 600;
  margin: 36px 0 12px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 8px;
  letter-spacing: -0.1px;
}

.lede {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 0 28px;
}

p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 14px;
}

.legal p, .legal li {
  font-size: 15px;
  color: var(--text);
}
.legal ul {
  padding-left: 22px;
  margin: 0 0 14px;
}
.legal li {
  margin-bottom: 4px;
}

.last-updated {
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.2px;
  margin: 0 0 32px;
}

.divider {
  height: 1px;
  background: var(--hairline);
  margin: 32px 0;
  border: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 14px rgba(31, 27, 44, 0.04);
}

.linklist {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}
.linklist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}
.linklist a:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 90, 186, 0.4);
  background: var(--surface-soft);
  color: var(--text);
}
.linklist a::after {
  content: "→";
  color: var(--text-faint);
  font-family: var(--font-body);
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}
.linklist a:hover::after {
  color: var(--primary);
  transform: translateX(2px);
}
.linklist a small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Forms / buttons ---------- */
form {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}

input[type="email"],
input[type="password"] {
  font: inherit;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text);
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
  width: 100%;
}
input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
}
input::placeholder { color: var(--text-faint); }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 22px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.1px;
  transition: transform 120ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease), opacity 160ms var(--ease);
}
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 90, 186, 0.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(102, 90, 186, 0.35);
}
.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 12px rgba(196, 69, 69, 0.25);
}
.btn-danger:hover:not(:disabled) {
  background: #a83a3a;
  box-shadow: 0 6px 16px rgba(196, 69, 69, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--hairline);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface);
  color: var(--text);
}
.btn-google {
  background: white;
  color: var(--text);
  border: 1px solid var(--hairline);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google:hover:not(:disabled) {
  background: var(--surface-soft);
}
.btn-google svg { width: 18px; height: 18px; }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.btn-row > * { flex: 1; min-width: 160px; }

.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 4px 0;
}
.divider-or::before,
.divider-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* ---------- Banners / messages ---------- */
.banner {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  margin: 16px 0;
  border: 1px solid;
}
.banner-info {
  background: rgba(102, 90, 186, 0.06);
  border-color: rgba(102, 90, 186, 0.2);
  color: var(--text);
}
.banner-warn {
  background: var(--danger-soft);
  border-color: rgba(196, 69, 69, 0.25);
  color: #7a2929;
}
.banner-error {
  background: var(--danger-soft);
  border-color: rgba(196, 69, 69, 0.4);
  color: #7a2929;
}
.banner-success {
  background: rgba(58, 122, 94, 0.08);
  border-color: rgba(58, 122, 94, 0.3);
  color: var(--success);
}

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero {
  text-align: left;
  padding: 24px 0 32px;
}
.hero .lede { margin-bottom: 8px; }

/* ---------- Selection / focus ---------- */
::selection { background: rgba(102, 90, 186, 0.25); }

@media (max-width: 540px) {
  main { padding: 36px 0 80px; }
  .container { padding: 0 20px; }
  .card { padding: 22px; }
  .btn-row > * { flex: 1 1 100%; }
}
