/**
 * HSXPCB Rigid Flex - Main Stylesheet
 * Version: 1.0.0
 *
 * Sections:
 * 1. CSS Variables
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout (container / grid)
 * 5. Buttons
 * 6. Header / Nav
 * 7. Mobile Menu
 * 8. Hero
 * 9. Section + Section Header
 * 10. Cards
 * 11. Breadcrumb + Page Header
 * 12. Front Page sections
 * 13. Product Detail Page
 * 14. About Page
 * 15. Contact Page
 * 16. Tech Capabilities Page
 * 17. Stackup Page
 * 18. Footer
 * 19. 404 Page
 * 20. Back to top
 * 21. Responsive
 */

/* ============= 1. CSS Variables ============= */
:root {
    --color-primary: #1e73be;
    --color-primary-dark: #155a8e;
    --color-accent: #d63031;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-bg: #ffffff;
    --color-bg-alt: #f7f7f7;
    --color-bg-dark: #333333;
    --color-bg-darker: #222222;
    --color-border: #dfdfdf;

    --font-display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    --radius-sm: 2px;
    --radius-md: 4px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);

    --header-height: 80px;
    --transition: all 0.3s ease;
}

/* ============= 2. Reset & Base ============= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; line-height: 1.3; color: var(--color-text); margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -9999px; top: 0; padding: 8px 16px;
    background: var(--color-primary); color: #fff; z-index: 10000;
}
.skip-link:focus { left: 0; }

/* ============= 3. Typography ============= */
h1 { font-size: 36px; line-height: 1.2; }
h2 { font-size: 28px; line-height: 1.3; }
h3 { font-size: 22px; line-height: 1.4; }
h4 { font-size: 18px; line-height: 1.4; }

/* ============= 4. Layout ============= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.container-narrow { max-width: 820px; }

.grid {
    display: grid;
    gap: 24px;
    margin: 32px 0;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============= 5. Buttons ============= */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: #b71c1c; color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-ghost:hover { background: var(--color-primary); color: #fff; }
.btn-ghost-light {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.btn-ghost-light:hover { background: #fff; color: var(--color-text); }

/* ============= 6. Header / Nav ============= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-bottom-color: var(--color-border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.site-branding { flex: 0 0 auto; }
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}
.site-logo:hover { color: var(--color-text); }
.site-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    border-radius: var(--radius-sm);
    letter-spacing: -0.02em;
}
.site-logo-mark[src$=".jpg"],
.site-logo-mark[src$=".png"] {
    background: none;
    object-fit: cover;
    padding: 0;
}
.site-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
}
.site-logo-sub {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.primary-nav { display: flex; align-items: center; }
.primary-menu { display: flex; gap: 0; margin: 0; padding: 0; }
.primary-menu > li.menu-item {
    position: relative;
    padding: 0;
    margin: 0 0 0 24px;
}
.primary-menu > li.menu-item > a {
    display: flex;
    align-items: center;
    height: var(--header-height);
    padding: 0 4px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}
.primary-menu > li.menu-item > a:hover { color: var(--color-primary); }
.primary-menu > li.menu-item.has-children > a::after {
    content: '';
    margin-left: 8px;
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}
.primary-menu > li.current-menu-item > a {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    font-weight: 700;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background: #fff;
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(8px);
    transition: var(--transition);
    border-radius: var(--radius-md);
}
.primary-menu > li.menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.sub-menu li.menu-item a {
    display: block;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text);
    transition: var(--transition);
}
.sub-menu li.menu-item a:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
    padding-left: 26px;
}
.sub-menu li.current-menu-item > a { color: var(--color-accent); font-weight: 600; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    padding: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-text);
    transition: var(--transition);
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ============= 7. Mobile Menu ============= */
.mobile-menu {
    position: fixed;
    top: 0; right: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    padding: 80px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-list { margin: 0; padding: 0; }
.mobile-menu-item { border-bottom: 1px solid var(--color-border); }
.mobile-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-menu-item > .mobile-menu-row > a {
    display: block;
    padding: 14px 0;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    flex: 1;
}
.mobile-menu-item.current-menu-item > .mobile-menu-row > a { color: var(--color-accent); }
.mobile-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-text-light);
    transition: var(--transition);
}
.mobile-sub-toggle:hover { color: var(--color-primary); }
.mobile-sub-toggle.is-expanded svg { transform: rotate(180deg); }
.mobile-sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 0 0 16px;
}
.mobile-menu-item.is-expanded > .mobile-sub-menu {
    max-height: 400px;
    padding: 0 0 8px 16px;
}
.mobile-sub-menu li a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--color-text-light);
}
.mobile-sub-menu li.current-menu-item a { color: var(--color-accent); font-weight: 600; }

