/* ================================================================
   Edward Flynn — Shared Design System  v1.0
   Design: Aceternity UI Aesthetic · Green Palette
   Font: Inter · System UI
   ================================================================ */

/* ========== RESET & BASE ========== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:'Inter',system-ui,-apple-system,sans-serif;line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden}
a{text-decoration:none;color:inherit}
ul,ol{list-style:none}
img{max-width:100%;display:block}
button{border:none;background:none;cursor:pointer;font-family:inherit}
input,select,textarea{font-family:inherit}

/* ========== DARK THEME (default) ========== */
.dark{
  --bg:#09090b;--bg-alt:#18181b;--bg-card:#111113;
  --border:#27272a;--border-hover:rgba(191,90,242,0.4);
  --text:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;
  --green:#1db954;--green-light:#81c784;--green-dark:#4caf50;--green-deep:#2e7d32;
  --green-tint:rgba(191,90,242,0.1);--green-tint-border:rgba(191,90,242,0.2);
  --nav-bg:rgba(9,9,11,0.85);
  --shadow:0 4px 24px rgba(0,0,0,0.3);
}

/* ========== LIGHT THEME ========== */
.light{
  --bg:#ffffff;--bg-alt:#f9fafb;--bg-card:#ffffff;
  --border:#e4e4e7;--border-hover:rgba(76,175,80,0.5);
  --text:#09090b;--text-secondary:#52525b;--text-muted:#a1a1aa;
  --green:#4caf50;--green-light:#1db954;--green-dark:#388e3c;--green-deep:#2e7d32;
  --green-tint:rgba(76,175,80,0.08);--green-tint-border:rgba(76,175,80,0.2);
  --nav-bg:rgba(255,255,255,0.85);
  --shadow:0 4px 24px rgba(0,0,0,0.08);
}

body{background:var(--bg);color:var(--text);transition:background .3s,color .3s}

