/*
 * Global DocuAuth — Theme CSS
 * Tailwind CDN handles utilities. This file covers:
 *   - CSS custom properties
 *   - Components Tailwind can't express inline
 *   - WooCommerce overrides
 *   - Print styles
 */

/* ─── Custom Properties ────────────────────────────── */
:root {
    --gda-primary:   #d97706;
    --gda-secondary: #0f172a;
    --gda-accent:    #059669;
    --gda-bg:        #f6f4ee;
    --gda-cream:     #faf7f0;
    --gda-border:    #d9cfb8;
    --gda-font-display: 'Boska', serif;
    --gda-font-sans:    'Satoshi', sans-serif;
    --gda-font-mono:    'IBM Plex Mono', monospace;
}

/* ─── Base ──────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body { background-color: var(--gda-bg); }

/* ─── Typography ────────────────────────────────────── */
.font-display { font-family: var(--gda-font-display); }
.font-mono    { font-family: var(--gda-font-mono); }

/* ─── Header scroll transition ─────────────────────── */

/*
 * Default: cream and fully visible everywhere.
 * JS adds .hero-mode ONLY on homepage when scrollY < 80px (over video).
 * All other pages always show cream header with dark text.
 */

#site-header {
    background: rgba(250,247,240,0.97);
    border-bottom: 1px solid #d9cfb8;
    box-shadow: 0 2px 12px -4px rgba(0,0,0,0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* Only when JS adds .hero-mode (homepage at top, over video) */
#site-header.hero-mode {
    background: rgba(7,11,20,0.88);
    border-bottom-color: rgba(255,255,255,0.08);
    box-shadow: none;
}

/* Nav links — ALWAYS dark by default */
#site-header .nav-link {
    color: #1e293b;
    font-family: var(--gda-font-mono);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    transition: color .2s;
}
#site-header .nav-link:hover { color: #d97706; }

/* Hero mode — nav goes white */
#site-header.hero-mode .nav-link { color: rgba(255,255,255,.9); }
#site-header.hero-mode .nav-link:hover { color: #f59e0b; }

/* Logo */
#site-header .header-logo-name {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
    transition: color .3s;
}
#site-header .header-logo-accent { color: #d97706; }
#site-header .header-logo-sub {
    color: #64748b;
    font-size: .625rem;
    letter-spacing: .18em;
    transition: color .3s;
}
#site-header.hero-mode .header-logo-name { color: #ffffff; }
#site-header.hero-mode .header-logo-sub  { color: rgba(255,255,255,.45); }

/* Hamburger */
#site-header .header-hamburger { color: #1e293b; transition: color .3s; }
#site-header.hero-mode .header-hamburger { color: rgba(255,255,255,.9); }

/* Order Now CTA — always amber */
#site-header .header-cta {
    background: linear-gradient(135deg,#f59e0b,#d97706);
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(217,119,6,.35);
    transition: opacity .2s;
}
#site-header .header-cta:hover { opacity: .9; }

/* Active nav link */
#site-header .nav-link.active { color: #d97706; }
#site-header .nav-link.active::after { width: 100%; }

