/*
Theme Name: The Cosmic Root
Theme URI: https://thecosmicrootresearch.com
Author: The Cosmic Root Research
Description: Custom theme for The Cosmic Root Research – earthy, sci-fi design with WooCommerce support.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Private
Text Domain: cosmic-root
Tags: woocommerce, custom
*/

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep:  #0c1209; --bg-card:  #121a0f; --bg-card2: #172012;
  --accent:   #c07a2e; --accent2:  #7a9a6e; --gold:     #d9924a;
  --white:    #ede5cf; --muted:    #728464;
  --border:   rgba(160,190,110,0.15); --glow: 0 0 40px rgba(192,122,46,0.18);
  --sage:     #99b889;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--white);
  font-family: 'Exo 2', sans-serif;
  overflow-x: hidden;
  margin: 0;
}

/* STARFIELD */
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.45; }

/* NAV */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 70px;
  background: rgba(12,18,9,0.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { width: 38px; height: 38px; object-fit: contain; filter: invert(1) sepia(0.2) saturate(0.6) brightness(1.0); }
.nav-logo-text { font-family: 'Orbitron', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--white); line-height: 1.2; }
.nav-logo-text span { display: block; font-size: 10px; font-weight: 400; color: var(--sage); letter-spacing: 0.2em; text-transform: uppercase; }

.nav-links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a { font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.25s; }
.nav-links a:hover, .nav-links .current-menu-item > a, .nav-links .current_page_item > a { color: var(--accent); }

.nav-cta { display: flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 4px; font-family: 'Exo 2', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: all 0.25s; border: none; }
.btn-outline { border: 1px solid var(--border); background: transparent; color: var(--white); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0c1209; box-shadow: 0 4px 20px rgba(192,122,46,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(192,122,46,0.45); }
.btn-gold { background: linear-gradient(135deg, var(--accent), var(--gold)); color: #0c1209; font-weight: 700; box-shadow: 0 4px 20px rgba(192,122,46,0.3); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(217,146,74,0.5); }
.btn-lg { padding: 16px 40px; font-size: 15px; }

.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; }

/* SITE WRAPPER */
.site-content { position: relative; z-index: 1; padding-top: 70px; }

/* PAGE HERO */
.page-hero { position: relative; z-index: 1; min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 48px 72px; border-bottom: 1px solid var(--border); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; border-radius: 100px; border: 1px solid var(--border); background: rgba(192,122,46,0.08); font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 28px; animation: fadeUp 0.8s ease both; }
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
.page-title { font-family: 'Orbitron', sans-serif; font-size: clamp(32px,5vw,64px); font-weight: 900; line-height: 1.05; max-width: 820px; animation: fadeUp 0.9s ease 0.1s both; }
.page-title .accent { color: var(--accent); }
.page-title .sage   { color: var(--sage); }
.page-title .gold   { color: var(--gold); }
.page-sub { margin-top: 20px; font-size: clamp(15px,1.8vw,18px); font-weight: 300; color: var(--muted); max-width: 580px; line-height: 1.7; animation: fadeUp 1s ease 0.2s both; }
.hero-divider { width: 100%; max-width: 600px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), var(--sage), transparent); margin: 48px auto 0; opacity: 0.35; }

/* SHARED */
.section-tag { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 10px; }
.section-title { font-family: 'Orbitron', sans-serif; font-size: clamp(22px,3.2vw,40px); font-weight: 700; line-height: 1.2; color: var(--white); }
.section-body { font-size: 15px; font-weight: 300; color: var(--muted); line-height: 1.85; max-width: 560px; }

/* TRUST BAR */
.trust-bar { position: relative; z-index: 1; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 24px 48px; display: flex; align-items: center; justify-content: center; gap: 56px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-icon { width: 34px; height: 34px; border-radius: 7px; background: rgba(192,122,46,0.1); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.trust-text strong { display: block; font-size: 12px; font-weight: 600; color: var(--white); }
.trust-text span { font-size: 11px; color: var(--muted); }

/* CARDS & GRIDS */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 36px 28px; text-align: center; transition: transform 0.25s, box-shadow 0.25s; }
.why-card:hover { transform: translateY(-4px); box-shadow: 0 16px 50px rgba(192,122,46,0.1); }
.why-icon { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, rgba(122,154,110,0.2), rgba(192,122,46,0.2)); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 20px; }
.why-card h3 { font-family: 'Orbitron', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.why-card p { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* PRODUCT CARDS */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; text-decoration: none; color: inherit; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.product-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity 0.3s; }
.product-card:hover { transform: translateY(-5px); border-color: rgba(192,122,46,0.4); box-shadow: 0 20px 60px rgba(192,122,46,0.1); }
.product-card:hover::before { opacity: 1; }
.product-tag { display: inline-block; padding: 4px 10px; border-radius: 4px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.tag-amber { background: rgba(192,122,46,0.12); color: var(--accent); }
.tag-sage  { background: rgba(122,154,110,0.12); color: var(--sage); }
.tag-gold  { background: rgba(217,146,74,0.12); color: var(--gold); }
.product-name { font-family: 'Orbitron', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--white); }
.product-desc { font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; margin-bottom: 20px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--border); }
.product-price { font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 900; color: var(--gold); }
.product-purity { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); }
.product-arrow { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: background 0.2s; }
.product-card:hover .product-arrow { background: var(--accent); border-color: var(--accent); }

