/* ============================================================
   ConsentForge — Cookie Consent Banner Generator
   Palette: deep slate + electric blue + warm sand accent
   Type:    Space Grotesk (display) / Inter (text)
   ============================================================ */

:root {
  --ink:        #0d1320;   /* near-black slate */
  --ink-2:      #161e2e;
  --panel:      #ffffff;
  --bg:         #f4f6fb;   /* cool off-white */
  --bg-2:       #e9edf6;
  --line:       #d8deea;
  --text:       #1b2434;
  --text-soft:  #56617a;
  --accent:     #3b6ef6;   /* electric blue */
  --accent-ink: #244dc4;
  --sand:       #f4b860;   /* warm sand accent */
  --good:       #1f9d6b;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 10px 30px -12px rgba(13, 19, 32, 0.28);
  --shadow-sm:  0 2px 8px -2px rgba(13, 19, 32, 0.16);
  --maxw:       1120px;
  --ease:       cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(59,110,246,.10), transparent 60%),
    radial-gradient(700px 380px at -5% 5%, rgba(244,184,96,.12), transparent 55%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .brand-name, .panel-title, .btn {
  font-family: "Space Grotesk", "Inter", sans-serif;
}

a { color: var(--accent-ink); }

code, pre, .hex, .fake-url {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
}

code {
  background: var(--bg-2);
  padding: 0.08em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ================= Header ================= */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(244,246,251,.82);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.brand-mark { font-size: 1.4rem; }
.brand-name { font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); }
.brand-accent { color: var(--accent); }
.header-links { display: flex; gap: 22px; align-items: center; font-size: 0.92rem; }
.header-links a { color: var(--text-soft); text-decoration: none; font-weight: 500; }
.header-links a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .header-links a:not(:last-child) { display: none; }
}

/* ================= Hero ================= */
.hero { padding: 56px 0 26px; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent-ink);
  background: rgba(59,110,246,.10); padding: 6px 12px; border-radius: 999px; margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.3rem); line-height: 1.04; margin: 0 0 16px;
  letter-spacing: -0.03em; color: var(--ink);
}
.lede { max-width: 720px; font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--text-soft); margin: 0 0 26px; }
.lede code { color: var(--accent-ink); background: rgba(59,110,246,.10); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  border: 1px solid transparent; border-radius: 10px;
  padding: 11px 18px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: transform .12s var(--ease), background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 7px 13px; font-size: 0.85rem; }

/* ================= Builder layout ================= */
.builder { padding: 14px 0 30px; }
.builder-grid {
  display: grid; gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
}
@media (max-width: 900px) {
  .builder-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.panel-title {
  font-size: 1.02rem; margin: 0 0 16px; color: var(--ink);
  letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px;
}

/* ---------- Form fields ---------- */
.field { margin-bottom: 17px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 460px) { .field-row { grid-template-columns: 1fr; } }

label, legend { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
.hint { font-size: 0.8rem; color: var(--text-soft); margin: 6px 0 0; }
.hint a { font-weight: 600; }

input[type="text"], input[type="url"], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 0.95rem; font-family: inherit;
  color: var(--text); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: #b9c2d6; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,110,246,.16); outline: none; }
textarea { resize: vertical; min-height: 72px; }

.color-input { display: flex; gap: 8px; align-items: center; }
.color-input input[type="color"] {
  -webkit-appearance: none; appearance: none; width: 46px; height: 42px;
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: none;
}
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.color-input input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.hex { flex: 1; text-transform: lowercase; }

fieldset.field { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 17px; }
fieldset legend { padding: 0 6px; margin-bottom: 2px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 0.92rem; margin: 8px 0 0; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.check em { color: var(--text-soft); font-style: normal; font-size: 0.85em; }
.disabled-check { opacity: .75; cursor: not-allowed; }

/* ================= Preview ================= */
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.preview-stage {
  position: relative; height: 320px; border-radius: var(--radius-sm); overflow: hidden;
  background: linear-gradient(135deg, #eef1f8, #e3e8f4);
  border: 1px solid var(--line); margin-bottom: 8px;
}
.fake-browser { position: absolute; inset: 0; display: flex; flex-direction: column; }
.fake-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #d4dae6; }
.fake-url { margin-left: 10px; font-size: 0.74rem; color: var(--text-soft); background: var(--bg); padding: 3px 10px; border-radius: 6px; }
.fake-page { padding: 18px 20px; flex: 1; }
.sk { background: #d9e0ee; border-radius: 6px; }
.sk-title { height: 16px; width: 55%; margin-bottom: 14px; }
.sk-line { height: 10px; width: 90%; margin-bottom: 9px; }
.sk-line.short { width: 65%; }
.sk-block { height: 90px; width: 100%; margin-top: 16px; border-radius: 8px; }
.preview-note { font-size: 0.8rem; color: var(--text-soft); margin: 0 0 20px; }

/* The mount holds the live banner; it must contain it inside the stage */
#bannerMount { position: absolute; inset: 0; pointer-events: none; }
#bannerMount > * { pointer-events: auto; }

/* ================= Snippet output ================= */
.snippet-instructions { font-size: 0.88rem; color: var(--text-soft); margin: 0 0 12px; }
.snippet-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.copy-status { font-size: 0.85rem; font-weight: 600; color: var(--good); }
.output-pre {
  margin: 0; background: var(--ink); color: #e7edf9; border-radius: var(--radius-sm);
  padding: 16px; overflow: auto; max-height: 340px; font-size: 0.8rem; line-height: 1.5;
  border: 1px solid #2a3550;
}
.output-pre code { background: none; padding: 0; color: inherit; white-space: pre; }

/* ================= Disclaimer ================= */
.disclaimer {
  margin: 24px 0 0; padding: 16px 18px; font-size: 0.9rem; color: var(--text);
  background: rgba(244,184,96,.16); border: 1px solid rgba(244,184,96,.55);
  border-left: 4px solid var(--sand); border-radius: var(--radius-sm);
}

/* ================= How / CTA ================= */
.how { padding: 36px 0 10px; }
.how h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; color: var(--ink); margin: 0 0 22px; }
.how-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 36px; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .how-steps { grid-template-columns: 1fr; } }
.how-steps li {
  counter-increment: step; position: relative; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px;
}
.how-steps li::before {
  content: counter(step); position: absolute; top: -14px; left: 18px;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--accent); color: #fff; border-radius: 8px; font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}
.how-steps h3 { margin: 6px 0 8px; font-size: 1.02rem; color: var(--ink); }
.how-steps p { margin: 0; font-size: 0.9rem; color: var(--text-soft); }

.cta-cards { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
@media (max-width: 700px) { .cta-cards { grid-template-columns: 1fr; } }
.cta-card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform .14s var(--ease), box-shadow .15s, border-color .15s;
}
.cta-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.cta-card h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--ink); }
.cta-card p { margin: 0; font-size: 0.9rem; color: var(--text-soft); }
.cta-card-accent { background: linear-gradient(135deg, var(--ink), var(--ink-2)); border-color: var(--ink-2); }
.cta-card-accent h3, .cta-card-accent p { color: #fff; }
.cta-card-accent p { color: #b8c4dd; }
.cta-card-accent:hover { border-color: var(--sand); }

/* ================= Footer ================= */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.footer-inner p { margin: 0; font-size: 0.88rem; color: var(--text-soft); }
.footer-inner a { font-weight: 600; }
.footer-fine { font-size: 0.8rem; }
