/* ===========================
   BrandForge AI — style.css
   =========================== */

/* TOKENS */
:root {
  --bg: #0a0b0f;
  --bg-2: #111318;
  --bg-3: #1a1d25;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #f0f2f8;
  --text-2: #9ba3b8;
  --text-3: #5a6278;
  --accent: #6ee7b7;
  --accent-2: #38bdf8;
  --accent-3: #a78bfa;
  --gradient: linear-gradient(135deg, #6ee7b7 0%, #38bdf8 50%, #a78bfa 100%);
  --gradient-text: linear-gradient(135deg, #6ee7b7, #38bdf8, #a78bfa);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f4f5f9;
  --bg-2: #ffffff;
  --bg-3: #eef0f6;
  --surface: rgba(0,0,0,0.03);
  --surface-hover: rgba(0,0,0,0.06);
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.2);
  --text: #0d0f18;
  --text-2: #4a5168;
  --text-3: #9ba3b8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110,231,183,0.15);
}
select option { background: var(--bg-2); color: var(--text); }
textarea { resize: vertical; }
img { max-width: 100%; }

/* UTILITY */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.glass {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #0a0b0f;
  font-weight: 600;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(110,231,183,0.3); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: var(--radius-sm); }
.btn-tool {
  width: 100%;
  justify-content: center;
  padding: 0.7rem 1rem;
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all var(--transition);
  margin-top: 1rem;
}
.btn-tool:hover { border-color: var(--accent); color: var(--accent); background: rgba(110,231,183,0.07); }
.btn-tool.btn-primary { background: var(--gradient); color: #0a0b0f; border: none; font-weight: 600; }
.btn-tool.btn-primary:hover { opacity: 0.9; color: #0a0b0f; }
.btn-tool:disabled { opacity: 0.5; cursor: not-allowed; }

/* HEADER */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.75rem 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.header.scrolled {
  background: rgba(10,11,15,0.85);
  border-bottom-color: var(--border);
}
[data-theme="light"] .header.scrolled { background: rgba(244,245,249,0.85); }
.nav { display: flex; align-items: center; gap: 2rem; }
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
}
.logo-icon { font-size: 1.4rem; line-height: 1; }
.logo-accent { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav-links a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-theme {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.btn-theme:hover { border-color: var(--border-hover); }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all var(--transition);
}
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.nav-mobile a {
  padding: 0.75rem 0;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.nav-mobile.open { display: flex; }

/* HERO */
.hero {
  position: relative;
  padding: 10rem 0 6rem;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6ee7b7, transparent 70%);
  top: -200px; left: -100px;
  animation: float 8s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
  top: -100px; right: -100px;
  animation: float 10s ease-in-out infinite reverse;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #a78bfa, transparent 70%);
  bottom: -100px; left: 50%;
  transform: translateX(-50%);
  animation: float 12s ease-in-out infinite;
}
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease both;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.7s ease 0.1s both;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-2);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.7s ease 0.2s both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  animation: fadeInUp 0.7s ease 0.3s both;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  animation: fadeInUp 0.7s ease 0.4s both;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat span { font-size: 0.8rem; color: var(--text-3); margin-top: 0.1rem; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SECTION HEADER */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  background: rgba(110,231,183,0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-header p { color: var(--text-2); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* TOOLS SECTION */
.tools-section { padding: 6rem 0; }

/* BRAND INPUT PANEL */
.brand-input-panel {
  padding: 2rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.6s ease both;
}
.panel-header { margin-bottom: 1.5rem; }
.panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.panel-header p { color: var(--text-2); font-size: 0.9rem; }
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.input-group { display: flex; flex-direction: column; gap: 0.4rem; }
.input-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
}
.char-count { color: var(--text-3); font-weight: 400; }
.full-width { grid-column: 1 / -1; }

/* TOOLS GRID */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tool-card-wide { grid-column: 1 / -1; }
.tool-card {
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.tool-card:hover::before { opacity: 1; }
.tool-card-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 0.75rem; }
.tool-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 0 20px -5px var(--icon-color);
}
.tool-card-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.tool-card-header p { font-size: 0.82rem; color: var(--text-2); line-height: 1.4; }

/* TOOL RESULTS */
.tool-result {
  margin-top: 1rem;
  min-height: 0;
  transition: all var(--transition);
}
.tool-result:empty { display: none; }
.result-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-2);
  font-size: 0.85rem;
  padding: 0.75rem;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-names, .result-slogans {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.result-item:hover { border-color: var(--accent); background: rgba(110,231,183,0.05); }
.result-item .copy-hint { font-size: 0.7rem; color: var(--text-3); opacity: 0; transition: opacity var(--transition); }
.result-item:hover .copy-hint { opacity: 1; }

.result-text {
  padding: 0.75rem 1rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  position: relative;
}
.result-copy-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.8rem;
  transition: all var(--transition);
}
.result-copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* COLORS */
.color-palette {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
.color-swatch-box {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.color-swatch:hover .color-swatch-box { transform: scale(1.08); border-color: var(--border-hover); }
.color-swatch span { font-size: 0.65rem; color: var(--text-3); font-family: monospace; }
.color-label { font-size: 0.72rem; color: var(--text-2); margin-bottom: 0.25rem; }

/* LOGO */
.logo-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.logo-result svg { max-width: 200px; max-height: 80px; }
.logo-actions { display: flex; gap: 0.5rem; }
.logo-actions button {
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.78rem;
  transition: all var(--transition);
}
.logo-actions button:hover { border-color: var(--accent); color: var(--accent); }

/* LANDING PAGE RESULT */
.landing-result {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.landing-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.landing-preview {
  width: 100%;
  height: 300px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
}

/* HOW SECTION */
.how-section { padding: 6rem 0; background: var(--bg-2); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step-card { padding: 2rem; text-align: center; position: relative; }
.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}
.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.step-card p { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; }

/* FAQ SECTION */
.faq-section { padding: 6rem 0; }
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 720px; margin: 0 auto; }
.faq-item { overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--accent); }
.faq-q span {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-3);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item.open .faq-q span { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.7;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 1.5rem 1.25rem; }

/* FOOTER */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 4rem 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-brand p { color: var(--text-2); font-size: 0.88rem; line-height: 1.7; }
.footer-email { color: var(--accent); font-size: 0.88rem; }
.footer-email:hover { text-decoration: underline; }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.25rem;
}
.footer-links a { color: var(--text-2); font-size: 0.88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p { color: var(--text-3); font-size: 0.82rem; }
.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { text-decoration: underline; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.5rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: var(--accent); color: var(--accent); }
.toast.error { border-color: #f87171; color: #f87171; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .tool-card-wide { grid-column: 1 / -1; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-burger { display: flex; }
  .tools-grid { grid-template-columns: 1fr; }
  .input-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: 1; }
  .hero { padding: 8rem 0 4rem; }
  .hero-stats { gap: 1.25rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .color-palette { justify-content: center; }
}