.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.mobile-menu-overlay.is-active { opacity: 1; visibility: visible; }

/* ============= 8. Hero ============= */
.hero {
    position: relative;
    min-height: 500px;
    margin-top: var(--header-height);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
}
.hero-content {
    position: absolute;
    z-index: 1;
    right: 48px;
    bottom: 48px;
    top: auto;
    transform: none;
    text-align: right;
}
.hero-title { display: none; }
.hero-cta {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: flex-end;
}

/* ============= 9. Section + Section Header ============= */
.section {
    padding: 64px 0;
}
.section.section-alt { background: var(--color-bg-alt); }

.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-header--left { text-align: left; }
.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    letter-spacing: 0.02em;
}
.section-rule {
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin: 12px auto 0;
}
.section-header--left .section-rule { margin-left: 0; }
.section-sub {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}
.section-more { text-align: right; margin-top: 16px; }

/* ============= 10. Cards ============= */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.card-link:hover { color: inherit; }
.card__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card__image img { transform: scale(1.05); }
.card__body { padding: 16px 20px 20px; }
.card__title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 8px;
    line-height: 1.3;
}
.card__desc {
    font-size: 13px;
    color: var(--color-text-light);
    margin: 0 0 12px;
    line-height: 1.6;
}
.card__more {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============= 11. Breadcrumb + Page Header ============= */
.breadcrumb {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
    margin-top: var(--header-height);
}
.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
    padding: 0;
}
.breadcrumb-item { display: flex; align-items: center; }
.breadcrumb-item a { color: var(--color-text-light); }
.breadcrumb-item a:hover { color: var(--color-primary); }
.breadcrumb-item.is-current span { color: var(--color-text); font-weight: 600; }
.breadcrumb-sep { margin: 0 8px; color: var(--color-text-muted); }

.page-header {
    padding: 48px 0 32px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}
.page-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--color-text);
}
.page-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    margin: 0;
}
.page-rule {
    display: inline-block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin-top: 16px;
}
.page-content { padding: 48px 0; }

/* ============= 12. Front Page Sections ============= */
.section-about-preview .about-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 32px;
}
.about-preview-text p {
    font-size: 19px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin: 0 0 1em;
}
.about-preview-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* ============= 13. Product Detail Page ============= */
.product-detail { padding: 32px 0 48px; }
.back-btn { margin-bottom: 24px; }
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
    margin-top: 16px;
}
.product-detail-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.product-detail-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.product-detail-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.product-detail-rule {
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin: 16px 0 24px;
}
.product-detail-body {
    margin-top: auto;
    margin-bottom: auto;
}
.product-detail-desc {
    margin: 0;
}
.product-detail-desc p {
    font-size: 22px;
    line-height: 1.9;
    color: var(--color-text);
    text-align: left;
    margin: 0 0 1em;
}
.product-detail-actions { margin-top: 32px; }

.related-products { padding: 48px 0; }
.related-products .grid { margin: 24px 0 0; }

/* ============= 14. About Page ============= */
.about-content { padding: 16px 0; }
.about-paragraph {
    font-size: 20px;
    line-height: 1.9;
    color: var(--color-text);
    margin: 0 0 1.5em;
}
.about-paragraph-1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
    border-left: 4px solid var(--color-primary);
    padding-left: 20px;
    background: var(--color-bg-alt);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}
