/* ══════════════════════════════════════════════════════════
   GOLDEN CHAMPAKA v2.1 — SHARED / GLOBAL STYLES
   Phase 5.2: CSS Code Splitting
   Loaded on all pages (footer, accessibility, hero enhancements,
   calculator, pledge, ritual, gifting tiers, back-to-top, responsive, RTL)
══════════════════════════════════════════════════════════ */

/* ════════ FOOTER ════════ */
#site-footer { background: var(--footer-bg); padding-top: 80px; padding-bottom: 40px; border-top: 1px solid rgba(236,192,105,0.08); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { font-size: 0.9rem; color: var(--text); opacity: 0.8; }
.footer-links a:hover { color: var(--secondary); opacity: 1; }

/* ════════ ACCESSIBILITY ════════ */
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; }
.skip-link:focus { background-color: var(--secondary); color: var(--surface); clip: auto !important; height: auto; width: auto; padding: 1rem; z-index: 100000; }

/* ════════ HOMEPAGE HERO ENHANCEMENTS ════════ */
.pulse-dot {
    display: inline-block; width: 8px; height: 8px;
    background: #ef4444; border-radius: 50%;
    animation: pulse-glow 1.5s ease-in-out infinite; margin-right: 0.5rem; vertical-align: middle;
}
@keyframes pulse-glow { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,0.5); } 50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(239,68,68,0); } }

.hero-pattern-overlay {
    position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
    background-image: var(--pattern); background-size: 60px 60px;
}
.hero-radial-glow {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse at 50% 30%, rgba(198,146,20,0.08) 0%, transparent 65%);
}
.hero-corner-frame {
    position: absolute; z-index: 2; width: 60px; height: 60px; pointer-events: none;
    border-color: rgba(198,146,20,0.15); border-style: solid;
}
.hero-corner-tl { top: 2rem; left: 2rem; border-width: 1px 0 0 1px; }
.hero-corner-tr { top: 2rem; right: 2rem; border-width: 1px 1px 0 0; }
.hero-corner-bl { bottom: 2rem; left: 2rem; border-width: 0 0 1px 1px; }
.hero-corner-br { bottom: 2rem; right: 2rem; border-width: 0 1px 1px 0; }

.glass-pill {
    display: inline-block; padding: 0.4rem 1rem; background: var(--glass-bg);
    border: 1px solid var(--glass-border); border-radius: 100px;
    font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.hero-badge-rotate {
    position: absolute; bottom: 3rem; inset-inline-end: 3rem; z-index: 10;
    animation: spin-slow 25s linear infinite; opacity: 0.4;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--secondary), transparent); animation: scroll-pulse 2s ease-in-out infinite; }
