/**
 * Glowstone - Technical Specification Page
 * Responsive, animated, SEO-friendly
 */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.tech-section,
.tech-cta,
#main-content {
    scroll-margin-top: clamp(70px, 10vw, 90px);
}

/* ===== Hero ===== */
.tech-hero {
    position: relative;
    min-height: 50vh;
    min-height: 50dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Space below fixed navbar — avoids breadcrumb/title sitting under transparent nav */
    padding-top: clamp(80px, 12vw, 108px);
    box-sizing: border-box;
}

.tech-hero-bg {
    position: absolute;
    inset: 0;
    background: #1a1a1a url('../images/DSCF0074.JPG') center 35% / cover no-repeat;
}

.tech-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.55) 0%,
        rgba(15, 15, 15, 0.78) 50%,
        rgba(15, 15, 15, 0.96) 100%
    );
}

.tech-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.tech-breadcrumb {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.tech-breadcrumb a {
    color: var(--navbar-accent);
    text-decoration: none;
}

.tech-breadcrumb a:hover {
    text-decoration: underline;
}

.tech-breadcrumb span {
    color: rgba(232, 228, 223, 0.7);
}

@media (max-width: 576px) {
    .tech-breadcrumb {
        font-size: 0.75rem;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

.tech-hero-content h1 {
    font-size: clamp(2.15rem, 4.75vw, 3.2rem);
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: techFadeInUp 0.7s ease-out;
}

.tech-hero-text {
    font-size: clamp(0.95rem, 1.45vw, 1.08rem);
    color: rgba(232, 228, 223, 0.9);
    line-height: 1.65;
    animation: techFadeInUp 0.7s ease-out 0.15s both;
}

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

/* ===== Section ===== */
.tech-section {
    padding: 4rem 0;
}

.tech-section-heading {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    color: #e8e4df;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ===== Table ===== */
.tech-table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 98, 0.25);
    background: rgba(235, 228, 216, 0.03);
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.tech-table thead {
    background: rgba(201, 169, 98, 0.12);
}

.tech-table th {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8e4df;
    text-align: left;
    border-bottom: 2px solid rgba(201, 169, 98, 0.35);
}

.tech-table tbody tr {
    border-bottom: 1px solid rgba(201, 169, 98, 0.12);
    transition: background 0.25s ease;
}

.tech-table tbody tr:hover {
    background: rgba(235, 228, 216, 0.04);
}

.tech-table tbody tr:last-child {
    border-bottom: none;
}

.tech-table td {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: rgba(232, 228, 223, 0.9);
    line-height: 1.5;
}

.tech-table td:first-child {
    font-weight: 500;
    color: #e8e4df;
}

.tech-table td:nth-child(2) {
    font-size: 0.9rem;
    color: rgba(232, 228, 223, 0.8);
}

.tech-table td:nth-child(3) {
    color: var(--navbar-accent);
}

/* Staggered row animation */
.tech-table tbody tr.animate-on-scroll {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    .tech-table tbody tr.animate-on-scroll,
    .tech-table-wrapper.animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .tech-hero-content h1,
    .tech-hero-text {
        animation: none;
    }
}

.tech-table tbody tr.animate-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.tech-table tbody tr:nth-child(1).animate-on-scroll.visible { transition-delay: 0.1s; }
.tech-table tbody tr:nth-child(2).animate-on-scroll.visible { transition-delay: 0.12s; }
.tech-table tbody tr:nth-child(3).animate-on-scroll.visible { transition-delay: 0.14s; }
.tech-table tbody tr:nth-child(4).animate-on-scroll.visible { transition-delay: 0.16s; }
.tech-table tbody tr:nth-child(5).animate-on-scroll.visible { transition-delay: 0.18s; }
.tech-table tbody tr:nth-child(6).animate-on-scroll.visible { transition-delay: 0.2s; }
.tech-table tbody tr:nth-child(7).animate-on-scroll.visible { transition-delay: 0.22s; }
.tech-table tbody tr:nth-child(8).animate-on-scroll.visible { transition-delay: 0.24s; }
.tech-table tbody tr:nth-child(9).animate-on-scroll.visible { transition-delay: 0.26s; }
.tech-table tbody tr:nth-child(10).animate-on-scroll.visible { transition-delay: 0.28s; }
.tech-table tbody tr:nth-child(11).animate-on-scroll.visible { transition-delay: 0.3s; }
.tech-table tbody tr:nth-child(12).animate-on-scroll.visible { transition-delay: 0.32s; }
.tech-table tbody tr:nth-child(13).animate-on-scroll.visible { transition-delay: 0.34s; }
.tech-table tbody tr:nth-child(14).animate-on-scroll.visible { transition-delay: 0.36s; }
.tech-table tbody tr:nth-child(15).animate-on-scroll.visible { transition-delay: 0.38s; }
.tech-table tbody tr:nth-child(16).animate-on-scroll.visible { transition-delay: 0.4s; }
.tech-table tbody tr:nth-child(17).animate-on-scroll.visible { transition-delay: 0.42s; }
.tech-table tbody tr:nth-child(18).animate-on-scroll.visible { transition-delay: 0.44s; }
.tech-table tbody tr:nth-child(19).animate-on-scroll.visible { transition-delay: 0.46s; }
.tech-table tbody tr:nth-child(20).animate-on-scroll.visible { transition-delay: 0.48s; }
.tech-table tbody tr:nth-child(21).animate-on-scroll.visible { transition-delay: 0.5s; }

/* Table wrapper animation */
.tech-table-wrapper.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.tech-table-wrapper.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CTA ===== */
.tech-cta {
    padding: 4rem 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.5),
        rgba(15, 15, 15, 1)
    );
}

.tech-cta-content {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.tech-cta-content h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    color: #e8e4df;
    margin-bottom: 0.75rem;
}

.tech-cta-content p {
    font-size: 1rem;
    color: rgba(232, 228, 223, 0.85);
    margin-bottom: 1.5rem;
}

.btn-tech {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--navbar-accent);
    color: #0f0f0f;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-tech:hover {
    background: #d4b872;
    color: #0f0f0f;
    transform: translateY(-2px);
}