/* ─── Nav link underline animation ─────────────────── */
.nav-link {
    position: relative;
    font-family: var(--gda-font-sans);
    font-size: .82rem;
    font-weight: 600;
    padding: 4px 0;
    transition: color .2s;
    letter-spacing: .01em;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    border-radius: 2px;
    transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--gda-font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.section-label::before {
    content: '';
    display: inline-block;
    width: 28px; height: 1px;
    background: currentColor;
    opacity: .6;
}

/* ─── Hairline divider ──────────────────────────────── */
.hairline,
.gda-hairline {
    background: repeating-linear-gradient(
        90deg,
        #a63d32 0 18px, var(--gda-bg) 18px 22px,
        #3d5644 22px 40px, var(--gda-bg) 40px 44px
    );
    height: 3px;
}

/* ─── Paper grain bg ────────────────────────────────── */
.paper-grain {
    background-image:
        radial-gradient(ellipse at 10% 15%, rgba(2,132,199,.05), transparent 45%),
        radial-gradient(ellipse at 88% 18%, rgba(217,119,6,.06), transparent 42%),
        linear-gradient(180deg, #f8f5ee 0%, #f3efe5 100%);
}

/* ─── Cert card ─────────────────────────────────────── */
.cert-card {
    background: var(--gda-cream);
    border: 1px solid var(--gda-border);
    border-radius: 4px;
    box-shadow:
        0 1px 0 rgba(255,255,255,.7) inset,
        0 24px 50px -20px rgba(15,23,42,.28);
}

/* ─── Hero layout ───────────────────────────────────── */
.hero-wrap {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #070b14;
}
/* Background video — covers full hero, never interactive */
.hero-video-bg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}
/* Multi-layer dark + glow overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7,11,20,.72) 0%, rgba(7,11,20,.50) 45%, rgba(7,11,20,.82) 100%),
        radial-gradient(ellipse at 8% 85%, rgba(217,119,6,.26) 0%, transparent 55%),
        radial-gradient(ellipse at 88% 8%,  rgba(5,150,105,.12) 0%, transparent 50%);
    pointer-events: none;
}
/* Subtle grid lines */
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}
/* Content above all layers */
.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
}
/* Glassmorphic stat pill */
.hero-stat {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}
/* Trust badge chips */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 11px;
    font-family: var(--gda-font-mono);
    font-weight: 600;
    letter-spacing: .06em;
}

/* ─── Marquee ───────────────────────────────────────── */
@keyframes marquee { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.animate-marquee { animation: marquee 30s linear infinite; }

/* ─── Seal float ────────────────────────────────────── */
@keyframes seal-pulse {
    0%,100% { transform: rotate(-8deg) scale(1); }
    50%      { transform: rotate(-6deg) scale(1.04); }
}
.seal-float { animation: seal-pulse 6s ease-in-out infinite; }

/* ─── FAQ accordion ─────────────────────────────────── */
.gda-faq-btn[aria-expanded="true"] i[data-lucide="chevron-down"] {
    transform: rotate(180deg);
}

/* ─── WooCommerce overrides ─────────────────────────── */
.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid var(--gda-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.woocommerce ul.products li.product:hover {
    border-color: var(--gda-primary);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,.1);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--gda-font-display);
    font-size: 1.1rem;
    color: #0f172a;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--gda-primary);
    font-family: var(--gda-font-display);
    font-size: 1.25rem;
    font-weight: 700;
}
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    border: none !important;
    padding: .75rem 2rem !important;
    font-family: var(--gda-font-sans) !important;
    transition: opacity .2s !important;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover { opacity: .9 !important; }

.woocommerce-cart table.cart,
.woocommerce-checkout .woocommerce {
    font-family: var(--gda-font-sans);
    color: #334155;
}

/* ─── Elementor overrides ───────────────────────────── */
.elementor-section-stretched { max-width: 100% !important; }

