/* ========================================================================
   Mystic Battle Studios - style.css
   Design style: warm_friendly (warm colors, rounded corners, friendly fonts, soft shadows)
   Brand: Primary #0E1525, Secondary #5A2CA0, Accent #F4F7FB | Fonts: Trebuchet MS (display), Verdana (body)
   Requirements: Mobile-first, ONLY flexbox layouts, responsive, mobile menu, cookie banner
   ======================================================================== */

/* ------------------------------
   CSS Reset / Normalize
   ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.2rem; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(90,44,160,0.5); outline-offset: 2px; border-radius: 8px; }

/* ------------------------------
   Theme Variables
   ------------------------------ */
:root {
  --brand-primary: #0E1525; /* deep ink */
  --brand-secondary: #5A2CA0; /* warm violet */
  --brand-accent: #F4F7FB; /* soft light */

  --warm-1: #FFF7F0; /* page background - warm peach haze */
  --warm-2: #FFE8D6; /* hero / callout */
  --warm-3: #FFDCC3; /* accents and highlights */

  --ink: #1A1F2B; /* primary text */
  --ink-soft: #3A3F4B; /* secondary text */
  --muted: #6B7280; /* muted text */
  --line: #E8E6E3; /* soft divider */

  --white: #ffffff;
  --success: #2E7D32;
  --danger: #B00020;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-1: 0 6px 18px rgba(14,21,37,0.08);
  --shadow-2: 0 10px 28px rgba(14,21,37,0.12);

  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-60: 60px;
}

/* ------------------------------
   Base Typography
   ------------------------------ */
body {
  background: var(--warm-1);
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0 0 var(--space-16);
  color: var(--brand-primary);
}

h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.3; margin-top: var(--space-24); }
h3 { font-size: 18px; line-height: 1.4; }
h4 { font-size: 16px; line-height: 1.4; }

p { margin: 0 0 var(--space-16); color: var(--ink-soft); }
strong { color: var(--brand-primary); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-secondary);
  background: #F6E8FF;
  padding: 6px 12px;
  border-radius: 999px;
}

.subheadline { color: var(--ink-soft); font-size: 18px; }

/* ------------------------------
   Global Layout Containers (Flex only)
   ------------------------------ */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; /* Flex for all layout containers */
  flex-direction: column; /* Mobile-first */
  align-items: stretch;
  gap: var(--space-20);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

section { padding: var(--space-40) 0; }

/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Ensure consistent spacing between section children */
.content-wrapper > * + * { margin-top: 0; }

/* ------------------------------
   Header & Navigation
   ------------------------------ */
header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 247, 240, 0.92);
  backdrop-filter: saturate(120%) blur(6px);
  box-shadow: 0 1px 0 var(--line);
}

header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-16);
}

.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a {
  color: var(--brand-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.main-nav a:hover { background: var(--warm-3); color: var(--brand-primary); transform: translateY(-1px); }

.header-ctas { display: none; align-items: center; gap: var(--space-12); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  font-size: 22px;
  color: var(--brand-primary);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.mobile-menu-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); background: #fff; }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
  background: rgba(14,21,37,0.32);
  transform: translateX(100%);
  transition: transform .35s ease;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu > .mobile-nav {
  background: var(--warm-1);
  display: flex; flex-direction: column; gap: 8px;
  padding: 80px 24px 24px;
  width: 100%; max-width: 360px;
  margin-left: auto; /* slide in from right */
  box-shadow: -8px 0 24px rgba(14,21,37,0.18);
}

.mobile-menu-close {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--white); border: 1px solid var(--line); color: var(--brand-primary);
}

.mobile-nav a {
  display: flex; align-items: center; min-height: 44px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--brand-primary);
  background: var(--white);
  border: 1px solid var(--line);
  transition: background-color .2s ease, transform .2s ease;
}
.mobile-nav a:hover { background: var(--warm-3); transform: translateX(4px); }

/* Prevent scroll when menu open */
body.menu-open { overflow: hidden; }

/* ------------------------------
   Buttons
   ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-family: "Trebuchet MS", "Segoe UI", Roboto, Arial, sans-serif;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.btn-primary {
  background: var(--brand-secondary);
  color: var(--white);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: #4b2390; }

.btn-secondary {
  background: #FFEEE0;
  color: var(--brand-primary);
  border-color: #FFD7BC;
  box-shadow: var(--shadow-1);
}
.btn-secondary:hover { background: #FFE1CA; }

/* CTA group */
.cta-group { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }

/* ------------------------------
   Hero Sections
   ------------------------------ */
.hero {
  background: var(--warm-2);
  border-bottom: 1px solid var(--line);
}
.hero .container { align-items: center; }
.hero .content-wrapper { align-items: flex-start; }
.hero h1 { margin-top: 6px; }

.supporting-bullets { display: flex; flex-direction: column; gap: 10px; color: var(--ink-soft); }
.supporting-bullets li { padding-left: 2px; }

/* ------------------------------
   Text Blocks / Cards / Lists
   ------------------------------ */
.text-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-1);
}
.text-section h3, .text-section h4 { margin-bottom: 8px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; }

/* General cards (if used) */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-1);
}

/* Flexible grids (Flex only) */
.content-grid { align-items: stretch; }
.content-grid > * {
  flex: 1 1 280px;
  min-width: 260px;
}

/* Text + Image sections */
.text-image-section { align-items: center; }
.text-image-section > * { flex: 1 1 320px; }