/* FEATURE GRID */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; transition: border-color 0.25s; }
.feature-item:hover { border-color: rgba(192,122,46,0.4); }
.feature-item .icon { font-size: 20px; margin-bottom: 8px; }
.feature-item strong { display: block; font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.feature-item p { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* CTA BAND */
.cta-band { position: relative; z-index: 1; margin: 80px 48px; border-radius: 20px; background: linear-gradient(135deg, rgba(122,154,110,0.15), rgba(192,122,46,0.1)); border: 1px solid rgba(192,122,46,0.25); padding: 72px 64px; text-align: center; box-shadow: inset 0 0 80px rgba(122,154,110,0.07); }
.cta-band .section-title { margin-bottom: 14px; }
.cta-band .section-body { margin: 0 auto 36px; max-width: 460px; }

/* DISCLAIMER */
.disclaimer { background: var(--bg-card2); border: 1px solid var(--border); padding: 28px 32px; display: flex; gap: 14px; max-width: 1100px; margin: 0 auto 80px; border-radius: 12px; }
.disclaimer p { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ABOUT MISSION */
.about { max-width: 1200px; margin: 0 auto; padding: 100px 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; box-shadow: var(--glow); }
.logo-art { width: 100%; aspect-ratio: 1; border-radius: 12px; background: radial-gradient(ellipse at 30% 40%, rgba(122,154,110,0.18) 0%, transparent 60%), radial-gradient(ellipse at 70% 70%, rgba(192,122,46,0.1) 0%, transparent 50%), var(--bg-card2); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.logo-art img { width: 62%; filter: invert(1) sepia(0.25) saturate(0.6) hue-rotate(55deg) brightness(0.88); opacity: 0.88; }
.float-badge { position: absolute; bottom: -16px; right: -16px; background: var(--bg-card2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; box-shadow: var(--glow); }
.float-badge .num { font-family: 'Orbitron', sans-serif; font-size: 26px; font-weight: 900; color: var(--accent); }
.float-badge .lbl { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }
.about-content { display: flex; flex-direction: column; gap: 24px; }
.about-content .section-body { max-width: 100%; }

/* STATS ROW */
.stats-row { position: relative; z-index: 1; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-card); padding: 56px 48px; display: flex; align-items: center; justify-content: center; gap: 80px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-number { font-family: 'Orbitron', sans-serif; font-size: 40px; font-weight: 900; color: var(--white); line-height: 1; }
.stat-number span { color: var(--accent); }
.stat-label { margin-top: 8px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; }

/* PROCESS STEPS */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.process-step { padding: 36px 28px; border-right: 1px solid var(--border); background: var(--bg-deep); transition: background 0.25s; }
.process-step:last-child { border-right: none; }
.process-step:hover { background: var(--bg-card2); }
.ps-num { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--accent); letter-spacing: 0.16em; margin-bottom: 14px; }
.ps-icon { font-size: 26px; margin-bottom: 12px; }
.ps-title { font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.ps-body { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ARTICLE CARDS */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; position: relative; overflow: hidden; }
.article-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity 0.3s; }
.article-card:hover { transform: translateY(-4px); border-color: rgba(192,122,46,0.4); box-shadow: 0 20px 60px rgba(192,122,46,0.08); }
.article-card:hover::before { opacity: 1; }
.article-tag { display: inline-block; padding: 4px 10px; border-radius: 4px; font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.ac-date { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted); }
.ac-divider { height: 1px; background: var(--border); margin: 14px 0; }
.ac-title { font-family: 'Orbitron', sans-serif; font-size: 15px; font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 12px; }
.ac-body { font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; margin-bottom: 20px; }
.ac-read { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent); display: flex; align-items: center; gap: 6px; font-weight: 500; transition: gap 0.2s; }
.article-card:hover .ac-read { gap: 10px; }

/* CONTACT FORM */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 72px; align-items: start; max-width: 1150px; margin: 0 auto; padding: 88px 48px; }
.contact-form-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 44px; box-shadow: var(--glow); }
.form-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.form-header h3 { font-family: 'Orbitron', sans-serif; font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.form-header p { font-size: 14px; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
input[type=text], input[type=email], textarea, select { width: 100%; padding: 13px 16px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-card2); color: var(--white); font-family: 'Exo 2', sans-serif; font-size: 14px; outline: none; transition: border-color 0.2s; resize: vertical; appearance: none; }
input[type=text]:focus, input[type=email]:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(192,122,46,0.08); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 130px; }
select option { background: var(--bg-card2); }
.form-check { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 28px; padding: 16px; background: rgba(192,122,46,0.05); border: 1px solid rgba(192,122,46,0.15); border-radius: 6px; }
.form-check input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--accent); margin-top: 2px; }
.form-check label { font-size: 12px; color: var(--muted); letter-spacing: 0; text-transform: none; font-family: 'Exo 2', sans-serif; font-weight: 300; line-height: 1.6; }
.btn-submit { width: 100%; padding: 16px; border-radius: 4px; font-family: 'Exo 2', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--gold)); color: #0c1209; border: none; transition: all 0.25s; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(217,146,74,0.5); }