@keyframes scroll-pulse { 0%, 100% { opacity: 0.3; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

.hero-eyebrow { /* already defined via .kicker alias at line 172 */ }

/* section-header alias */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header .kicker { display: block; margin-bottom: 1rem; }
.section-header h2 { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem); color: var(--heading); margin: 0; }
.section-header p { color: var(--muted); font-size: 1.05rem; max-width: 600px; margin: 1rem auto 0; }

/* ════════ COST-PER-STEEP CALCULATOR ════════ */
.gc-calculator-section { background: linear-gradient(180deg, var(--obsidian-deep) 0%, var(--surface) 100%); }
.calc-card {
    max-width: 600px; margin: 0 auto; padding: 3rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 1rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    text-align: center;
}
.calc-grid { display: flex; flex-direction: column; gap: 2rem; }
.calc-label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.calc-header { margin-bottom: 2rem; }
.calc-header .kicker { display: block; margin-bottom: 0.5rem; }
.calc-header h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--heading); margin: 0; }
.calc-input { margin-bottom: 1.5rem; }
.calc-input label {
    display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 0.5rem;
}
.calc-input select,
.calc-input input {
    display: block; width: 100%; padding: 0.9rem 1.2rem; font-size: 1rem;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(236,192,105,0.12); border-radius: 0.5rem;
    color: var(--text); font-family: var(--font-sans);
    appearance: none; -webkit-appearance: none; cursor: pointer;
}
.calc-input select:focus,
.calc-input input:focus { border-color: var(--secondary); outline: none; }
.calc-stats { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.calc-stat { text-align: center; }
.calc-stat .label { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.calc-stat .val { font-family: var(--font-serif); font-size: 1.5rem; color: var(--text); }
.calc-stat.highlight .val { font-size: 2.5rem; color: var(--secondary); }
.calc-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }

/* ════════ FOREST PLEDGE ════════ */
.gc-pledge-section { background: linear-gradient(180deg, var(--surface) 0%, var(--emerald-deep) 30%, var(--surface) 100%); }
.pledge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; align-items: start; margin-top: 2rem; }
.pledge-list { list-style: none; padding: 0; }
.pledge-list li {
    display: flex; align-items: flex-start; gap: 0.8rem; padding: 1rem 0;
    border-bottom: 1px solid rgba(236,192,105,0.06); font-size: 1rem; color: var(--text); line-height: 1.7;
}
.pledge-list li::before { content: "✦"; color: var(--secondary); font-size: 0.8rem; margin-top: 0.25rem; flex-shrink: 0; }
.pledge-badge-wrap { display: flex; align-items: center; justify-content: center; }
.pledge-counter-badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3rem; background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 1rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); text-align: center;
    width: 100%;
}
.pledge-counter-badge .label { display: block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.pledge-counter-badge .num { font-family: var(--font-serif); font-size: 4rem; color: var(--secondary); line-height: 1; }

/* ════════ BREWING RITUAL ════════ */
.gc-ritual-section { background: linear-gradient(180deg, var(--surface) 0%, var(--wood-deep) 50%, var(--surface) 100%); }
.ritual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 3rem; counter-reset: ritual-step; }
.ritual-step {
    text-align: center; padding: 2.5rem 1.5rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 0.75rem; transition: var(--transition); position: relative;
}
.ritual-step:hover { transform: translateY(-4px); border-color: rgba(198,146,20,0.2); }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(198,146,20,0.1); border: 1px solid rgba(198,146,20,0.2);
    font-size: 0.72rem; font-weight: 600; color: var(--secondary); margin-bottom: 1rem;
}
.step-icon { font-size: 2.2rem; margin-bottom: 1rem; line-height: 1; }
.ritual-step h3, .ritual-step h4 { font-family: var(--font-serif); font-size: 1.15rem; color: var(--heading); margin-bottom: 0.6rem; }
.ritual-step p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ════════ GIFTING TIERS (Homepage) ════════ */
.gc-gifting-section { background: linear-gradient(180deg, var(--surface) 0%, var(--obsidian-deep) 100%); }
.tiers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; align-items: start; }
.tier-card {
    position: relative; padding: 2.5rem 2rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 0.75rem; transition: var(--transition); overflow: hidden;
}
.tier-card::before {
    content: ''; position: absolute; inset: 0; opacity: 0;
    background: radial-gradient(ellipse at top, rgba(198,146,20,0.06) 0%, transparent 70%);
    transition: opacity 0.6s; pointer-events: none;
}
.tier-card:hover { transform: translateY(-6px); }
.tier-card:hover::before { opacity: 1; }

.tier-vip {
    border-color: rgba(198,146,20,0.25); transform: scale(1.03);
    box-shadow: 0 24px 60px rgba(198,146,20,0.12);
}
.tier-vip::before { background: radial-gradient(ellipse at top, rgba(198,146,20,0.1) 0%, transparent 70%); }
.tier-vip:hover { transform: scale(1.03) translateY(-8px); box-shadow: 0 40px 100px rgba(198,146,20,0.22); }

.tier-badge-crown {
    position: absolute; top: -1px; inset-inline-end: 2rem; z-index: 2;
    padding: 0.35rem 1rem; background: var(--secondary); color: var(--surface);
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    border-radius: 0 0 0.35rem 0.35rem;
}
.tier-label { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.8rem; }
.tier-accent { color: var(--secondary); }
.tier-icon-wrap { margin-bottom: 1rem; }
.tier-icon-bg {
    display: inline-flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(198,146,20,0.08); color: var(--secondary);
}
.tier-name { font-family: var(--font-serif); font-size: 1.4rem; color: var(--heading); margin-bottom: 0.5rem; }
.tier-tagline { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.5; }
.tier-price-block { margin-bottom: 1.5rem; }
.tier-price-num { font-family: var(--font-serif); font-size: 2rem; color: var(--secondary); }
.tier-price-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.tier-features {
    list-style: none; padding: 0; margin: 0 0 2rem;
    border-top: 1px solid rgba(236,192,105,0.08); padding-top: 1.2rem;
}
.tier-features li {
    position: relative; padding: 0.45rem 0 0.45rem 1.2rem;
    font-size: 0.88rem; color: var(--text); line-height: 1.5;
}
.tier-features li::before { content: "✦"; position: absolute; left: 0; color: var(--secondary); font-size: 0.7rem; }
.tier-cta {
    display: inline-block; width: 100%; text-align: center;
    padding: 0.85rem 1.5rem; border: 1px solid var(--secondary); color: var(--secondary);
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
    border-radius: 0.25rem; transition: var(--transition); text-decoration: none;
}
.tier-cta:hover { background: var(--secondary); color: var(--surface); }
.tier-vip .tier-cta { background: var(--secondary); color: var(--surface); }
.tier-vip .tier-cta:hover { background: var(--gold-text); box-shadow: var(--shadow-gold); }