/* ========== UTILITIES ========== */
.container{max-width:1200px;margin:0 auto;padding:0 24px}
.section-label{font-size:11px;text-transform:uppercase;letter-spacing:0.15em;color:var(--green);margin-bottom:12px;font-weight:600}
.green-text{background:linear-gradient(to right,#1db954,#4caf50);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.green-italic{font-style:italic;background:linear-gradient(to right,#1db954,#4caf50);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.fade-in{opacity:0;transform:translateY(24px);transition:opacity .6s ease,transform .6s ease}
.fade-in.visible{opacity:1;transform:translateY(0)}
.dot-grid{background-image:radial-gradient(circle,rgba(255,255,255,0.06) 1px,transparent 1px);background-size:24px 24px}
.light .dot-grid{background-image:radial-gradient(circle,rgba(0,0,0,0.04) 1px,transparent 1px)}
.section-heading{font-size:clamp(2rem,4vw,3rem);font-weight:700;letter-spacing:-0.02em;margin-bottom:48px}
.page-section{padding:100px 0}
.page-section-alt{padding:100px 0;background:var(--bg-alt)}

/* ========== PILL / BADGE / TAG ========== */
.pill{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:9999px;font-size:12px;font-weight:500;background:var(--green-tint);color:var(--green);border:1px solid var(--green-tint-border)}
.pill-sm{padding:4px 10px;font-size:11px}
.tag{display:inline-block;padding:4px 10px;border-radius:9999px;font-size:11px;font-weight:500;background:var(--green-tint);color:var(--green);border:1px solid var(--green-tint-border)}

/* ========== BUTTONS ========== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 24px;border-radius:10px;font-size:14px;font-weight:600;transition:all .25s ease;cursor:pointer}
.btn-primary{background:linear-gradient(135deg,#1db954,#4caf50);color:#fff;position:relative;overflow:hidden}
.btn-primary::before{content:'';position:absolute;inset:-2px;border-radius:12px;background:linear-gradient(90deg,#1db954,#4caf50,#81c784,#1db954);background-size:300% 100%;z-index:-1;animation:gradientBorder 3s linear infinite;opacity:0;transition:opacity .3s}
.btn-primary:hover::before{opacity:1}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(191,90,242,0.3)}
.btn-outline{border:1px solid var(--border);color:var(--text);background:transparent}
.btn-outline:hover{border-color:var(--green);color:var(--green)}
.btn-sm{padding:8px 16px;font-size:13px}
@keyframes gradientBorder{0%{background-position:0% 50%}100%{background-position:300% 50%}}

/* ========== CARD ========== */
.card{background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:32px;transition:border-color .3s,box-shadow .3s}
.card:hover{border-color:var(--border-hover);box-shadow:0 0 24px rgba(191,90,242,0.06)}

/* ========== NAV ========== */
.nav{position:fixed;top:0;left:0;right:0;z-index:1000;background:var(--nav-bg);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid var(--border);transition:background .3s}
.nav-inner{max-width:1200px;margin:0 auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between;height:64px}
.nav-logo{display:flex;align-items:center;gap:10px;font-weight:600;font-size:15px}
.nav-logo-mark{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#1db954,#4caf50);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:14px}
.nav-links{display:flex;align-items:center;gap:24px}
.nav-links a,.nav-links .mega-trigger a{font-size:13px;color:var(--text-secondary);transition:color .2s;font-weight:500;white-space:nowrap}
.nav-links a:hover,.nav-links a.active{color:var(--green)}
.nav-actions{display:flex;align-items:center;gap:12px}
.theme-toggle{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--text-secondary);transition:color .2s,background .2s;border:1px solid var(--border)}
.theme-toggle:hover{color:var(--green);background:var(--green-tint)}
.hamburger{display:none;flex-direction:column;gap:5px;width:24px;cursor:pointer}
.hamburger span{height:2px;background:var(--text);border-radius:2px;transition:all .3s}
.mobile-menu{display:none;position:fixed;top:64px;left:0;right:0;bottom:0;background:var(--bg);z-index:999;padding:24px;flex-direction:column;gap:4px;overflow-y:auto}
.mobile-menu.open{display:flex}
.mobile-menu a{padding:14px 0;font-size:16px;color:var(--text-secondary);border-bottom:1px solid var(--border)}
.mobile-menu a:hover{color:var(--green)}
@media(max-width:1024px){
  .nav-links{display:none}
  .hamburger{display:flex}
  .nav-actions .btn{display:none}
}

/* ========== MEGA NAV DROPDOWN ========== */
.mega-trigger{cursor:pointer;position:relative!important}
.mega-trigger::after{content:'';position:absolute;left:-24px;right:-24px;top:100%;height:24px;z-index:999}
.mega-panel{display:none;position:fixed;top:64px;left:0;right:0;background:var(--bg-card);border-bottom:1px solid var(--border);padding:32px 0;z-index:998;box-shadow:0 8px 32px rgba(0,0,0,0.3);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.light .mega-panel{box-shadow:0 8px 32px rgba(0,0,0,0.08)}
.mega-trigger:hover .mega-panel,.mega-trigger:focus-within .mega-panel,.mega-trigger.mega-open .mega-panel{display:block}
.mega-inner{max-width:1200px;margin:0 auto;padding:0 24px;display:grid;grid-template-columns:1fr 1fr 1fr;gap:40px}
.mega-col h4{font-size:10px;text-transform:uppercase;letter-spacing:0.14em;color:var(--green);font-weight:600;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid var(--border)}
.mega-link{display:flex;align-items:start;gap:12px;padding:8px 0;transition:all .2s;text-decoration:none;color:inherit;border-radius:8px}
.mega-link:hover{color:var(--green);background:var(--green-tint);padding-left:8px;padding-right:8px;margin-left:-8px;margin-right:-8px}
.mega-link:hover .mega-icon{border-color:var(--green);color:var(--green);background:var(--green-tint)}
.mega-icon{width:32px;height:32px;border-radius:8px;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--text-muted);font-size:14px;transition:all .2s;background:var(--bg)}
.mega-link-text h5{font-size:13px;font-weight:600;margin:0 0 2px}
.mega-link-text p{font-size:11px;color:var(--text-muted);margin:0;line-height:1.4}
@media(max-width:1024px){.mega-panel{display:none!important}}

/* ========== HERO ========== */
.hero{padding:140px 0 60px;text-align:center;position:relative}
.hero-badge{display:inline-flex;align-items:center;gap:8px;padding:8px 18px;border-radius:9999px;font-size:13px;font-weight:500;background:var(--green-tint);color:var(--green);border:1px solid var(--green-tint-border);margin-bottom:32px}
.hero-badge-dot{width:8px;height:8px;background:#1db954;border-radius:50%;animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
.hero h1{font-size:clamp(3rem,7vw,5.5rem);font-weight:700;letter-spacing:-0.03em;line-height:1.05;margin-bottom:24px}
.hero-subtitle{max-width:680px;margin:0 auto 20px;font-size:17px;color:var(--text-secondary);line-height:1.7}
.hero-tagline{font-size:13px;text-transform:uppercase;letter-spacing:0.15em;color:var(--green);font-weight:600;margin-bottom:32px}

/* ========== PAGE HERO (smaller, for subpages) ========== */
.page-hero{padding:120px 0 48px;text-align:center;position:relative}
.page-hero h1{font-size:clamp(2.5rem,5vw,4rem);font-weight:700;letter-spacing:-0.02em;line-height:1.1;margin-bottom:16px}
.page-hero p{max-width:640px;margin:0 auto;font-size:16px;color:var(--text-secondary);line-height:1.7}

/* ========== GRIDS ========== */
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media(max-width:768px){
  .grid-3,.grid-2{grid-template-columns:1fr}
  .grid-4{grid-template-columns:repeat(2,1fr)}
}
@media(min-width:769px) and (max-width:1024px){
  .grid-3{grid-template-columns:repeat(2,1fr)}
}

/* ========== SPEC CARDS ========== */
.spec-card .spec-num{font-size:12px;color:var(--green);font-weight:600;margin-bottom:12px}
.spec-card h3{font-size:18px;font-weight:600;margin-bottom:10px}
.spec-card p{font-size:14px;color:var(--text-secondary);line-height:1.7;margin-bottom:16px}
.spec-card .learn-more{font-size:13px;color:var(--green);font-weight:500;transition:gap .2s;display:inline-flex;align-items:center;gap:4px}
.spec-card .learn-more:hover{gap:8px}

/* ========== PRODUCT CARDS ========== */
.product-card .product-img{height:160px;border-radius:12px;background:linear-gradient(135deg,rgba(191,90,242,0.15),rgba(76,175,80,0.05));margin-bottom:16px;display:flex;align-items:center;justify-content:center}
.product-card .product-tag{margin-bottom:12px}
.product-card h3{font-size:16px;font-weight:600;margin-bottom:8px}
.product-card p{font-size:13px;color:var(--text-secondary);line-height:1.6;margin-bottom:12px}
.product-card .product-price{font-size:20px;font-weight:700;color:var(--green)}

/* ========== PRICING ========== */
.pricing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:48px}
.pricing-card{position:relative;display:flex;flex-direction:column}
.pricing-card.popular{border-color:var(--green);box-shadow:0 0 32px rgba(191,90,242,0.1)}
.pricing-badge{position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:linear-gradient(135deg,#1db954,#4caf50);color:#fff;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;padding:4px 16px;border-radius:9999px;white-space:nowrap}
.pricing-name{font-size:20px;font-weight:700;margin-bottom:4px}
.pricing-price{font-size:40px;font-weight:700;color:var(--green);margin-bottom:4px}
.pricing-note{font-size:13px;color:var(--text-muted);margin-bottom:20px}
.pricing-desc{font-size:13px;color:var(--text-secondary);margin-bottom:20px;line-height:1.6}
.pricing-features{flex:1;margin-bottom:24px}
.pricing-features li{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-secondary);margin-bottom:10px}
.pricing-features li.disabled{opacity:.4}
.pricing-guarantee{font-size:12px;color:var(--text-muted);margin-bottom:16px;font-style:italic}
@media(max-width:768px){.pricing-grid{grid-template-columns:1fr}}

/* ========== COURSE MODULE LIST ========== */
.module-list{background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:32px}
.module-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--border)}
.module-item:last-child{border-bottom:none}
.module-num{font-size:12px;color:var(--green);font-weight:600;margin-right:12px;min-width:24px}
.module-title{flex:1;font-size:14px;font-weight:500}
.module-duration{font-size:12px;color:var(--text-muted);white-space:nowrap}

/* ========== MEMBERSHIP ========== */
.membership-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.membership-card{text-align:center;padding:24px 16px}
.membership-card .mc-icon{width:40px;height:40px;border-radius:10px;background:var(--green-tint);display:flex;align-items:center;justify-content:center;margin:0 auto 12px;color:var(--green)}
.membership-card h4{font-size:14px;font-weight:600;margin-bottom:4px}
.membership-card p{font-size:12px;color:var(--text-muted)}
@media(max-width:768px){.membership-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.membership-grid{grid-template-columns:1fr}}

/* ========== NEWSLETTER FORM ========== */
.newsletter-form{max-width:480px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.newsletter-form input,.newsletter-form select,.newsletter-form textarea{width:100%;padding:12px 16px;border-radius:10px;border:1px solid var(--border);background:var(--bg-card);color:var(--text);font-size:14px;transition:border-color .2s}
.newsletter-form input:focus,.newsletter-form select:focus,.newsletter-form textarea:focus{outline:none;border-color:var(--green)}
.newsletter-form .form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.newsletter-privacy{font-size:12px;color:var(--text-muted);margin-top:8px}
@media(max-width:480px){.newsletter-form .form-row{grid-template-columns:1fr}}

/* ========== ABOUT / AUTHOR BIO ========== */
.about-section{padding:100px 0;background:var(--bg-alt)}
.about-inner{display:grid;grid-template-columns:300px 1fr;gap:48px;align-items:start}
.about-photo{width:200px;height:200px;border-radius:20px;object-fit:cover;object-position:center top;border:3px solid var(--green);margin-bottom:16px}
.about-name{font-size:24px;font-weight:700;margin-bottom:4px}
.about-creds{font-size:14px;color:var(--text-muted);margin-bottom:16px}
.about-right blockquote{font-size:17px;line-height:1.8;color:var(--text-secondary);border-left:3px solid var(--green);padding-left:20px;margin-bottom:32px;font-style:italic}
.about-right p{font-size:15px;color:var(--text-secondary);line-height:1.7;margin-bottom:16px}
.about-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
@media(max-width:768px){.about-inner{grid-template-columns:1fr}}

/* ========== AUTHOR BIO CARD (inline on pages) ========== */
.author-bio{display:flex;gap:24px;align-items:start;padding:32px;background:var(--bg-card);border:1px solid var(--border);border-radius:16px}
.author-bio img{width:100px;height:100px;border-radius:16px;object-fit:cover;object-position:center top;border:2px solid var(--green);flex-shrink:0}
.author-bio h4{font-size:18px;font-weight:700;margin-bottom:2px}
.author-bio .author-creds{font-size:12px;color:var(--green);margin-bottom:8px}
.author-bio p{font-size:14px;color:var(--text-secondary);line-height:1.6;margin-bottom:12px}
.author-bio .author-links{display:flex;gap:16px}
.author-bio .author-links a{font-size:13px;color:var(--text-muted);transition:color .2s}
.author-bio .author-links a:hover{color:var(--green)}
@media(max-width:480px){.author-bio{flex-direction:column}}

/* ========== BLOG CARDS ========== */
.blog-card{padding:24px}
.blog-card .blog-meta{font-size:12px;color:var(--text-muted);margin-bottom:8px;display:flex;gap:12px}
.blog-card h3{font-size:17px;font-weight:600;margin-bottom:8px;transition:color .2s}
.blog-card:hover h3{color:var(--green)}
.blog-card p{font-size:14px;color:var(--text-secondary);line-height:1.6}

/* ========== ARTICLE BODY ========== */
.article-body{max-width:720px;margin:0 auto}
.article-body h2{font-size:24px;font-weight:700;margin:48px 0 16px;letter-spacing:-0.02em}
.article-body h3{font-size:20px;font-weight:600;margin:36px 0 12px}
.article-body p{font-size:16px;line-height:1.8;color:var(--text-secondary);margin-bottom:20px}
.article-body ul,.article-body ol{padding-left:20px;margin-bottom:20px}
.article-body li{font-size:15px;line-height:1.7;color:var(--text-secondary);margin-bottom:8px}
.article-body blockquote{border-left:3px solid var(--green);padding-left:20px;margin:32px 0;font-style:italic;color:var(--text-secondary);font-size:17px;line-height:1.8}

/* ========== READING PROGRESS ========== */
.reading-progress{position:fixed;top:0;left:0;height:3px;background:linear-gradient(to right,#1db954,#4caf50);z-index:2000;transition:width 150ms}

/* ========== CHAPTER LIST (Book page) ========== */
.chapter-item{display:flex;align-items:start;gap:16px;padding:24px;border-bottom:1px solid var(--border)}
.chapter-item:last-child{border-bottom:none}
.chapter-num{font-size:13px;color:var(--green);font-weight:700;min-width:60px;flex-shrink:0}
.chapter-title{font-size:16px;font-weight:600;margin-bottom:4px}
.chapter-desc{font-size:14px;color:var(--text-secondary);line-height:1.6}

/* ========== CONTACT FORM ========== */
.contact-form{display:flex;flex-direction:column;gap:16px}
.contact-form input,.contact-form select,.contact-form textarea{width:100%;padding:14px 16px;border-radius:12px;border:1px solid var(--border);background:var(--bg-card);color:var(--text);font-size:14px;transition:border-color .2s}
.contact-form input:focus,.contact-form select:focus,.contact-form textarea:focus{outline:none;border-color:var(--green)}
.contact-form textarea{resize:vertical;min-height:120px}
.contact-form .form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:480px){.contact-form .form-row{grid-template-columns:1fr}}

/* ========== EMERGENCY BANNER ========== */
.emergency-banner{padding:12px 24px;text-align:center;font-size:13px;font-weight:500;border-bottom:1px solid var(--border)}
.dark .emergency-banner{background:rgba(239,68,68,0.08);color:#f87171}
.light .emergency-banner{background:#fef2f2;color:#dc2626}

/* ========== FOOTER ========== */
.footer{padding:60px 0 32px;border-top:1px solid var(--border)}
.footer-top{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;gap:32px;margin-bottom:48px}
.footer-brand .footer-logo{display:flex;align-items:center;gap:10px;font-weight:600;font-size:15px;margin-bottom:8px}
.footer-brand .footer-tagline{font-size:13px;color:var(--text-muted);line-height:1.6}
.footer-col h5{font-size:12px;text-transform:uppercase;letter-spacing:0.1em;color:var(--text-muted);margin-bottom:14px;font-weight:600}
.footer-col a{display:block;font-size:12px;color:var(--text-secondary);padding:3px 0;transition:color .2s}
.footer-col a:hover{color:var(--green)}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:24px;border-top:1px solid var(--border);font-size:12px;color:var(--text-muted);flex-wrap:wrap;gap:8px}
.footer-status{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.footer-status .status-dot{width:6px;height:6px;background:#1db954;border-radius:50%}
.footer-status a{color:var(--green)}
@media(max-width:768px){
  .footer-top{grid-template-columns:1fr 1fr;gap:24px}
  .footer-bottom{flex-direction:column;gap:12px;text-align:center}
}
@media(max-width:480px){
  .footer-top{grid-template-columns:1fr}
}
