/*
Theme Name: RexerLab Theme
Theme URI: https://rexerlab.com
Author: Antigravity
Description: Custom WordPress theme for RexerLab scientific instruments distributor.
Version: 1.0.0
Text Domain: rexerlab
*/

/* --- Base Resets & Variables --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #F86600;
    --primary-hover: #E25C00;
    --text-main: #1A1A1A;
    --text-muted: #6B6B6B;
    --text-light: #9A9A9A;
    --bg-white: #FFFFFF;
    --bg-offwhite: #FAFAF8;
    --border-color: rgba(26, 26, 26, 0.10);
}

html {
    scroll-behavior: smooth;
}

/* Anchored sections shouldn't hide under the sticky header */
section[id] {
    scroll-margin-top: 90px;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--primary);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Typography Helpers --- */
h1, h2, h3, h4, h5, h6, .space-grotesk {
    font-family: 'Space Grotesk', sans-serif;
}

/* --- Header & Nav --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 40px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.header-logo img {
    height: 34px;
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.header-nav a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .01em;
    color: #4A4A4A;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 22px;
    border: 1px solid var(--text-main);
    border-radius: 2px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .02em;
    transition: all .2s;
    background: transparent;
    color: var(--text-main);
}

.contact-btn:hover {
    background: var(--text-main);
    color: #fff;
}

/* --- Container & Layout --- */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding-top: 104px;
    padding-bottom: 104px;
}

.section-bg-alt {
    background: var(--bg-offwhite);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

/* --- Hero Section --- */
.hero-section {
    padding: 96px 40px 72px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.eyebrow-line {
    width: 34px;
    height: 1px;
    background: var(--primary);
    display: block;
}

.eyebrow-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--primary);
}

.eyebrow-text.muted {
    color: var(--text-light);
}

.hero-title {
    font-weight: 600;
    font-size: clamp(38px, 4.9vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

.hero-sub {
    font-size: 18px;
    line-height: 1.6;
    color: #5A5A5A;
    max-width: 540px;
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 2px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .01em;
    transition: all .2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    height: 52px;
    padding: 0 26px;
    border: 1px solid rgba(26,26,26,0.20);
    border-radius: 2px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    transition: all .2s;
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

/* --- Section Titles --- */
.section-title {
    font-weight: 600;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.015em;
}

/* --- Hero trust chips --- */
.trust-chips {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: #5A5A5A;
    letter-spacing: .01em;
}

.trust-chip svg {
    flex-shrink: 0;
}

/* --- Hero illustration animation --- */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual .arc-animated {
    stroke-dasharray: 6 8;
    animation: arc-flow 2.4s linear infinite;
}

@keyframes arc-flow {
    to { stroke-dashoffset: -28; }
}

.hero-visual .node-pulse {
    animation: node-pulse 2.8s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes node-pulse {
    0%, 100% { opacity: .35; transform: scale(1); }
    50% { opacity: 0; transform: scale(2.1); }
}

.hero-visual .ring-rotate {
    animation: ring-rotate 16s linear infinite;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes ring-rotate {
    to { transform: rotate(360deg); }
}

/* --- Engagement model cards --- */
.engage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.engage-card {
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 3px;
    padding: 38px 34px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}

.engage-card:hover {
    border-color: var(--primary);
    box-shadow: 0 14px 36px rgba(26, 26, 26, 0.07);
    transform: translateY(-3px);
}

.engage-card .engage-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 18px;
}

.engage-card h3 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.engage-card .engage-fit {
    font-size: 14px;
    line-height: 1.55;
    color: #7A7A7A;
    margin-bottom: 22px;
}

.engage-card ul {
    list-style: none;
    margin-top: auto;
}

.engage-card ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid rgba(26, 26, 26, 0.09);
    font-size: 14.5px;
    line-height: 1.5;
    color: #2A2A2A;
}

.engage-card ul li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0;
}

.engage-note {
    margin-top: 36px;
    text-align: center;
    font-size: 14.5px;
    color: #7A7A7A;
    line-height: 1.6;
}

/* --- "First call" steps strip --- */
.firstcall-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(26, 26, 26, 0.12);
    border-left: 1px solid rgba(26, 26, 26, 0.12);
    margin-top: 56px;
}

.firstcall-step {
    background: #fff;
    border-right: 1px solid rgba(26, 26, 26, 0.12);
    border-bottom: 1px solid rgba(26, 26, 26, 0.12);
    padding: 30px 28px 34px;
}

.firstcall-step .step-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.firstcall-step h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.firstcall-step p {
    font-size: 14px;
    line-height: 1.55;
    color: #7A7A7A;
}

/* --- Contact form-style mailto card --- */
.contact-template {
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 3px;
    padding: 30px 30px 26px;
    margin-top: 28px;
}

.contact-template .ct-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9A9A9A;
    margin-bottom: 14px;
}