.about-cta {
    text-align: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

/* ============= 15. Contact Page ============= */
.contact-intro {
    text-align: center;
    font-size: 18px;
    color: var(--color-text-light);
    max-width: 720px;
    margin: 0 auto 40px;
    line-height: 1.8;
}
.contact-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.contact-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}
.contact-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.contact-card-icon {
    display: inline-flex;
    color: var(--color-primary);
    margin-bottom: 16px;
}
.contact-card-label {
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}
.contact-card-value {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    word-break: break-word;
    line-height: 1.5;
}
.contact-card-value a { color: var(--color-text); }
.contact-card-value a:hover { color: var(--color-primary); }

/* ============= 16. Tech Capabilities Page ============= */
.tech-intro { text-align: center; margin-bottom: 40px; }
.tech-intro p {
    font-size: 18px;
    color: var(--color-text-light);
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
}
.tech-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
    padding: 32px 0;
    margin-bottom: 32px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
}
.tech-stat { text-align: center; }
.tech-stat-label {
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.tech-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
}
.tech-features { margin-top: 24px; }
.tech-feature-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    border-left: 3px solid var(--color-primary);
    transition: var(--transition);
}
.tech-feature-card:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.tech-feature-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.tech-feature-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
    line-height: 1.4;
}
.tech-apps { margin-top: 24px; }
.tech-app-card {
    text-align: center;
    padding: 24px 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.tech-app-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}
.tech-app-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}

/* ============= 16b. Capability Image (Tech Page) ============= */
.capability-image-wrap {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.capability-image-wrap a {
    display: block;
    transition: var(--transition);
}
.capability-image-wrap a:hover { opacity: 0.92; }
.capability-image-wrap img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}
.capability-image-hint {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-text-muted);
    font-family: var(--font-body);
}

/* ============= 17. Stackup Page ============= */
.stackup-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}
.stackup-figure { margin: 0; }
.stackup-link {
    display: block;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}
.stackup-link:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}
.stackup-link img {
    width: 100%;
    height: auto;
}
.stackup-caption {
    text-align: center;
    margin-top: 16px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}
.stackup-hint {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 12px;
    margin-left: 8px;
}

/* ============= 17b. Showcase Tabs (Homepage) ============= */
.showcase-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    margin: -24px 0 32px;
}

.showcase-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.showcase-tab {
    display: inline-block;
    padding: 10px 28px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
    white-space: nowrap;
    position: relative;
}

.showcase-tab::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 56px);
    height: 2px;
    background: var(--color-primary);
    transition: transform 0.3s ease;
}

.showcase-tab:hover {
    color: var(--color-primary);
}

.showcase-tab:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.showcase-tab.is-active {
    color: #fff;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}

.showcase-tab.is-active::after {
    display: none;
}

.showcase-panel {
    display: none;
    animation: showcaseFadeIn 0.4s ease;
}

.showcase-panel.is-active {
    display: block;
}

@keyframes showcaseFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============= 17c. Capability Table ============= */
.capability-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.capability-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.5;
    min-width: 760px;
    background: #fff;
}

.capability-table thead tr {
    background: #1f4e79;
}

.capability-th-label,
.capability-th {
    color: #fff;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 14px 10px;
    border: 1px solid #1a4068;
    white-space: nowrap;
}

.capability-th-label {
    text-align: left;
    min-width: 180px;
}

.capability-table tbody tr:nth-child(even) {
    background: #f2f2f2;
}

.capability-table tbody tr:nth-child(odd) {
    background: #fff;
}

.capability-row-label {
    background: #d9d9d9 !important;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #c8c8c8;
    vertical-align: middle;
    white-space: nowrap;
}

.capability-td {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text);
    text-align: center;
    padding: 10px 8px;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
}

.capability-td-highlight {
    border: 2px solid #00b050;
    font-weight: 700;
    color: #00783b;
    background: #eafaf0 !important;
}

.capability-merged {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--color-text);
    text-align: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
}

/* Stack-up thumbnails on homepage */
.stackup-grid {
    margin-top: 0;
}

.stackup-thumb {
    display: block;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
}

.stackup-thumb:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.stackup-thumb-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #fff;
}

.stackup-thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    padding: 8px;
}

.stackup-thumb:hover .stackup-thumb-img img {
    transform: scale(1.04);
}

