/*
Theme Name: BetterLife Theme
Theme URI: https://betterlife.coaching
Description: A premium, highly customizable responsive theme built specifically for the BetterLife personal coaching iOS application. Compatible with WordPress 7.0+, WooCommerce, and advanced PHP 8.1+ guidelines. Conformed to senior PRISM UI/UX responsive rem typography.
Author: Joerg Peetz
Author URI: https://joergpeetz.com
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: betterlife-theme
Tags: block-patterns, block-styles, editor-style, wide-blocks
*/

/* --- Core Theme Custom Properties --- */
:root {
    --bl-radius-sm: 8px;
    --bl-radius-md: 16px;
    --bl-radius-lg: 24px;
    --bl-radius-xl: 32px;
    
    --bl-font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bl-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* WordPress 7.0 DataViews colors */
    --wp-dataviews-color-background: #0A061C;
    --wp-dataviews-color-border: rgba(255, 255, 255, 0.08);
}

/* --- Support WordPress 7.0 Admin Refresh prefer-color-scheme dark --- */
@media (prefers-color-scheme: dark) {
    :root {
        --admin-color: modern;
    }
}

/* View transitions */
.wp-admin {
    view-transition-name: none;
}
body {
    view-transition-name: page;
}

/* --- Theme Iteration 1: Aria (Empathetic Catalyst) --- */
.theme-aria {
    --bg-primary: #FCFBF7;
    --bg-secondary: #F6F4EE;
    --surface: rgba(255, 255, 255, 0.8);
    --surface-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(140, 117, 245, 0.15);
    --violet: #8C75F5;
    --violet-light: #8C75F5;
    --gold: #E0A96D;
    --gold-light: #E0A96D;
    --teal: #06D6A0;
    --coral: #EF476F;
    --text-primary: #1C1924;
    --text-secondary: #5D596A;
    --text-tertiary: #928E9E;

    --bl-bg: #FCFBF7;
    --bl-surface: #FFFFFF;
    --bl-surface-alt: #F6F4EE;
    --bl-text: #1C1924;
    --bl-text-secondary: #5D596A;
    --bl-text-tertiary: #928E9E;
    --bl-primary: #8C75F5;
    --bl-primary-glow: rgba(140, 117, 245, 0.15);
    --bl-accent: #E0A96D;
    --bl-border: rgba(140, 117, 245, 0.12);
    --bl-gradient-bg: linear-gradient(135deg, #FCFBF7 0%, #F5F1E8 100%);
    --bl-glass-bg: rgba(255, 255, 255, 0.75);
    --bl-glass-border: rgba(140, 117, 245, 0.1);
    --bl-shadow: 0 10px 30px -10px rgba(93, 89, 106, 0.08);
}

/* --- Theme Iteration 2: Aeron (Assertive Challenger) --- */
.theme-aeron {
    --bg-primary: #0F0A2A;
    --bg-secondary: #08041B;
    --surface: rgba(26, 21, 72, 0.45);
    --surface-hover: rgba(26, 21, 72, 0.7);
    --border-color: rgba(155, 93, 229, 0.25);
    --violet: #7B2FBE;
    --violet-light: #9B5DE5;
    --gold: #F5A623;
    --gold-light: #FFD166;
    --teal: #06D6A0;
    --coral: #EF476F;
    --text-primary: #F0EBF8;
    --text-secondary: #A89EC5;
    --text-tertiary: #6B5F8A;

    --bl-bg: #070514;
    --bl-surface: #100C26;
    --bl-surface-alt: #171233;
    --bl-text: #F4F2F7;
    --bl-text-secondary: #AAA6BC;
    --bl-text-tertiary: #757088;
    --bl-primary: #B259F8;
    --bl-primary-glow: rgba(178, 89, 248, 0.25);
    --bl-accent: #FFC043;
    --bl-border: rgba(178, 89, 248, 0.2);
    --bl-gradient-bg: linear-gradient(135deg, #070514 0%, #150F32 100%);
    --bl-glass-bg: rgba(16, 12, 38, 0.7);
    --bl-glass-border: rgba(178, 89, 248, 0.15);
    --bl-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.5);
}

/* --- Global Boilerplate --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bl-bg);
    color: var(--bl-text);
    font-family: var(--bl-font-body);
    font-size: 1rem; /* PRISM: Using rem instead of px */
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

a {
    color: var(--bl-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--bl-accent);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bl-font-display);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5em;
    letter-spacing: -0.02em;
}

