/* ChaCha grader app stylesheet.
   Light theme with Hovercam-brand orange:
   - --accent (#E85A14): darker orange for primary buttons + links;
     deeper than the logo's #FF641A so it clears AA contrast on white
   - --accent-brand (#FF641A): the exact logo orange, used on brand mark
   - --accent-2 (#FF8A4D): lighter orange for gradient ends + soft hovers
   - Text stays near-black with a faint warm cast.
   App CSS lives separate from site/styles.css so the two surfaces can
   diverge as the product grows; both share this palette. */

:root {
  --bg:         #ffffff;
  --bg-elev:    #fbf7f3;          /* top bar / footer wash */
  --bg-card:    #ffffff;
  --bg-soft:    #fff6ef;          /* alternating surface, warm */
  --border:     #ece4dc;
  --border-strong: #d9cec2;
  --text:       #1a1410;          /* near-black, slight warm cast */
  --text-soft:  #3a2f26;
  --muted:      #7a6a5c;
  --accent:     #E85A14;          /* primary action — AA on white */
  --accent-hover:#D14F10;
  --accent-2:   #FF8A4D;          /* lighter end of gradient */
  --accent-brand:#FF641A;         /* exact Hovercam logo orange */
  --accent-soft:#FFF1E6;          /* tinted pill / focus halo */
  --good:       #16a34a;
  --warn:       #d97706;
  --danger:     #dc2626;

  --radius:     14px;
  --radius-sm:  8px;
  --shadow-sm:  0 1px 2px rgba(26, 20, 16, 0.05);
  --shadow:     0 4px 14px rgba(26, 20, 16, 0.07);
  --shadow-lg:  0 10px 30px rgba(26, 20, 16, 0.08);

  --maxw: 920px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.muted { color: var(--muted); }

/* -------- top bar -------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; color: var(--text); }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-brand), var(--accent-2));
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.5px;
  box-shadow: var(--shadow-sm);
}

.topnav a, .topnav .topnav-user {
  margin-left: 18px;
  color: var(--text-soft);
  font-size: 14px;
}
.topnav a:hover { color: var(--text); text-decoration: none; }

.topnav .topnav-user {
  color: var(--muted);
}

/* The "Sign up" pill in the top nav: borrow the accent-soft chip style. */
.topnav a.cta-link {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.topnav a.cta-link:hover {
  background: #ffe2cc;
  color: var(--accent-hover);
  text-decoration: none;
}

/* Inline POST form (used for /signout/) — strips form chrome so the
   button looks like the surrounding nav links. */
.inline-form {
  display: inline;
  margin: 0;
  padding: 0;
}
.linklike {
  margin-left: 18px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--text-soft);
  cursor: pointer;
}
.linklike:hover { color: var(--text); }

/* -------- main / page -------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 22px 32px;
}

/* -------- splash hero -------- */
.hero {
  text-align: center;
  padding: 24px 4px 36px;
}

.kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 18px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.15;
  margin: 0 0 16px;
  /* Solid dark text reads better than a gradient on a near-white page;
     the orange shows up plenty on the kicker pill and the CTA. */
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero .lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto 26px;
}
.hero .lede strong { color: var(--text); font-weight: 700; }

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

/* -------- buttons -------- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease, filter 120ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn.primary {
  /* Light-orange -> dark-orange. Hovercam brand. */
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 55%, var(--accent-hover) 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}
.btn.primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 6px 18px rgba(232, 90, 20, 0.32);
}
.btn.ghost {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn.ghost:hover { background: var(--bg-soft); }

/* -------- credit pill (logged-in dashboard) -------- */
.credit-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px auto 0;
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
}
.credit-pill-num {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}

/* -------- status card on splash -------- */
.status-card {
  margin-top: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.status-card h2 {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.status-card .checks {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}
.status-card .checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.status-card .check {
  color: var(--good);
  font-weight: 800;
}
.status-card .dot {
  color: var(--muted);
  font-weight: 800;
}

/* -------- auth card -------- */
.auth-card {
  max-width: 420px;
  margin: 40px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--text);
}
.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 500;
}
.auth-form input {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
}
.auth-form input::placeholder { color: #b5a89a; }
.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 90, 20, 0.18);
}
.auth-form input:disabled { background: var(--bg-soft); color: var(--muted); }

/* Checkbox row inside the auth form. The grid label layout collapses
   the box and the label into one column by default; this overrides
   that for checkboxes so they sit inline with their text. */
.auth-form .checkbox-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 400;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.45;
}
.auth-form .checkbox-row input[type="checkbox"] {
  margin: 2px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* Inline form-level error message. */
.form-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: #fdecea;
  border: 1px solid #f5b8b3;
  color: #8a1f17;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.auth-alt {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* -------- footer -------- */
.appfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 18px 22px 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* -------- small screens -------- */
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; }
  .page   { padding: 32px 16px 24px; }
  .topnav a { margin-left: 12px; }
}