.stackup-thumb-caption {
    display: block;
    text-align: center;
    padding: 12px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

/* ============= 18. Footer ============= */
.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 64px 0 0;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.footer-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    border-radius: var(--radius-sm);
}
.footer-logo-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}
.footer-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin: 0;
}
.footer-col-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}
.footer-links li { margin-bottom: 10px; }
.footer-links li a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    transition: var(--transition);
}
.footer-links li a:hover {
    color: #fff;
    padding-left: 6px;
}
.footer-contact-list li { margin-bottom: 16px; }
.footer-contact-label {
    display: block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.footer-contact-list a,
.footer-contact-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.footer-contact-list a:hover { color: var(--color-primary); }
.footer-copyright {
    background: var(--color-bg-darker);
    padding: 16px 0;
    text-align: center;
}
.footer-copyright p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

/* ============= 19. 404 Page ============= */
.error-404 { padding: 80px 0; }
.error-404-inner {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}
.error-404-code {
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 16px;
}
.error-404-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px;
}
.error-404-text {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.8;
    margin: 0 0 32px;
}

/* ============= 20. Back to Top ============= */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: var(--transition);
    z-index: 9998;
    box-shadow: var(--shadow-md);
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ============= 21. Responsive ============= */
@media (max-width: 1199px) {
    .container { max-width: 960px; }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .container { max-width: 720px; }
    .grid-4,
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .primary-nav { display: none; }
    .nav-toggle { display: flex; }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .hero { min-height: 400px; }
    .hero-content { padding-right: 32px; }
    .product-detail-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-preview-grid { grid-template-columns: 1fr; gap: 32px; }
    .contact-cards { grid-template-columns: repeat(2, 1fr); }
    .tech-stats { gap: 32px; }
    .showcase-tab { padding: 12px 24px; font-size: 14px; }
    .showcase-tabs { flex-wrap: wrap; }
}

@media (max-width: 767px) {
    .container { max-width: 100%; padding: 0 16px; }
    .grid-4,
    .grid-3,
    .grid-2 { grid-template-columns: 1fr; }
    .section { padding: 48px 0; }
    .hero {
        min-height: 300px;
        margin-top: var(--header-height);
    }
    .hero-content {
        right: 16px;
        top: auto;
        bottom: 16px;
        transform: none;
    }
    .hero-cta { flex-direction: column; align-items: flex-end; }
    .hero-cta .btn { text-align: center; }
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    .page-header { padding: 32px 0 24px; }
    .page-title { font-size: 26px; }
    .page-content { padding: 32px 0; }
    .section-title { font-size: 22px; }
    .contact-cards { grid-template-columns: 1fr; }
    .tech-stats {
        flex-direction: column;
        gap: 24px;
        padding: 24px 16px;
    }
    .tech-stat-value { font-size: 28px; }
    .mobile-menu { width: 85%; }
    .error-404-code { font-size: 80px; }
    .error-404-title { font-size: 22px; }
    .site-logo-sub { display: none; }
    .footer-copyright p { font-size: 12px; }
    .product-detail-title { font-size: 26px; }
    .product-detail-desc p { font-size: 19px; text-align: left; }
    .about-paragraph,
    .about-paragraph-1 { font-size: 18px; }
    .about-preview-text p { font-size: 17px; }
    .tech-intro p { font-size: 16px; }
    .contact-intro { font-size: 16px; }
    .showcase-tabs { flex-direction: column; align-items: stretch; }
    .showcase-tab {
        padding: 12px 16px;
        text-align: center;
        border-radius: var(--radius-sm);
        margin-bottom: 8px;
        border: 1px solid var(--color-border);
    }
    .showcase-tab.is-active {
        border-radius: var(--radius-sm);
        margin-bottom: 8px;
    }
    .showcase-subtitle { font-size: 13px; margin: -16px 0 24px; }
    .capability-th-label { min-width: 120px; }
    .capability-th,
    .capability-th-label { padding: 10px 6px; font-size: 12px; }
    .capability-td { padding: 8px 4px; font-size: 11px; }
    .capability-row-label { padding: 8px 8px; font-size: 11px; }
}

@media (max-width: 480px) {
    .site-logo-name { font-size: 14px; }
    .hero-title { font-size: 20px; }
    .btn { padding: 10px 24px; font-size: 13px; }
}