/* ════════ RAMADAN BANNER ════════ */
.ramadan-banner {
    margin-top: 3rem; padding: 2.5rem;
    background: linear-gradient(135deg, rgba(198,146,20,0.06) 0%, rgba(11,29,58,0.4) 100%);
    border: 1px solid rgba(198,146,20,0.12); border-radius: 0.75rem;
}
.banner-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.banner-icon { font-size: 2.5rem; line-height: 1; }
.banner-text { flex: 1; min-width: 250px; }
.banner-text h3 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--heading); margin-bottom: 0.4rem; }
.banner-text p { font-size: 0.92rem; color: var(--muted); line-height: 1.6; }

/* ════════ BACK TO TOP ════════ */
.back-to-top {
    position: fixed; bottom: 2rem; inset-inline-end: 2rem; z-index: 999;
    width: 48px; height: 48px; border: none; border-radius: 50%;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(20px); pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--secondary); color: var(--surface); border-color: var(--secondary); }

/* ════════ RESPONSIVE ════════ */
@media (max-width: 1024px) {
    .nav-links, .nav-cta .btn { display: none; }
    .hamburger { display: flex; }
    .gc-story-grid, .gc-single-grid, .gc-archive-layout, .gc-archive-hero__head { grid-template-columns: 1fr; display: grid; }
    .gc-archive-grid, .woocommerce ul.products, .woocommerce-page ul.products, .paths-grid, .gc-gifting-grid, .pillars-grid { grid-template-columns: repeat(2, 1fr); }
    .gc-shop-sidebar { position: static; }
    .gc-archive-layout { grid-template-columns: 1fr; }
    .tiers-grid { grid-template-columns: 1fr 1fr; }
    .tier-vip { transform: none; grid-column: 1 / -1; }
    .ritual-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    section { padding: 5rem 0; }
    .gc-home-hero__actions, .gc-stock-banner, .gc-shop-toolbar { flex-direction: column; align-items: flex-start; }
    .gc-home-badge { display: none; }
    .gc-hero-ornament { display: none; }
    .hero-badge-rotate { display: none; }
    .hero-corner-frame { display: none; }
    .gc-archive-grid, .woocommerce ul.products, .woocommerce-page ul.products, .paths-grid, .gc-gifting-grid, .gc-story-stats, .pillars-grid { grid-template-columns: 1fr; }
    .gc-stock-banner__bar { min-width: 0; width: 100%; }
    .gc-hero-signals { flex-direction: column; align-items: center; }
    .path-curator { transform: none; }
    .gc-tier-card--featured { transform: none; }
    .tiers-grid { grid-template-columns: 1fr; }
    .tier-vip { transform: none; }
    .ritual-grid { grid-template-columns: 1fr; }
    .pledge-grid { grid-template-columns: 1fr; }
    .banner-inner { flex-direction: column; text-align: center; }
    .banner-inner .btn { width: 100%; }
    .calc-card { padding: 2rem 1.5rem; }
}
@media (max-width: 480px) {
    .gc-home-hero h1 { font-size: 3rem; }
    .container { padding: 0 1.5rem; }
    .calc-result { font-size: 2.2rem; }
    .pledge-counter .count-value { font-size: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ══════════════════════════════════════════════════════════
   RTL SUPPORT & LOGICAL PROPERTIES
   Added in v2.1 for Arabic/UAE market compatibility
══════════════════════════════════════════════════════════ */

/* Base RTL text direction support */
[dir="rtl"] body {
    direction: rtl;
}

/* Navigation: reverse flex order for RTL */
[dir="rtl"] .gc-nav {
    flex-direction: row-reverse;
}
[dir="rtl"] .nav-links .nav-menu {
    flex-direction: row-reverse;
}
[dir="rtl"] .nav-cta {
    flex-direction: row-reverse;
}
[dir="rtl"] .logo-area {
    flex-direction: row-reverse;
}

/* Hero signals: maintain center but allow RTL text */
[dir="rtl"] .gc-hero-signals {
    direction: rtl;
}

/* Story grid: reverse column order */
[dir="rtl"] .gc-story-grid {
    direction: rtl;
}
[dir="rtl"] .gc-story-grid > * {
    direction: ltr;
}
[dir="rtl"] .gc-story-stats {
    direction: rtl;
}

/* Archive head: reverse layout */
[dir="rtl"] .gc-archive-head {
    flex-direction: row-reverse;
}
[dir="rtl"] .gc-archive-head > div:first-child {
    text-align: right;
}

/* Archive grid cards: RTL text alignment */
[dir="rtl"] .gc-archive-card {
    direction: rtl;
}
[dir="rtl"] .gc-archive-card__body {
    text-align: right;
}
[dir="rtl"] .gc-archive-card__badge {
    right: auto;
    left: 1rem;
}

/* Shop layout: reverse sidebar */
[dir="rtl"] .gc-archive-layout {
    direction: rtl;
}
[dir="rtl"] .gc-archive-layout > * {
    direction: ltr;
}

/* Sidebar hover padding (RTL) — padding-inline-start handles both directions */
[dir="rtl"] .gc-sidebar-list a:hover {
    padding-inline-start: 0.5rem;
}

/* Single product grid: reverse */
[dir="rtl"] .gc-single-grid {
    direction: rtl;
}
[dir="rtl"] .gc-single-grid > * {
    direction: ltr;
}

/* Tier features: align bullets for RTL */
[dir="rtl"] .tier-features li {
    padding-inline-start: 1.2rem;
    padding-inline-end: 0;
}
[dir="rtl"] .tier-features li::before {
    inset-inline-start: 0;
    inset-inline-end: auto;
}

/* Member box list bullets */
[dir="rtl"] .gc-member-box li::before {
    margin-inline-end: 0.5rem;
    margin-inline-start: 0;
}

/* Scarcity dot */
[dir="rtl"] .scarcity-dot {
    margin-inline-end: 0.6rem;
    margin-inline-start: 0;
}

/* Trust row bullets */
[dir="rtl"] .gc-trust-row span::before {
    margin-inline-end: 0.4rem;
    margin-inline-start: 0;
}

/* Marquee direction for RTL */
[dir="rtl"] .gc-trust-marquee {
    animation-direction: reverse;
}

/* Mobile menu: RTL text alignment */
[dir="rtl"] .mobile-menu .mobile-nav-list a {
    text-align: start;
}

/* Mobile menu RTL slide direction */
[dir="rtl"] .mobile-menu {
    transform: translateX(100%);
}
[dir="rtl"] .mobile-menu.active {
    transform: translateX(0);
}

/* RTL font-family override (Phase 3.1) */
[dir="rtl"] body {
    font-family: var(--font-arabic), var(--font-sans);
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .serif-font,
[dir="rtl"] .display-md {
    font-family: var(--font-arabic), var(--font-serif);
}
[dir="rtl"] .brand-name {
    font-family: var(--font-arabic), var(--font-serif);
}
[dir="rtl"] .gc-home-hero h1 {
    /* Arabic glyphs are taller — slightly reduce clamp max */
    font-size: clamp(2.8rem, 7vw, 6rem);
}
[dir="rtl"] .mobile-menu .mobile-nav-list a {
    font-family: var(--font-arabic), var(--font-serif);
}
[dir="rtl"] .stat-num,
[dir="rtl"] .gc-metric-value,
[dir="rtl"] .gc-archive-card__price,
[dir="rtl"] .gc-tier-price,
[dir="rtl"] .tier-price-num {
    font-family: var(--font-arabic), var(--font-serif);
}

/* Focus-visible states (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Skip link focus */
.skip-link:focus-visible {
    clip: auto !important;
    height: auto;
    width: auto;
    padding: 1rem;
    z-index: 100000;
}