.contact-template ul {
    list-style: none;
    margin-bottom: 20px;
}

.contact-template ul li {
    font-size: 14.5px;
    line-height: 1.6;
    color: #4A4A4A;
    padding: 7px 0 7px 22px;
    position: relative;
}

.contact-template ul li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* --- Brand video --- */
.video-frame {
    border: 1px solid rgba(26, 26, 26, 0.14);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px rgba(26, 26, 26, 0.10);
}

/* --- Mobile navigation --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 9px;
    background: transparent;
    border: 1px solid rgba(26, 26, 26, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in-up { opacity: 1; transform: none; transition: none; }
    .hero-visual .arc-animated,
    .hero-visual .node-pulse,
    .hero-visual .ring-rotate { animation: none; }
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

/* --- Specific Pages: Products --- */
.page-header {
    background: var(--bg-offwhite);
    padding: 100px 40px;
    border-bottom: 1px solid var(--border-color);
}
.products-category {
    margin-bottom: 80px;
}
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 30px;
    transition: box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .nav-toggle {
        display: flex;
    }
    .header-nav {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--border-color);
        padding: 8px 20px 16px;
        box-shadow: 0 18px 34px rgba(26, 26, 26, 0.08);
    }
    .header-nav.is-open {
        display: flex;
    }
    .header-nav a {
        padding: 14px 4px;
        font-size: 15px;
        border-bottom: 1px solid rgba(26, 26, 26, 0.07);
    }
    .header-nav a:last-child {
        border-bottom: none;
    }
    .engage-grid,
    .firstcall-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .grid-4, .grid-3 {
        grid-template-columns: 1fr;
    }
    .header-inner {
        padding: 0 20px;
    }
    .container {
        padding: 0 20px;
    }
}

/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* --- Blog specific styles --- */
.blog-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    background: #fff;
}
.blog-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.blog-card-img {
    height: 240px;
    overflow: hidden;
    display: block;
}
.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}
.blog-card-img.placeholder {
    background: var(--bg-offwhite);
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.blog-card-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
}
.pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- Single Post Styles --- */
.blog-content p {
    margin-bottom: 24px;
}
.blog-content h2, .blog-content h3, .blog-content h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #1a1a1a;
}
.blog-content h2 { font-size: 28px; }
.blog-content h3 { font-size: 24px; }
.blog-content ul, .blog-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}
.blog-content li {
    margin-bottom: 10px;
}
.blog-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 20px 0 20px 30px;
    margin: 40px 0;
    font-size: 22px;
    font-style: italic;
    color: var(--text-muted);
    background: var(--bg-offwhite);
    border-radius: 0 4px 4px 0;
}
.blog-content img {
    border-radius: 4px;
    margin: 40px 0;
}

/* Force override any external/plugin borders on single post elements */
.blog-footer, 
.related-posts {
    border: none !important;
    border-top: 1px solid rgba(26, 26, 26, 0.10) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