/* ─── Prose (WP editor content) ────────────────────── */
.prose h2 { font-family: var(--gda-font-display); font-size: 1.75rem; color: #0f172a; margin-bottom: .75rem; }
.prose h3 { font-family: var(--gda-font-display); font-size: 1.35rem; color: #0f172a; margin-bottom: .5rem; }
.prose p  { margin-bottom: 1rem; line-height: 1.7; }
.prose ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }
.prose a  { color: var(--gda-primary); text-decoration: underline; }
.prose strong { color: #0f172a; }

/* ─── Accessibility focus rings ─────────────────────── */
:focus-visible {
    outline: 2px solid var(--gda-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Print ─────────────────────────────────────────── */
@media print {
    #site-header, footer, .gda-cta-float { display: none !important; }
    body { background: #fff; color: #000; }
}

/* ─── Blog & pagination ────────────────────────────── */
.gda-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
}
.gda-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .6rem;
    border-radius: .75rem;
    font-size: .75rem;
    font-family: var(--gda-font-mono);
    font-weight: 600;
    border: 1px solid var(--gda-border);
    background: #fff;
    color: #334155;
    text-decoration: none;
    transition: border-color .2s, background .2s, color .2s;
}
.gda-pagination .page-numbers:hover {
    border-color: var(--gda-primary);
    color: var(--gda-primary);
}
.gda-pagination .page-numbers.current {
    background: linear-gradient(135deg,#f59e0b,#d97706);
    border-color: transparent;
    color: #0f172a;
}
.gda-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #94a3b8;
}

/* line-clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-list .comment {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #ede8df;
}
.comment-list .comment:last-child { border-bottom: none; }
.comment-author img { border-radius: .5rem; }
.comment-content p { font-size: .875rem; color: #475569; line-height: 1.65; }
.comment-reply-link {
    font-size: .7rem;
    font-weight: 700;
    color: var(--gda-primary);
    font-family: var(--gda-font-mono);
    text-transform: uppercase;
    letter-spacing: .08em;
}
#respond { margin-top: 1.5rem; }
#respond h3 { font-family: var(--gda-font-display); font-size: 1.25rem; color: #0f172a; margin-bottom: 1rem; }
#respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"] {
    width: 100%;
    padding: .75rem 1rem;
    border-radius: .75rem;
    border: 1px solid var(--gda-border);
    background: #faf7f0;
    font-size: .8125rem;
    color: #0f172a;
    outline: none;
    transition: border-color .2s;
}
#respond textarea:focus,
#respond input:focus { border-color: var(--gda-primary); }
#respond input[type="submit"] {
    background: linear-gradient(135deg,#f59e0b,#d97706) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    border: none !important;
    padding: .75rem 2rem !important;
    cursor: pointer;
}

/* ─── WooCommerce form fields ───────────────────────── */
.woocommerce form .form-row {
    margin-bottom: 1.25rem;
}
.woocommerce form .form-row label {
    display: block;
    font-size: .7rem;
    font-family: var(--gda-font-mono);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: .4rem;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: .75rem 1rem;
    border-radius: .75rem;
    border: 1px solid var(--gda-border);
    background: #faf7f0;
    font-size: .8125rem;
    color: #0f172a;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--gda-primary);
    box-shadow: 0 0 0 3px rgba(217,119,6,.12);
}
.woocommerce form .form-row .required { color: #ef4444; }

/* Order review table */
.woocommerce-checkout-review-order table {
    width: 100%;
    font-size: .875rem;
    border-collapse: collapse;
}
.woocommerce-checkout-review-order table th,
.woocommerce-checkout-review-order table td {
    padding: .75rem 0;
    border-bottom: 1px solid #ede8df;
    vertical-align: middle;
}
.woocommerce-checkout-review-order table tfoot tr:last-child td,
.woocommerce-checkout-review-order table tfoot tr:last-child th {
    font-family: var(--gda-font-display);
    font-size: 1.1rem;
    color: #0f172a;
    border-bottom: none;
    padding-top: 1rem;
}

/* Payment methods */
.woocommerce-checkout #payment {
    background: transparent !important;
    border-radius: 0 !important;
}
.woocommerce-checkout #payment ul.payment_methods {
    list-style: none;
    padding: 0;
    space-y: .5rem;
}
.woocommerce-checkout #payment ul.payment_methods li {
    padding: .75rem 1rem;
    border: 1px solid var(--gda-border);
    border-radius: .75rem;
    margin-bottom: .5rem;
    background: white;
    font-size: .875rem;
}
.woocommerce-checkout #payment ul.payment_methods li input { margin-right: .5rem; }
.woocommerce-checkout #payment div.payment_box {
    background: #faf7f0;
    border-radius: .75rem;
    padding: .75rem 1rem;
    font-size: .8125rem;
    color: #475569;
    margin-top: .25rem;
}
#place_order {
    width: 100%;
    margin-top: 1rem;
}