/* --- Premium Layout Utility Classes --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    align-items: center;
}

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

@media (max-width: 991px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .section-padding {
        padding: 64px 0;
    }
}

/* --- Premium Cards & Interactive Components --- */
.bl-card {
    background-color: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius-md);
    padding: 32px;
    box-shadow: var(--bl-shadow);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.bl-card:hover {
    transform: translateY(-6px);
    border-color: var(--bl-primary);
    box-shadow: 0 20px 40px -15px var(--bl-primary-glow);
}

.bl-glass-card {
    background: var(--bl-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bl-glass-border);
    border-radius: var(--bl-radius-lg);
    padding: 40px;
    box-shadow: var(--bl-shadow);
}

/* --- Buttons --- */
.bl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--bl-font-display);
    font-weight: 600;
    font-size: 1rem; /* PRISM: rem typography */
    border-radius: var(--bl-radius-md);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
}

.bl-btn-primary {
    background-color: var(--bl-primary);
    color: #FFFFFF;
    box-shadow: 0 8px 24px -6px var(--bl-primary-glow);
}

.bl-btn-primary:hover {
    background-color: var(--bl-accent);
    color: #1C1924;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -4px var(--bl-primary-glow);
}

.bl-btn-secondary {
    background-color: var(--bl-surface-alt);
    color: var(--bl-text);
    border: 1px solid var(--bl-border);
}

