@import url('https://fonts.googleapis.com/css2?family=Anton&family=Schibsted+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Invigorate brand palette */
  --bg: #121212;        /* near-black background */
  --panel: #1B1A19;     /* surface */
  --panel-2: #2A2826;   /* raised surface / inputs */
  --line: #3A3633;      /* borders */
  --text: #F6F2EE;      /* cream */
  --muted: #A8A29B;     /* warm grey */
  --accent: #F0207A;    /* magenta (primary) */
  --accent-2: #FF6B52;  /* coral (secondary) */
  --green: #3ECF8E;     /* reserved for the red/green energy audit "pass" */
  --radius: 12px;
  --font: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Anton', 'Schibsted Grotesk', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.req { color: var(--accent); }
.brand-mark { color: var(--accent); font-size: 2.4rem; line-height: 1; }
.brand-mark.small { font-size: 1rem; }
.brand-mark.big { font-size: 3rem; opacity: 0.35; }

/* LOGIN */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2430 0%, var(--bg) 60%);
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 44px 40px;
  width: 360px; text-align: center;
}
.login-card h1 { margin: 12px 0 4px; font-size: 1.7rem; letter-spacing: -0.02em; }
.tagline { color: var(--muted); margin: 0 0 24px; font-size: 0.95rem; }
.login-card form { display: flex; gap: 8px; }
.login-card input {
  flex: 1; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
}
.login-card button {
  padding: 12px 18px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer;
}
.fineprint { margin-top: 22px; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.error { color: var(--accent); font-size: 0.88rem; }

/* APP SHELL */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.logo { font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: -0.01em; }
.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
}
.ghost:hover { color: var(--text); border-color: var(--muted); }

.layout {
  display: grid; grid-template-columns: 420px 1fr; gap: 20px;
  padding: 20px 24px; max-width: 1280px; margin: 0 auto; align-items: start;
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.panel h2 { margin: 0 0 4px; font-size: 1.15rem; }
.form-panel { position: sticky; top: 20px; }

/* FORM */
#brief-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
#brief-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
#brief-form input, #brief-form textarea, #brief-form select {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 9px; font-family: var(--font); font-size: 0.92rem;
  width: 100%; resize: vertical;
}
#brief-form input:focus, #brief-form textarea:focus, #brief-form select:focus {
  outline: none; border-color: var(--accent);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--accent-2); font-size: 0.78rem; font-weight: 400; }
#generate-btn {
  margin-top: 6px; padding: 13px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer;
}
#generate-btn:disabled { opacity: 0.55; cursor: default; }

/* RESULTS */
.results-panel { min-height: 420px; }
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state p { margin: 8px 0; }
.loading { text-align: center; padding: 90px 20px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 16px;
  border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-block { margin-bottom: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.result-block:first-child { border-top: none; padding-top: 0; }
.result-block h3 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-2); margin: 0 0 10px;
}
.big-idea { font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.mission { font-style: italic; color: var(--muted); }

.hook-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hook-list li {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 1rem;
}
.hook-list li .pw { color: var(--accent); font-weight: 700; }

.copy-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; margin-bottom: 12px; position: relative;
}
.copy-card .label { font-size: 0.78rem; color: var(--accent-2); font-weight: 600; margin-bottom: 8px; }
.copy-card .body { white-space: pre-wrap; font-size: 0.95rem; }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: 4px 10px; font-size: 0.75rem; cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 12px; font-size: 0.88rem;
}
.audit-note {
  background: rgba(62,207,142,0.08); border: 1px solid rgba(62,207,142,0.3);
  border-radius: 8px; padding: 10px 12px; font-size: 0.88rem; color: var(--green);
}
.stage-note {
  background: rgba(255,176,32,0.07); border: 1px solid rgba(255,176,32,0.3);
  border-radius: 8px; padding: 10px 12px; font-size: 0.88rem; color: var(--accent-2);
}
.cta-pill {
  display: inline-block; background: var(--accent); color: #fff;
  border-radius: 8px; padding: 6px 14px; font-weight: 600; font-size: 0.9rem;
}
.foot { text-align: center; padding: 20px; }

/* ---- Invigorate brand typography & logo ---- */
.login-card h1,
.panel h2,
.embed-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.login-card h1 { font-size: 2rem; }
.panel h2 { font-size: 1.3rem; }

/* logo image in the top bar / login / embed header */
.logo-img { height: 26px; width: auto; display: block; }
.login-card .logo-img { height: 46px; margin: 0 auto 14px; }
.embed-head .logo-img { height: 40px; margin: 0 auto 10px; }
.logo { gap: 10px; }

/* buttons & accents now ride the magenta→coral brand gradient (via --accent vars) */
.cta-pill, .hook-list li .pw { font-weight: 700; }
