/*
Theme Name: BratText
Theme URI: https://brattext.com
Author: BratText.com
Author URI: https://brattext.com
Description: Official BratText.com WordPress theme — a premium brat text generator and blog. Features the iconic brat green aesthetic (#8ACE00) from Charli XCX's BRAT album.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: brat, generator, blog, green, modern, responsive
Text Domain: brattext
*/

/* ===========================
   CSS RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: #f9f9f9;
  color: #111827;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ===========================
   CSS VARIABLES
   =========================== */
:root {
  --brat-green: #8ACE00;
  --brat-green-dark: #6fa300;
  --brat-green-light: #a8e000;
  --brat-green-bg: #f2ffe0;
  --bg: #f9f9f9;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --max-w: 1200px;
  --max-w-prose: 768px;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { color: var(--text-muted); line-height: 1.75; }
strong { color: var(--text); font-weight: 600; }
code {
  font-family: Menlo, monospace;
  font-size: 0.85em;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

/* ===========================
   LAYOUT
   =========================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container-prose {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: var(--brat-green);
  color: #000;
}
.btn-primary:hover { background: var(--brat-green-dark); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--radius-lg); }

/* ===========================
   BADGES / TAGS
   =========================== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--brat-green-bg);
  color: #3d6000;
  border: 1px solid #c5e87a;
}

/* ===========================
   NAVIGATION
   =========================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249,249,249,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--brat-green);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.logo-accent { color: var(--brat-green); }
#site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
#site-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  text-decoration: none;
}
#site-nav a:hover, #site-nav a.current { color: var(--text); background: #f3f4f6; }
#site-nav a.current { background: var(--brat-green-bg); color: #3d6000; }
.nav-cta { margin-left: 8px; }
#mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  color: var(--text);
}
#mobile-menu {
  display: none;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
#mobile-menu a {
  display: block;
  padding: 14px 24px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
#mobile-menu a:hover { background: var(--bg); color: var(--text); }

/* ===========================
   HERO
   =========================== */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 60px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--brat-green-bg);
  border: 1px solid #c5e87a;
  color: #3d6000;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 span { color: var(--brat-green); }
.hero p { font-size: 1.125rem; max-width: 600px; margin: 0 auto 32px; }
.hero-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hero-pills span { display: flex; align-items: center; gap: 6px; }
.pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brat-green);
  display: inline-block;
}

/* ===========================
   GENERATOR SECTION
   =========================== */
#brat-generator-section { background: var(--surface); }
.generator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.generator-controls { display: flex; flex-direction: column; gap: 24px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--brat-green); }
.form-hint { font-size: 0.75rem; color: var(--text-light); }

.color-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.color-swatch {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  background: none;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { border-color: var(--brat-green); transform: scale(1.12); box-shadow: 0 0 0 2px var(--brat-green); }
.color-swatch-custom {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: none;
}
.color-swatch-custom input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.color-code { font-size: 0.72rem; font-family: monospace; color: var(--text-muted); }

.slider-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.slider-val { font-size: 0.8rem; font-family: monospace; color: var(--text-muted); background: var(--bg); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); }
input[type="range"] {
  width: 100%;
  accent-color: var(--brat-green);
  height: 4px;
  border-radius: 2px;
}

.canvas-size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.canvas-size-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }

.action-row { display: flex; gap: 12px; }

/* Preview */
.generator-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.preview-wrapper {
  width: 100%;
  aspect-ratio: 1;
  max-width: 480px;
  background: #f3f4f6;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#brat-canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
}
.preview-info { font-size: 0.75rem; color: var(--text-light); }

/* ===========================
   FEATURES / INFO CARDS
   =========================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--brat-green); }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1rem; margin-bottom: 8px; }
.card p { font-size: 0.875rem; }

/* Steps list */
.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.step-num {
  width: 40px; height: 40px;
  background: var(--brat-green);
  color: #000;
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body h3 { font-size: 1rem; margin-bottom: 4px; }
.step-body p { font-size: 0.875rem; }

/* ===========================
   BLOG / POSTS
   =========================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { border-color: var(--brat-green); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-thumb {
  height: 140px;
  background: var(--brat-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  color: #000;
}
.post-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-cat {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--brat-green-bg);
  color: #3d6000;
  font-size: 0.7rem;
  font-weight: 700;
}
.post-read { font-size: 0.72rem; color: var(--text-light); }
.post-card h2, .post-card h3 { font-size: 0.95rem; margin-bottom: 8px; line-height: 1.4; }
.post-card h2 a, .post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--brat-green); }
.post-excerpt { font-size: 0.825rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.post-date { font-size: 0.72rem; color: var(--text-light); }
.post-link { font-size: 0.78rem; font-weight: 700; color: var(--brat-green); }

/* ===========================
   FAQ
   =========================== */
.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.faq-item h3 { font-size: 1rem; margin-bottom: 10px; }
.faq-item p { font-size: 0.875rem; }

/* ===========================
   SECTION HEADERS
   =========================== */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { max-width: 560px; margin: 0 auto; }
.section-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }

