/* ============================================================
   Tabib Talk — premium light theme (Linear x Apple x Stripe)
   Shared across every page. Clinical teal->emerald accent tied
   to the medical subject; hairline-bordered "lifted" surfaces.
   Light is the default; a .dark-theme class (unused by default)
   holds the alternate dark palette for future use.
   ============================================================ */

:root {
  --bg: #f7f9fa;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f4f5;
  --border: #e2e6e9;
  --border-soft: #edf0f2;
  --text: #10151b;
  --text-dim: #3d454e;
  --muted: #6b7480;
  --faint: #9aa3ad;

  --accent: #0f9c8c;
  --accent-2: #0d8a6e;
  --accent-grad: linear-gradient(135deg, #14b8a6 0%, #059669 100%);
  --accent-glow: rgba(15, 156, 140, .15);
  --gold: #b7791f;
  --gold-dim: rgba(183, 121, 31, .10);
  --danger: #d1373d;
  --danger-dim: rgba(209, 55, 61, .08);
  --ok: #16a34a;

  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15,23,30,.08);
  --shadow-lg: 0 20px 50px rgba(15,23,30,.12);

  --ease: cubic-bezier(.2,.7,.2,1);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px circle at 15% -5%, rgba(15,156,140,.06), transparent 55%),
    radial-gradient(600px circle at 100% 0%, rgba(5,150,105,.05), transparent 50%);
}

/* Alternate dark palette, preserved for a future toggle — not applied by default. */
body.dark-theme {
  --bg: #0a0e14; --bg-2: #0d1219; --surface: #131820; --surface-2: #171d27;
  --border: #232b36; --border-soft: #1b222c; --text: #e8ecf2; --text-dim: #b3bccb;
  --muted: #828d9e; --faint: #5b6575;
  --accent: #2dd4bf; --accent-2: #10b981;
  --accent-grad: linear-gradient(135deg, #2dd4bf 0%, #10b981 100%);
  --accent-glow: rgba(45, 212, 191, .18);
  --gold: #f5b544; --gold-dim: rgba(245, 181, 68, .12);
  --danger: #f4676b; --danger-dim: rgba(244, 103, 107, .12); --ok: #34d399;
  --shadow: 0 8px 30px rgba(0,0,0,.4); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
}
body.dark-theme::before {
  background:
    radial-gradient(700px circle at 15% -5%, rgba(45,212,191,.08), transparent 55%),
    radial-gradient(600px circle at 100% 0%, rgba(16,185,129,.06), transparent 50%);
}

a { color: inherit; text-decoration: none; }

.site-header {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 26px;
  background: rgba(10,14,20,.72);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 100;
}
.site-header .logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  object-fit: cover; display: block;
  box-shadow: 0 0 0 1px rgba(45,212,191,.3), 0 6px 20px var(--accent-glow);
}
.site-header .brand-text strong { display: block; font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -.01em; color: var(--text); }
.site-header .brand-text span { display: block; font-size: .64rem; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }

.site-header nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.site-header nav a {
  padding: 9px 15px; border-radius: 10px; font-weight: 550; color: var(--text-dim); font-size: .9rem;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.site-header nav a:hover { background: var(--surface); color: var(--text); }
.site-header nav a.active { color: var(--accent); }
.site-header nav a.cta {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 7px;
}
.site-header nav a.cta:hover { border-color: var(--accent); color: var(--accent); }
.site-header nav a.account-pin {
  background: var(--accent-grad); color: #04110d; font-weight: 700;
  box-shadow: 0 6px 20px var(--accent-glow);
}
.site-header nav a.account-pin:hover { color: #04110d; filter: brightness(1.06); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 52px 22px 90px; }
.wrap.narrow { max-width: 560px; }

h1.page-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 600; letter-spacing: -.02em; color: var(--text); margin: 0 0 12px; }
p.page-sub { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0 0 34px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 13px 22px; font: inherit; font-weight: 650; font-size: .96rem;
  cursor: pointer; transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s, filter .2s;
}
.btn-primary, .btn-accent { background: var(--accent-grad); color: #04110d; }
.btn-primary:hover, .btn-accent:hover { transform: translateY(-2px); box-shadow: 0 12px 30px var(--accent-glow); filter: brightness(1.05); }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(244,103,107,.3); }
.btn-danger:hover { background: rgba(244,103,107,.2); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-block { width: 100%; }

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow); position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
}