/* INFO CARDS */
.info-cards { display: flex; flex-direction: column; gap: 14px; }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; display: flex; align-items: center; gap: 16px; transition: border-color 0.25s; }
.info-card:hover { border-color: rgba(192,122,46,0.4); }
.ic-icon { width: 42px; height: 42px; border-radius: 8px; background: rgba(192,122,46,0.1); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ic-text strong { display: block; font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.ic-text span, .ic-text a { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--muted); text-decoration: none; }
.ic-text a { color: var(--accent); }
.ic-text a:hover { text-decoration: underline; }

/* WOOCOMMERCE OVERRIDES */
.woocommerce-page .site-content { background: var(--bg-deep); }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.woocommerce ul.products li.product a.woocommerce-loop-product__link { text-decoration: none; color: var(--white); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 700; color: var(--white); }
.woocommerce ul.products li.product .price { font-family: 'Orbitron', sans-serif; color: var(--gold); font-size: 20px; font-weight: 900; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0c1209; font-family: 'Exo 2', sans-serif; font-weight: 600; border: none; border-radius: 4px; }
.woocommerce a.button:hover, .woocommerce button.button:hover { background: linear-gradient(135deg, var(--accent), var(--gold)); color: #0c1209; }
.woocommerce-cart table.cart, .woocommerce-checkout form.checkout { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 32px; color: var(--white); }
.woocommerce table.shop_table th { color: var(--sage); font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; border-color: var(--border); }
.woocommerce table.shop_table td { border-color: var(--border); color: var(--white); }
.woocommerce-cart .cart-collaterals .cart_totals, .woocommerce-checkout #order_review { background: var(--bg-card2); border: 1px solid var(--border); border-radius: 10px; padding: 24px; color: var(--white); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea { background: var(--bg-card2); border: 1px solid var(--border); color: var(--white); border-radius: 4px; }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: var(--accent); }
.woocommerce .woocommerce-error, .woocommerce .woocommerce-info, .woocommerce .woocommerce-message { border-top-color: var(--accent); background: var(--bg-card); color: var(--white); }

/* FOOTER */
footer.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 64px 48px 32px; position: relative; z-index: 1; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.footer-brand p { font-size: 14px; color: var(--muted); line-height: 1.7; margin-top: 16px; max-width: 280px; }
.footer-col h4 { font-family: 'Orbitron', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--white); margin-bottom: 20px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.footer-col ul a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); flex-wrap: wrap; gap: 12px; }
.footer-tag { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.16em; }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 900px) {
  nav.site-nav { padding: 0 24px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: block; }
  .about { grid-template-columns: 1fr; padding: 60px 24px; }
  .product-grid, .why-grid, .articles-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid var(--border); }
  .contact-grid { grid-template-columns: 1fr; padding: 60px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { gap: 40px; padding: 40px 24px; }
  .cta-band { margin: 60px 24px; padding: 48px 24px; }
  .trust-bar { padding: 20px 24px; gap: 24px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  footer.site-footer { padding: 48px 24px 24px; }
  .page-hero { padding: 60px 24px 56px; }
  .disclaimer { margin: 0 24px 60px; }
}