/* Features */
.feature-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-16); box-shadow: var(--shadow-1); }

/* ------------------------------
   Testimonials (Accessible contrast: dark text on light background)
   ------------------------------ */
.testimonial-card {
  background: #FFF8F3; /* light warm background for readability */
  color: var(--ink);
  border: 1px solid #FFE2CD;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--ink-soft); }

/* ------------------------------
   Footer
   ------------------------------ */
footer { background: #9993cf; color: #F8FAFC; }
footer section { padding: var(--space-40) 0; }
footer .content-wrapper { flex-wrap: wrap; gap: var(--space-24); }
footer .text-section { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: #F1F5F9; box-shadow: none; }
footer .text-section p { color: #E2E8F0; }
footer .logo img { height: 34px; }
.footer-main, .footer-legal { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
footer nav h3 { color: #FFF; margin-bottom: 6px; font-size: 14px; opacity: 0.9; }
footer nav a { color: #E2E8F0; padding: 6px 8px; border-radius: 8px; transition: background-color .2s ease; }
footer nav a:hover { background: rgba(255,255,255,0.08); }

/* ------------------------------
   Cookie Consent Banner & Modal
   ------------------------------ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1500;
  display: none; /* show with .show */
  flex-direction: column; gap: 12px; align-items: stretch;
  background: #FFF3E8;
  color: var(--ink);
  border: 1px solid #FFD7BC;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-2);
}
.cookie-banner.show { display: flex; animation: fade-up .28s ease both; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-banner .btn { padding: 10px 14px; }
.cookie-banner .btn-accept { background: var(--brand-secondary); color: #fff; }
.cookie-banner .btn-reject { background: #FFEEE0; color: var(--brand-primary); border: 1px solid #FFD7BC; }
.cookie-banner .btn-settings { background: var(--white); border: 1px solid var(--line); color: var(--brand-primary); }

.cookie-modal {
  position: fixed; inset: 0; z-index: 1600; display: flex; align-items: center; justify-content: center;
  background: rgba(14,21,37,0.45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .cookie-modal-content {
  background: var(--white);
  color: var(--ink);
  width: 92%; max-width: 720px;
  border-radius: 16px; border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px; transform: translateY(10px);
  transition: transform .25s ease;
}
.cookie-modal.open .cookie-modal-content { transform: translateY(0); }
.cookie-modal .cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cookie-modal .cookie-row:last-child { border-bottom: 0; }
.cookie-modal .cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Simple toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle input[type="checkbox"] { display: none; }
.toggle .switch {
  width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--line);
  background: #F2F2F2; position: relative;
  display: flex; align-items: center; padding: 2px; transition: background-color .2s ease, border-color .2s ease;
}
.toggle .knob { width: 22px; height: 22px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-1); transform: translateX(0); transition: transform .2s ease; }
.toggle input[type="checkbox"]:checked + .switch { background: #E8DBFF; border-color: #D2B8FF; }
.toggle input[type="checkbox"]:checked + .switch .knob { transform: translateX(20px); background: var(--brand-secondary); }

/* ------------------------------
   Utilities
   ------------------------------ */
.muted { color: var(--muted); }
.hidden { display: none !important; }
.center { text-align: center; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }

/* ------------------------------
   Animations
   ------------------------------ */
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------
   Responsive (Mobile-first)
   ------------------------------ */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  .logo img { height: 40px; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero .content-wrapper { max-width: 880px; }
  .text-image-section { flex-direction: row; }
}

@media (min-width: 992px) {
  header .container { min-height: 72px; }
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }

  .content-wrapper { gap: var(--space-24); }

  /* Create airy columns in footer using flex wrap */
  footer .content-wrapper { flex-direction: row; align-items: flex-start; }

  .hero { padding: 56px 0; }
}

/* ------------------------------
   Links and Interactive States
   ------------------------------ */
a { color: var(--brand-secondary); }
a:hover { color: #4b2390; }

/* ------------------------------
   Accessibility and Contrast in Testimonials and Reviews
   Ensure dark text on light backgrounds
   ------------------------------ */
.testimonial-card, .review-card {
  background: #FFF8F3; /* light warm */
  color: var(--ink);
}

/* ------------------------------
   Page-specific small touches
   ------------------------------ */
.hero .subheadline { max-width: 70ch; }

/* List spacing inside content */
.text-section li { color: var(--ink-soft); }

/* ------------------------------
   Ensure gaps between content blocks across pages
   ------------------------------ */
main .content-wrapper > .text-section,
main .content-wrapper > .testimonial-card,
main .content-wrapper > .cta-group,
main .content-wrapper > p,
main .content-wrapper > ul,
main .content-wrapper > ol {
  margin-top: 0; /* gap controlled by flex gap */
}

/* ------------------------------
   Ensure no element overlap and clear spacing
   ------------------------------ */
section + section { margin-top: var(--space-20); }

/* ------------------------------
   Specific nav icon images in footer contacts
   ------------------------------ */
footer .text-section img { width: 18px; height: 18px; margin-right: 8px; display: inline-block; vertical-align: middle; }

/* ------------------------------
   Prevent absolute positioning of content cards (only decorative allowed)
   Note: We do not absolutely position .card, .text-section, .testimonial-card content
   ------------------------------ */
/* No absolute positioning used for content elements; only for close button in mobile menu (UI control). */

/* ------------------------------
   End of stylesheet
   ------------------------------ */