.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: .84rem; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border);
  font-size: .98rem; font-family: inherit; background: var(--bg-2); color: var(--text);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.field .hint { color: var(--muted); font-size: .8rem; margin-top: 5px; }

.alert { padding: 12px 16px; border-radius: 11px; font-size: .92rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert-error { background: var(--danger-dim); color: #ffb4b6; border-color: rgba(244,103,107,.3); }
.alert-success { background: rgba(52,211,153,.1); color: #86efc4; border-color: rgba(52,211,153,.3); }
.alert-info { background: rgba(45,212,191,.08); color: #7fe6d8; border-color: rgba(45,212,191,.25); }

.site-footer { text-align: center; color: var(--muted); font-size: .84rem; padding: 40px 22px; border-top: 1px solid var(--border-soft); }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }

@keyframes lp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: lp-rise .6s var(--ease) both; }
.reveal.d1 { animation-delay: .06s; } .reveal.d2 { animation-delay: .12s; }
.reveal.d3 { animation-delay: .18s; } .reveal.d4 { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.modal-overlay {
  position: fixed; inset: 0; z-index: 500; display: none;
  background: rgba(4,7,11,.72); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
  animation: lp-fade .25s var(--ease);
}
.modal-overlay.open { display: flex; }
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-width: 640px; width: 100%; max-height: 84vh; overflow-y: auto; padding: 30px;
  box-shadow: var(--shadow-lg); position: relative; animation: lp-rise .3s var(--ease);
}
.modal h2 { font-family: var(--font-display); margin: 0 0 6px; color: var(--text); }
.modal .modal-x {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 9px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; transition: all .16s var(--ease);
}
.modal .modal-x:hover { background: var(--danger-dim); color: var(--danger); border-color: rgba(244,103,107,.3); }

.pill { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.pill-active { background: rgba(52,211,153,.14); color: var(--ok); }
.pill-pending { background: var(--gold-dim); color: var(--gold); }
.pill-rejected, .pill-suspended, .pill-banned { background: var(--danger-dim); color: var(--danger); }
.pill-none { background: var(--surface-2); color: var(--muted); }

@media (max-width: 720px) {
  .site-header { padding: 12px 14px; }
  .site-header .brand-text span { display: none; }
  .site-header nav a:not(.account-pin):not(.cta) { display: none; }
  .wrap { padding: 34px 15px 60px; }
}

body.noselect { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
body.noselect input, body.noselect textarea { -webkit-user-select: text; user-select: text; }

/* Blur-on-blur (mild screenshot/recording deterrent — see enableBlurOnBlur() in header.js) */
body.tt-blurred > * { filter: blur(14px); transition: filter .15s ease; }


/* ---------- Terms & Conditions body ----------
   The numbered subheadings ("1. No refund policy." …) sit inline at the start
   of each clause. They read as headings, so they get pure white and a step up
   from the .93rem body text they introduce. */
.terms-body { color: var(--text-dim); font-size: .93rem; line-height: 1.7; }
.terms-body .t-sub {
  color: #ffffff;
  font-size: 1.06rem;   /* ~1 step above the .93rem body text around it */
  font-weight: 800;
  letter-spacing: -.01em;
}

/* ============================================================
   Minimalist display mode (html.tt-minimal)
   The sci-fi skin is entirely scoped under body.scifi, so removing
   that class already restores this light theme. These rules only
   silence the fixed sci-fi shell pieces (starfield canvas + nebula)
   that are styled or animated outside the body.scifi scope, and fix
   the terms heading that assumed a dark backdrop.
   ============================================================ */
html.tt-minimal .nebula,
html.tt-minimal #scifi-field { display: none !important; }
html.tt-minimal .terms-body .t-sub { color: var(--text); }
