/* ============================================================
   BANNR — Dark, modern AI marketing tool design tokens
   ============================================================ */

:root {
  /* Background scale (warm near-white) */
  --bg-0: #fafafc;
  --bg-1: #f5f5f8;
  --bg-2: #ffffff;
  --bg-3: #f7f7fa;
  --bg-4: #eeeef3;

  /* Surfaces */
  --surface: rgba(15, 23, 42, 0.025);
  --surface-hi: rgba(15, 23, 42, 0.04);
  --surface-hover: rgba(15, 23, 42, 0.06);

  /* Borders */
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --border-focus: rgba(99, 102, 241, 0.55);

  /* Text */
  --text-0: #0b0b14;
  --text-1: #1f2030;
  --text-2: #5a5a72;
  --text-3: #8b8ba0;
  --text-4: #b6b6c8;

  /* Brand — indigo / violet */
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-3: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.10);
  --accent-glow: rgba(99, 102, 241, 0.28);

  /* Semantic */
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 28px;

  /* Shadows */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  --shadow-2: 0 8px 32px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.3), 0 0 24px -4px var(--accent-glow);

  /* Type */
  --font-sans: "Plus Jakarta Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-text-size-adjust: 100%;
  font-size: 15px;
  line-height: 1.55;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ambient background — soft pastel gradients + grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 18% -10%, rgba(99, 102, 241, 0.12), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(167, 139, 250, 0.10), transparent 60%),
    radial-gradient(700px 700px at 50% 110%, rgba(99, 102, 241, 0.05), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
}

/* Selection */
::selection {
  background: rgba(99, 102, 241, 0.22);
  color: var(--text-0);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.22);
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   Typography
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-0);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01";
  letter-spacing: -0.01em;
}

/* Page container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }
}

/* ============================================================
   Buttons (shared)
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-1);
  font: 500 14px/1 var(--font-sans);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, color 120ms ease;
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 0 0 1px rgba(79, 70, 229, 0.5),
    0 10px 28px -8px rgba(99, 102, 241, 0.5);
}
.btn--primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-1);
}
.btn--ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn--icon {
  width: 40px;
  padding: 0;
}

.btn--lg {
  height: 52px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: 14px;
}

/* ============================================================
   Inputs (shared)
   ============================================================ */

.input,
.textarea,
.select {
  width: 100%;
  background: #ffffff;
  color: var(--text-0);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font: 400 15px/1.5 var(--font-sans);
  padding: 12px 14px;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  font-family: inherit;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--border-strong);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

/* Subtle chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(129, 140, 248, 0.22);
  font: 500 11.5px/1 var(--font-sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.chip--neutral {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

/* Divider */
.hr {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}

/* Card */
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

/* Helper */
.dim {
  color: var(--text-2);
}
.dim-2 {
  color: var(--text-3);
}

.fade-in {
  animation: fadeIn 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Glow ring helper */
.glow {
  position: relative;
}
.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35), 0 0 32px -4px var(--accent-glow);
  opacity: 0;
  transition: opacity 200ms ease;
}
.glow:hover::after {
  opacity: 1;
}
