/*
Theme Name: Dreamformer Base Theme
Description: A clean, modern base theme bundled with the Dreamformer AI Site Builder plugin. Perfect starting point for AI-generated websites.
Author: Dreamformer
Version: 1.0.0
License: GPL v2 or later
Text Domain: dreamformer
Tags: ai-generated, modern, clean, responsive, block-ready
*/

/* ═══════════════════════════════════════
   DREAMFORMER — Dark Cinema Design
   ═══════════════════════════════════════ */

*,*::before,*::after { box-sizing: border-box; }

:root {
  /* Brand token bridges — plugin overrides via --df-*, dark cinema fallbacks */
  --color-primary: var(--df-primary, #7e3eee);
  --color-secondary: var(--df-secondary, #6d28d9);
  --color-accent: var(--df-accent, #F7C600);
  --color-background: var(--df-bg, #09090b);
  --color-background-alt: var(--df-bg-alt, #111113);
  --color-text: var(--df-text, #ffffff);
  --color-text-muted: var(--df-text-muted, rgba(255,255,255,.7));
  --font-family-heading: var(--df-font-heading, 'Outfit', sans-serif);
  --font-family-primary: var(--df-font-body, 'DM Sans', sans-serif);
  --border-radius: var(--df-radius, 20px);
  --border-radius-lg: var(--df-radius-lg, 40px);

  /* Dark cinema tokens (not bridged — page-specific design) */
  --black: #09090b;
  --surface: #111113;
  --surface-raised: #191919;
  --surface-border: #222225;
  --white: #ffffff;
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text-muted);
  --text-tertiary: rgba(255,255,255,.4);
  --brand-1: var(--color-primary);
  --brand-2: var(--color-secondary);
  --brand-gradient: linear-gradient(135deg, #8b5cf6 0%, #7e3eee 100%);
  --gold: var(--color-accent);
  --gold-hover: #FFD740;
  --gold-glow: rgba(247,198,0,.35);
  --accent-magenta: #F60974;
  --accent-purple: #6834F7;
  --accent-cyan: #049EDB;
  --accent-violet: #B111E8;
  --radius: var(--border-radius);
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font-display: var(--font-family-heading);
  --font-body: var(--font-family-primary);
  --max-w: 1200px;
  --section-pad: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 48px);
}

html { font-size: 100%; scroll-behavior: smooth; overflow-x: clip; width: 100%; max-width: 100vw; }

body {
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Noise grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

h1,h2,h3,h4,h5,h6 {
  margin: 0 0 1rem;
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 1rem; color: var(--color-text-muted); }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--white); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
li { margin-bottom: .5rem; }

.container { max-width: var(--max-w); margin: 0 auto; width: 100%; }

/* AI page layout */
.content-landing { color: var(--text-primary); width: 100%; }
.full-width { width: 100%; position: relative; }
.full-width-alt { width: 100%; }
.site-main { flex: 1; }
.site-wrapper { overflow-x: clip; max-width: 100%; width: 100%; position: relative; }

/* ═══ BUTTONS ═══ */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--gold);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 0 0 var(--gold-glow);
  letter-spacing: -.01em;
}
.btn-gold:hover {
  background: var(--gold-hover);
  color: #000;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px var(--gold-glow), 0 0 60px rgba(247,198,0,.15);
  text-decoration: none;
}
.btn-gold:active { transform: translateY(0) scale(.98); }
.btn-gold svg { width: 18px; height: 18px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  border-radius: 100px;
  border: 1.5px solid var(--surface-border);
  cursor: pointer;
  transition: all .25s;
}
.btn-outline:hover {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.04);
  text-decoration: none;
}

/* ═══ HEADER / NAV ═══ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 1000;
  padding: 0 clamp(20px,5vw,48px);
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .3s;
  box-sizing: border-box;
}
.site-header.scrolled {
  background: rgba(0,0,0,.85);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo svg { height: 26px; width: auto; }

.nav-links, .nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a, .nav-menu a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .9rem;
  color: var(--text-secondary);
  transition: color .2s;
  text-decoration: none;
}
.nav-links a:hover, .nav-menu a:hover { color: var(--white); text-decoration: none; }
.nav-menu .current a { color: var(--white); }
.nav-menu li { margin: 0; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-cta {
  padding: 10px 24px;
  background: var(--gold);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  border-radius: 100px;
  transition: all .2s;
}
.nav-cta:hover {
  background: var(--gold-hover);
  color: #000;
  box-shadow: 0 4px 20px var(--gold-glow);
  text-decoration: none;
}
.nav-mobile-cta { display: none; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  border-radius: var(--radius-xs);
  transition: all .15s;
}
.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
  margin: 2px 0;
  border-radius: 2px;
}
.mobile-menu-toggle:hover { background: rgba(255,255,255,.08); }
.mobile-menu-toggle.active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══ FOOTER ═══ */
.site-footer {
  padding: 80px clamp(20px,5vw,48px) 40px;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 0;
}
body.ai-generated-page .site-footer { margin-top: 0; }
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-brand-logo {
  display: flex;
  align-items: center;
}
.footer-brand-logo svg { height: 22px; width: auto; }
.footer-brand p {
  color: var(--text-tertiary);
  font-size: .85rem;
  line-height: 1.7;
  max-width: 260px;
  margin: 0;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  font-size: .9rem;
  color: var(--text-secondary);
  transition: color .2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-copy {
  font-size: .8rem;
  color: var(--text-tertiary);
}
.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.footer-socials a:hover { background: rgba(255,255,255,.1); }
.footer-socials svg { width: 16px; height: 16px; color: var(--text-secondary); }

/* ═══ ACCESSIBILITY ═══ */
:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.skip-link {
  position: absolute;
  top: -40px;
  left: .5rem;
  background: var(--color-primary);
  color: var(--white);
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-xs);
  z-index: 1000;
  transition: top .15s;
}
.skip-link:focus { top: .5rem; outline: 3px solid var(--gold); text-decoration: none; }

.visually-hidden, .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ═══ BLOG / POSTS ═══ */
.posts-container { display: grid; gap: 2rem; margin-bottom: 2rem; }
.post-card {
  background-color: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 2rem;
  transition: transform .25s, box-shadow .25s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.post-header { margin-bottom: 1.5rem; }
.post-title { margin-bottom: 1rem; font-size: 1.5rem; font-weight: 700; }
.post-title a { color: var(--color-text); text-decoration: none; }
.post-title a:hover { color: var(--color-primary); text-decoration: none; }
.post-meta { display: flex; gap: 1rem; font-size: .875rem; color: var(--text-tertiary); }
.post-thumbnail { margin-bottom: 1.5rem; border-radius: var(--radius-sm); overflow: hidden; }
.post-thumbnail img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.post-content { margin-bottom: 1.5rem; line-height: 1.75; }
.post-footer { border-top: 1px solid var(--surface-border); padding-top: 1rem; display: flex; justify-content: space-between; align-items: center; }
.read-more-link { font-size: .875rem; padding: .5rem 1rem; }

.single-post { max-width: 800px; margin: 6rem auto; background-color: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 3rem; }
.single-post .post-title { font-size: 2.25rem; text-align: center; margin-bottom: 1rem; }
.single-post .post-meta { justify-content: center; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--surface-border); }
.single-post .post-content { font-size: 1.125rem; line-height: 1.75; }
.single-post .post-content h2, .single-post .post-content h3, .single-post .post-content h4 { margin-top: 2rem; margin-bottom: 1rem; }

.post-categories, .post-tags { font-size: .875rem; color: var(--text-tertiary); }
.post-categories { margin-bottom: 1rem; }
.cat-links a, .tags-links a { color: var(--color-primary); text-decoration: none; margin-right: .5rem; }
.cat-links a:hover, .tags-links a:hover { text-decoration: underline; }

.post-navigation { margin: 6rem auto; max-width: 800px; display: flex; justify-content: space-between; gap: 2rem; }
.post-navigation .nav-links { display: flex; width: 100%; gap: 2rem; }
.nav-previous, .nav-next { flex: 1; background-color: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 1.5rem; transition: background-color .15s; }
.nav-previous:hover, .nav-next:hover { background-color: var(--surface-raised); }
.nav-previous a, .nav-next a { display: block; color: var(--color-text); text-decoration: none; }
.nav-subtitle { display: block; font-size: .875rem; color: var(--text-tertiary); margin-bottom: .5rem; }
.nav-title { font-weight: 600; }
.nav-next { text-align: right; }

.pagination { display: flex; justify-content: center; gap: 1rem; margin: 6rem 0; }
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all .15s;
}
.page-numbers:hover { color: var(--white); border-color: var(--color-primary); text-decoration: none; }
.page-numbers.current { color: var(--black); background-color: var(--color-primary); border-color: var(--color-primary); }

.comments-area { margin: 6rem auto; max-width: 800px; background-color: var(--surface); border-radius: var(--radius-sm); padding: 3rem; }
.comments-title { margin-bottom: 2rem; font-size: 1.5rem; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment { background-color: var(--surface-raised); border-radius: var(--radius-sm); padding: 1.5rem; margin-bottom: 1.5rem; }
.comment-author { font-weight: 600; margin-bottom: 1rem; }
.comment-meta { font-size: .875rem; color: var(--text-tertiary); margin-bottom: 1rem; }

.no-posts { text-align: center; padding: 6rem 0; }
.no-posts .page-title { font-size: 1.875rem; margin-bottom: 1.5rem; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: span 3; }
}

@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }
  .nav-cta { display: none !important; }
  .nav-links, .nav-menu, .primary-navigation { display: none; }
  .nav-links.active, .primary-navigation.active { display: flex; }

  .primary-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(9,9,11,.98);
    backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255,255,255,.06);
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    align-items: stretch;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  }
  .primary-navigation.active { right: 0; display: flex; }
  .primary-navigation .nav-links,
  .primary-navigation .nav-menu {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: 2rem;
  }
  .primary-navigation .nav-links a,
  .primary-navigation .nav-menu a {
    padding: 1rem 0;
    font-size: 1rem;
    display: block;
    border-bottom: 1px solid var(--surface-border);
  }
  .nav-mobile-cta {
    display: block;
    margin-top: 1.5rem;
    padding: 14px 24px;
    background: var(--gold);
    color: #000;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    border-radius: 100px;
    text-align: center;
    transition: background .2s;
  }
  .nav-mobile-cta:hover {
    background: var(--gold-hover);
    color: #000;
    text-decoration: none;
  }

  .nav-inner { max-width: 100%; overflow: hidden; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
}

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

img, video, iframe { height: auto; max-width: 100%; }