.btn-tech:focus-visible {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .tech-section {
        padding: 3.5rem 0;
    }
}

@media (max-width: 768px) {
    .tech-hero {
        min-height: 45vh;
        padding-top: 70px;
    }

    .tech-hero-content {
        padding: 1.5rem;
    }

    .tech-section {
        padding: 3rem 0;
    }

    .tech-section-heading {
        margin-bottom: 2rem;
    }

    .tech-table th,
    .tech-table td {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .tech-table {
        min-width: 480px;
    }
}

@media (max-width: 576px) {
    .tech-hero {
        min-height: 40vh;
    }

    .tech-hero-content {
        padding: 1rem;
    }

    .tech-hero-content h1 {
        font-size: 1.85rem;
    }

    .tech-hero-text {
        font-size: 0.95rem;
    }

    .tech-section {
        padding: 2.5rem 0;
    }

    .tech-section-heading {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .tech-table-wrapper {
        border-radius: 8px;
    }

    .tech-table th,
    .tech-table td {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
    }

    .tech-table {
        min-width: 420px;
    }

    .tech-cta {
        padding: 3rem 0;
    }

    .tech-cta-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .tech-table th,
    .tech-table td {
        padding: 0.65rem 0.75rem;
        font-size: 0.75rem;
    }

    .tech-table {
        min-width: 380px;
    }
}

@media (max-width: 360px) {
    .tech-hero {
        min-height: 38vh;
    }

    .tech-hero-content h1 {
        font-size: 1.7rem;
    }

    .tech-hero-text {
        font-size: 0.9rem;
    }

    .tech-section {
        padding: 2rem 0;
    }

    .tech-section-heading {
        font-size: 1.35rem;
        margin-bottom: 1.25rem;
    }

    .tech-table th,
    .tech-table td {
        padding: 0.6rem 0.65rem;
        font-size: var(--text-caption);
    }

    .tech-table {
        min-width: 340px;
    }
}

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .tech-section .container,
    .tech-hero-content {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* Touch-friendly table scroll hint */
.tech-table-wrapper {
    scrollbar-width: thin;
}
