/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://automateunit.com
 Description:  AutomateUnit Developer & AI Theme
 Author:       AutomateUnit
 Template:     generatepress
 Version:      1.0.0
*/

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
  --bg-dark: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
  --accent-cyan: #06b6d4;
  --accent-cyan-dim: rgba(6, 182, 212, 0.15);
  --accent-green: #10b981;
  --accent-green-dim: rgba(16, 185, 129, 0.15);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-glow: 0 0 0 1px var(--border-color), 0 8px 24px rgba(6, 182, 212, 0.08);
  --shadow-glow-hover: 0 0 0 1px var(--accent-cyan), 0 12px 32px rgba(6, 182, 212, 0.25);
  --max-width: 1200px;

  /* Glassmorphism */
  --glass-bg: rgba(30, 41, 59, 0.55);
  --glass-bg-strong: rgba(30, 41, 59, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);
}

/* Smooth-scroll for genuine same-page anchors (e.g. footer links to
   /#au-tool-heading). Respects reduced-motion preferences. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Base / Dark Mode Overrides for WordPress + GeneratePress
   ========================================================================== */
html { background-color: var(--bg-dark); }

/* Ambient color field the glass cards "reveal" against — fixed so it never
   scrolls or repaints per-frame. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 12% 15%, rgba(6, 182, 212, 0.16), transparent 60%),
    radial-gradient(500px circle at 88% 12%, rgba(16, 185, 129, 0.13), transparent 60%),
    radial-gradient(700px circle at 50% 95%, rgba(6, 182, 212, 0.09), transparent 60%);
  pointer-events: none;
}

body {
  background-color: var(--bg-dark) !important;
  color: var(--text-main) !important;
  font-family: var(--font-sans);
  line-height: 1.6;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color .15s ease; }
a:hover { color: #22d3ee; }

h1, h2, h3, h4, h5, h6 { color: var(--text-main); font-family: var(--font-sans); font-weight: 700; line-height: 1.2; }

code, kbd, pre, .tech-badge, .price-tag, .rating-pill { font-family: var(--font-mono); }

/* GeneratePress structural overrides */
#page, .site, .site-content, #content, .inside-article, .site-header, .site-footer, .footer-widgets {
  background-color: var(--bg-dark) !important;
  color: var(--text-main);
}

.site-header, .main-navigation, .site-footer, footer.site-info {
  background-color: var(--bg-dark) !important;
  border-color: var(--border-color) !important;
}

.main-navigation .main-nav ul li a,
.main-title a {
  color: var(--text-main) !important;
}

.main-navigation .main-nav ul li a:hover { color: var(--accent-cyan) !important; }

.main-title a {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-description {
  color: var(--text-muted) !important;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.text-cyan { color: var(--accent-cyan); }

.entry-content, .entry-summary, p, li { color: var(--text-muted); }
.entry-title, .entry-title a { color: var(--text-main) !important; }

input, textarea, select {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

hr, .widget hr { border-color: var(--border-color); }

/* ==========================================================================
   Layout Helpers
   ========================================================================== */
.au-section { padding: 80px 20px; }
.au-container { max-width: var(--max-width); margin: 0 auto; }

.au-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.au-section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 16px; }
.au-section-subtitle { color: var(--text-muted); max-width: 620px; margin-bottom: 48px; font-size: 1.05rem; }

.au-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .au-grid-3 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary-cyan,
.btn-secondary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary-cyan {
  background: var(--accent-cyan);
  color: #06202a;
}

.btn-primary-cyan:hover {
  background: #22d3ee;
  color: #06202a;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.35);
}

.btn-secondary-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* ==========================================================================
   Unit Card (Automation Units / Reviews)
   ========================================================================== */
.unit-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Browsers without backdrop-filter support get a solid card instead of a
   washed-out translucent one. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .unit-card { background: var(--card-bg); }
}

.unit-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-hover);
}

.unit-card__category {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.unit-card__title { font-size: 1.15rem; margin: 0; }
.unit-card__desc { color: var(--text-muted); font-size: 0.95rem; margin: 0; flex-grow: 1; }
.unit-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }

.unit-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Tech Badge
   ========================================================================== */
.tech-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  background: rgba(148, 163, 184, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text-muted);
}

/* ==========================================================================
   Price Tag
   ========================================================================== */
.price-tag { font-size: 1.15rem; font-weight: 700; color: var(--accent-green); }
.price-tag--free { color: var(--accent-cyan); }

/* ==========================================================================
   Rating Pill
   ========================================================================== */
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-green-dim);
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 600;
}

.rating-pill::before { content: "\2605"; }

/* ==========================================================================
   Code Preview Window (Terminal Chrome)
   ========================================================================== */
.code-preview-window {
  background: #0b1220;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.code-preview-window__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #111a2c;
  border-bottom: 1px solid var(--border-color);
}

.code-preview-window__dot { width: 11px; height: 11px; border-radius: 50%; }
.code-preview-window__dot--red { background: #ef4444; }
.code-preview-window__dot--yellow { background: #eab308; }
.code-preview-window__dot--green { background: #22c55e; }

.code-preview-window__title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.code-preview-window__body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre;
}

.code-preview-window__body .tok-key { color: #7dd3fc; }
.code-preview-window__body .tok-string { color: #86efac; }
.code-preview-window__body .tok-comment { color: #64748b; }
.code-preview-window__body .tok-status-ok { color: #22c55e; }

/* ==========================================================================
   Hero
   ========================================================================== */
.au-hero {
  padding: 100px 20px 80px;
  background: radial-gradient(ellipse at top, rgba(6, 182, 212, 0.08), transparent 60%);
}

.au-hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.au-hero__headline { font-size: clamp(2.2rem, 4vw, 3.25rem); margin-bottom: 20px; }
.au-hero__subhead { color: var(--text-muted); font-size: 1.15rem; margin-bottom: 32px; max-width: 540px; }
.au-hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* Trust bar under the hero CTAs. Left-aligned to match the rest of the hero
   copy column rather than centered — centering just this line would misalign
   it against the headline/subhead/buttons above it. */
.au-trust-bar {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.au-trust-bar__divider { color: var(--border-color); }

@media (max-width: 600px) {
  .au-trust-bar__divider { display: none; }
  .au-trust-bar { flex-direction: column; gap: 6px; }
}

/* Glow halo behind the terminal window — purely decorative, sits below it. */
.au-hero__visual { position: relative; }
.au-hero__visual::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: -1;
  background:
    radial-gradient(circle at 25% 25%, rgba(6, 182, 212, 0.35), transparent 60%),
    radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.25), transparent 60%);
  filter: blur(40px);
}

@media (max-width: 900px) {
  .au-hero__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Pillars
   ========================================================================== */
.au-pillar-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-cyan-dim);
  border-radius: var(--radius-sm);
  font-size: 20px;
  margin-bottom: 16px;
}

/* ==========================================================================
   JSON Formatter Tool
   ========================================================================== */
.json-tool {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.json-tool__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.json-tool__col label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.json-tool textarea,
.json-tool pre {
  width: 100%;
  min-height: 260px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.json-tool textarea { resize: vertical; }

.json-tool pre {
  background: #0b1220;
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.json-tool__actions { display: flex; align-items: center; gap: 16px; margin: 16px 0; flex-wrap: wrap; }

.json-tool__status { font-family: var(--font-mono); font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.json-tool__status--idle { color: var(--text-muted); background: rgba(148, 163, 184, 0.1); }
.json-tool__status--valid { color: var(--accent-green); background: var(--accent-green-dim); }
.json-tool__status--invalid { color: #f87171; background: rgba(239, 68, 68, 0.12); }

@media (max-width: 900px) {
  .json-tool__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Review / Blog Card
   ========================================================================== */
.review-card__meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.review-card__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 8px; }

/* ==========================================================================
   CTA Banner (Freelance / Custom Automation)
   ========================================================================== */
.au-cta-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(16, 185, 129, 0.12)), var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .au-cta-banner { background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(16, 185, 129, 0.08)); }
}

.au-cta-banner h2 { margin-bottom: 12px; }
.au-cta-banner p { color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; }