/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-text: #1F2937;
  --color-heading: #111827;
  --color-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-surface: #F9FAFB;
  --color-accent: #FF6B9D;
  --color-accent-rgb: 255, 107, 157;

  /* Gradient accent (rose → dark green) */
  --gradient: linear-gradient(135deg, #FF6B9D 0%, #1a461f 100%);
  --gradient-text: linear-gradient(135deg, #FF6B9D, #1a461f);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);

  /* Layout */
  --max-width: 900px;
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3 {
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl)); }
h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
h3 { font-size: var(--text-xl); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li { margin-bottom: var(--space-2); }

strong { font-weight: 600; }

/* ============================================
   Header
   ============================================ */
.site-header {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.logo {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-heading);
  text-decoration: none;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: var(--space-12) 0 var(--space-8);
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-4);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-16);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.footer-nav {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.footer-nav a {
  color: var(--color-muted);
}

.footer-nav a:hover {
  color: var(--color-heading);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-8);
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid #FF6B9D; outline-offset: 2px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-secondary:hover { background: var(--color-border); }
.btn-secondary:focus-visible { outline: 2px solid #FF6B9D; outline-offset: 2px; }

.btn-text {
  background: none;
  border: none;
  color: var(--color-muted);
  font-family: var(--font);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.btn-text:hover { color: var(--color-heading); background: var(--color-surface); }
.btn-text:focus-visible { outline: 2px solid #FF6B9D; outline-offset: 2px; }

/* ============================================
   Ad Slots (placeholders)
   ============================================ */
.ad-slot {
  width: 100%;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  margin: var(--space-8) 0;
}

.ad-slot--banner { min-height: 90px; }
.ad-slot--rectangle { min-height: 250px; }

/* ============================================
   Generator Card
   ============================================ */
.generator-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-8);
}

.input-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-heading);
}

.input-group input {
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.input-group input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15);
}

.input-group input::placeholder {
  color: #9CA3AF;
}

.input-divider {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-muted);
  padding-bottom: var(--space-3);
  flex-shrink: 0;
}

.button-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ============================================
   Results
   ============================================ */
.results-section {
  margin-top: var(--space-8);
}

.results-heading {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  color: var(--color-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* One section per blend style */
.result-group-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.result-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: var(--space-2) var(--space-3);
  transition: box-shadow 0.15s;
}

.result-chip:hover {
  box-shadow: var(--shadow-sm);
}

.chip-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-heading);
}

/* Chip action buttons — .btn-copy and .btn-save also carry these styles */
.btn-chip {
  padding: 2px var(--space-2);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
  background: none;
  color: var(--color-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.1s, border-color 0.1s;
  line-height: 1;
}

.btn-chip:hover {
  color: var(--color-heading);
  border-color: var(--color-border);
}

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

/* Keep .copied state for copy feedback */
.btn-chip.copied {
  color: #16a34a;
}

.btn-copy:hover, .btn-save:hover {
  background: var(--color-border);
}

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

.btn-copy.copied {
  color: #16a34a;
  border-color: #16a34a;
}

.empty-state {
  text-align: center;
  color: var(--color-muted);
  padding: var(--space-8) 0;
  font-size: var(--text-lg);
}

/* ============================================
   Favorites
   ============================================ */
.favorites-section {
  margin-bottom: var(--space-8);
}

.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.favorites-header h2 {
  margin-bottom: 0;
  font-size: var(--text-xl);
}

.favorites-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  font-size: var(--text-base);
}

.favorite-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1;
  padding: 0 var(--space-1);
}

.favorite-chip button:hover { color: #ef4444; }

.favorite-chip button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   SEO Content
   ============================================ */
.seo-content {
  margin-top: var(--space-8);
}

.seo-section {
  margin-bottom: var(--space-12);
}

.seo-section h2 {
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-6);
}

.examples-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-4);
}

.examples-table th,
.examples-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.examples-table th {
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  background: var(--color-surface);
}

.examples-table td:last-child {
  font-weight: 700;
  color: var(--color-accent);
}

/* ============================================
   FAQ
   ============================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: var(--space-4) var(--space-6);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--color-muted);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.faq-item > p {
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
  .hero { padding: var(--space-8) 0 var(--space-6); }

  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .input-divider { display: none; }

  .button-row { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; }

  .generator-card { padding: var(--space-6) var(--space-4); }

  .site-footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ============================================
   Accessibility — Forced Colors / High Contrast
   ============================================ */
@media (forced-colors: active) {
  .logo,
  .hero h1 {
    -webkit-text-fill-color: unset;
    background: none;
  }
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-page {
  padding: var(--space-12) 0;
  max-width: 720px;
}

.legal-page h1 {
  margin-bottom: var(--space-2);
}

.legal-updated {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

.legal-page h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.legal-page h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