/* ===========================
   CTA SECTION
   =========================== */
.cta-section {
  background: var(--brat-green-bg);
  border-top: 1px solid #c5e87a;
  text-align: center;
}
.cta-preview {
  width: 96px; height: 96px;
  background: var(--brat-green);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: #000;
}
.cta-section h2 { margin-bottom: 12px; }
.cta-section p { margin-bottom: 28px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ===========================
   SINGLE POST
   =========================== */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
  padding: 40px 0 64px;
}
.post-content-header { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.post-content-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 16px 0; }
.post-content-meta { display: flex; align-items: center; gap: 20px; font-size: 0.85rem; color: var(--text-muted); }
.post-hero {
  width: 100%;
  height: 200px;
  background: var(--brat-green);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 3rem;
  color: #000;
}
.post-content { line-height: 1.8; }
.post-content h2 { font-size: 1.5rem; margin: 40px 0 16px; }
.post-content h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.post-content p { color: var(--text-muted); margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 16px 0 16px 24px; color: var(--text-muted); }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; line-height: 1.7; }
.post-content strong { color: var(--text); font-weight: 600; }
.post-cta {
  margin-top: 48px;
  background: var(--brat-green-bg);
  border: 1px solid #c5e87a;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.post-cta h3 { font-size: 1.125rem; margin-bottom: 8px; }
.post-cta p { font-size: 0.875rem; margin-bottom: 16px; }

/* Sidebar */
.post-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.sidebar-card h3 { font-size: 0.875rem; font-weight: 700; margin-bottom: 16px; }
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-list a { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; line-height: 1.5; }
.related-list a:hover { color: var(--text); text-decoration: underline; }
.sidebar-cta { background: var(--brat-green-bg); border-color: #c5e87a; text-align: center; }
.sidebar-cta-icon {
  width: 64px; height: 64px;
  background: var(--brat-green);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: #000;
}
.sidebar-cta h3 { font-size: 0.875rem; margin-bottom: 6px; }
.sidebar-cta p { font-size: 0.78rem; margin-bottom: 12px; }

/* ===========================
   BREADCRUMB
   =========================== */
.breadcrumb { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { margin: 0 6px; }

/* ===========================
   PAGE CONTENT
   =========================== */
.page-header {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.page-header h1 { margin-bottom: 8px; }
.page-content { padding: 48px 0 64px; }
.page-content h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.page-content h3 { font-size: 1.125rem; margin: 24px 0 8px; }
.page-content p { margin-bottom: 16px; }
.page-content ul { list-style: disc; margin: 12px 0 16px 24px; color: var(--text-muted); }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--brat-green); text-decoration: underline; }
.last-updated { font-size: 0.82rem; color: var(--text-light); margin-bottom: 32px; }

/* ===========================
   BLOG ARCHIVE
   =========================== */
.blog-header {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.category-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.cat-filter {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: default;
}

/* ===========================
   CONTACT FORM
   =========================== */
.contact-form {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 640px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label { font-size: 0.875rem; font-weight: 700; color: var(--text); }
.req { color: #ef4444; margin-left: 2px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--brat-green); }
.form-footer-note { font-size: 0.75rem; color: var(--text-light); text-align: center; margin-top: 12px; }
.success-state { text-align: center; padding: 60px 20px; display: none; }
.success-icon { font-size: 3rem; margin-bottom: 16px; }
.success-state h2 { margin-bottom: 12px; }

/* ===========================
   FOOTER
   =========================== */
#site-footer {
  background: #f3f4f6;
  border-top: 1px solid var(--border);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); margin-top: 12px; max-width: 280px; line-height: 1.6; }
.footer-col h3 { font-size: 0.875rem; font-weight: 700; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.75rem; color: var(--text-light); }

/* ===========================
   404 PAGE
   =========================== */
.notfound-section { text-align: center; padding: 80px 0; }
.notfound-icon {
  width: 120px; height: 120px;
  background: var(--brat-green);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  font-family: Arial;
  font-weight: 900;
  font-size: 2rem;
  color: #000;
}
.notfound-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .generator-grid { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  #site-nav, .nav-cta { display: none; }
  #mobile-toggle { display: flex; }
  .cards-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .contact-form { padding: 24px; }
}
@media (max-width: 480px) {
  .hero { padding: 48px 0 40px; }
  .container { padding: 0 16px; }
}