.bl-btn-secondary:hover {
    background-color: var(--bl-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* --- Custom Responsive Navigation --- */
.bl-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(28, 25, 36, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bl-border);
    transition: background-color 0.3s ease;
}

.bl-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.bl-logo {
    font-family: var(--bl-font-display);
    font-size: 1.375rem; /* PRISM: 22px = 1.375rem */
    font-weight: 800;
    color: var(--bl-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bl-logo span {
    color: var(--bl-primary);
}

.bl-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.bl-menu a {
    font-family: var(--bl-font-display);
    font-weight: 500;
    color: var(--bl-text-secondary);
}

.bl-menu a:hover, .bl-menu .active a {
    color: var(--bl-text);
}

/* --- Theme Toggle Widget --- */
.theme-switch-container {
    display: flex;
    align-items: center;
    background-color: var(--bl-surface-alt);
    border: 1px solid var(--bl-border);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
}

.theme-switch-btn {
    border: none;
    background: none;
    font-family: var(--bl-font-display);
    font-weight: 600;
    font-size: 0.8125rem; /* PRISM: 13px = 0.8125rem */
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    color: var(--bl-text-secondary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-switch-btn.active {
    background-color: var(--bl-primary);
    color: #FFFFFF;
}

/* --- Watertight Disclaimer Banner --- */
.watertight-banner {
    background-color: var(--bl-surface-alt);
    border-top: 1px solid var(--bl-border);
    border-bottom: 1px solid var(--bl-border);
    padding: 16px 0;
    text-align: center;
    font-family: var(--bl-font-display);
    font-size: 0.875rem; /* PRISM: 14px = 0.875rem */
    color: var(--bl-text-secondary);
    font-weight: 500;
}

.watertight-banner span {
    color: var(--bl-primary);
    font-weight: 700;
}

/* --- Footer --- */
.bl-footer {
    background-color: var(--bl-surface-alt);
    border-top: 1px solid var(--bl-border);
    padding: 64px 0 32px 0;
}

.footer-disclaimer {
    font-size: 0.8125rem; /* PRISM: 13px = 0.8125rem */
    color: var(--bl-text-tertiary);
    line-height: 1.8;
    margin-top: 24px;
    border-top: 1px solid var(--bl-border);
    padding-top: 24px;
}

/* ==========================================================================
   STUNNING GLASSMORPHIC ACQUISITION STYLES (VERCEL DESIGNS)
   ========================================================================== */

/* --- Fixed Vercel-Style Premium Navigation Bar --- */
.vp-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 0;
    background: rgba(15, 10, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.vp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.vp-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vp-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.vp-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(123, 47, 190, 0.5);
}

.vp-logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.vp-social-links {
    display: flex;
    gap: 1rem;
}

.vp-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(26, 21, 72, 0.4);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.vp-social-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--text-secondary);
    transition: var(--transition-smooth);
}

.vp-social-icon:hover {
    background: var(--violet);
    border-color: var(--violet-light);
    transform: translateY(-2px);
}

.vp-social-icon:hover svg {
    fill: #ffffff;
}

/* --- Hero Section --- */
.hero {
  padding: 10rem 5% 6rem;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-tag {
  align-self: center;
  background: rgba(123, 47, 190, 0.2);
  border: 1px solid var(--violet-light);
  color: var(--violet-light);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  color: white;
}

.hero-title span {
  background: linear-gradient(135deg, var(--violet-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 700px;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-showcase {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-container {
  width: 280px;
  height: 560px;
  background: #08041B;
  border: 8px solid rgba(155, 93, 229, 0.3);
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(123, 47, 190, 0.5);
  overflow: hidden;
  position: relative;
  animation: floatPhone 6s ease-in-out infinite;
}

.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* --- Section Formatting --- */
.section {
  padding: 6rem 0;
}

.section-hdr {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Grids --- */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

/* --- Premium Vercel style buttons --- */
.btn-cta {
  background: linear-gradient(135deg, var(--violet), var(--violet-light));
  color: white !important;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 99px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(123, 47, 190, 0.4);
  transition: var(--transition-smooth);
  display: inline-block;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123, 47, 190, 0.6);
}

.btn-secondary {
  background: rgba(26, 21, 72, 0.4);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.75rem 1.8rem;
  border-radius: 99px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(26, 21, 72, 0.7);
  border-color: var(--violet-light);
}

/* --- Cards --- */
.card {
  flex: 1 1 320px;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-8px);
  background: var(--surface-hover);
  border-color: var(--violet-light);
  box-shadow: 0 12px 30px rgba(123, 47, 190, 0.25);
}

.card-icon {
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(123, 47, 190, 0.25);
  border: 1px solid rgba(155, 93, 229, 0.4);
  color: var(--violet-light);
}

.card-title {
  font-size: 1.5rem;
  color: white;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- Step Flow ("How to Use") --- */
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--violet-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.75;
}

.step-title {
  font-size: 1.25rem;
  color: white;
}

/* --- Screenshot Showcase Carousel --- */
.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border-color);
  background: rgba(8, 4, 27, 0.5);
  padding: 3rem 1rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 2rem;
}

.carousel-slide {
  min-width: calc(33.333% - 1.33rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.carousel-slide img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(155, 93, 229, 0.2);
  transition: var(--transition-smooth);
}

.carousel-slide.active img {
  border-color: var(--violet-light);
  box-shadow: 0 15px 35px rgba(123, 47, 190, 0.35);
}

.carousel-caption {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.carousel-btn {
  background: rgba(26, 21, 72, 0.6);
  border: 1px solid var(--border-color);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.carousel-btn:hover {
  background: var(--violet);
  border-color: var(--violet-light);
}

/* --- FAQ Section --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-q {
  padding: 1.5rem 2rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--violet-light);
  transition: var(--transition-smooth);
}

.faq-item.active .faq-q::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  padding: 0 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.faq-item.active .faq-a {
  max-height: 200px;
  padding: 0 2rem 1.5rem;
}

/* --- Interactive Quiz Styles --- */
.quiz-step {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-option {
    border: 1px solid var(--border-color);
    background: rgba(8,4,27,0.4);
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background: rgba(123, 47, 190, 0.15) !important;
    border-color: var(--violet-light) !important;
    transform: translateY(-2px);
}

.quiz-option input[type="radio"]:checked + span {
    color: #ffffff !important;
    font-weight: 600;
}

/* --- EEAT Trust Footer --- */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 5rem 5% 3rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr repeat(2, 0.9fr);
  gap: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-tagline {
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-hdr {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--violet-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(155, 93, 229, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.icf-citation {
  max-width: 600px;
  line-height: 1.5;
}

/* --- Responsive Adaptations --- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 8rem;
    gap: 3rem;
  }
  
  .hero-tag {
    align-self: center;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .carousel-slide {
    min-width: calc(50% - 1rem);
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .carousel-slide {
    min-width: 100%;
  }
}