/* ─── WooCommerce catalog ordering ──────────────────── */
.woocommerce-ordering select {
    padding: .5rem .75rem;
    border-radius: .75rem;
    border: 1px solid var(--gda-border);
    background: white;
    font-size: .75rem;
    font-family: var(--gda-font-mono);
    color: #334155;
    outline: none;
}

/* Results count */
.woocommerce-result-count {
    font-size: .75rem;
    font-family: var(--gda-font-mono);
    color: #94a3b8;
}

/* ─── WooCommerce notices ────────────────────────────── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: .875rem 1.25rem;
    border-radius: .75rem;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.woocommerce-message {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}
.woocommerce-info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e3a8a;
}
.woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    list-style: none;
    padding-left: 1.25rem;
}
.woocommerce-error li { margin-bottom: .25rem; }

/* ─── WooCommerce product image (single) ─────────────── */
.woocommerce div.product .woocommerce-product-gallery img {
    border-radius: 1rem;
    border: 1px solid var(--gda-border);
}
.woocommerce div.product .woocommerce-product-gallery .flex-viewport {
    border-radius: 1rem;
    overflow: hidden;
}
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li img {
    border-radius: .5rem;
    border: 1px solid var(--gda-border);
}
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    border-color: var(--gda-primary);
}

/* ─── Quantity input ─────────────────────────────────── */
.woocommerce .quantity input.qty {
    width: 4rem;
    padding: .5rem .75rem;
    border-radius: .5rem;
    border: 1px solid var(--gda-border);
    text-align: center;
    font-size: .875rem;
    font-family: var(--gda-font-mono);
}

/* ─── Cart table image thumbnail ─────────────────────── */
.woocommerce-cart-form__contents td img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: .5rem;
    border: 1px solid var(--gda-border);
}

/* ─── My Account ─────────────────────────────────────── */
.woocommerce-MyAccount-content table.shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.woocommerce-MyAccount-content table.shop_table th {
    font-family: var(--gda-font-mono);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
    padding: .5rem .75rem;
    border-bottom: 1px solid #ede8df;
    text-align: left;
}
.woocommerce-MyAccount-content table.shop_table td {
    padding: .75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.woocommerce-MyAccount-content table.shop_table tr:last-child td {
    border-bottom: none;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions a {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 700;
    background: linear-gradient(135deg,#f59e0b,#d97706);
    color: #0f172a;
    text-decoration: none;
}
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce-MyAccount-navigation ul li.is-active a {
    color: var(--gda-primary);
    font-weight: 700;
}

/* ─── Order total row ────────────────────────────────── */
.woocommerce-cart-form .order-total th,
.woocommerce-cart-form .order-total td {
    font-family: var(--gda-font-display);
    font-size: 1.1rem;
    color: #0f172a;
    padding-top: 1rem;
    border-bottom: none;
}

/* ─── WPML / Polylang language switcher ──────────────── */
.wpml-ls-legacy-dropdown,
.pll-parent-menu-item { position: relative; }
.wpml-ls-legacy-dropdown a,
.pll-parent-menu-item a {
    font-family: var(--gda-font-mono);
    font-size: .75rem;
    color: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    gap: .35rem;
}
#site-header.scrolled .wpml-ls-legacy-dropdown a,
#site-header.scrolled .pll-parent-menu-item a { color: #334155; }

/* ─── Accessibility — skip link ──────────────────────── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 1rem;
    z-index: 100;
    padding: .5rem 1rem;
    background: var(--gda-primary);
    color: #0f172a;
    font-weight: 700;
    border-radius: .5rem;
}
.skip-link:focus { left: 1rem; }
