@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #ffffff;
    /* Pure Studio White */
    --surface-color: #f5f5f7;
    /* Apple-style light gray */
    --text-primary: #1d1d1f;
    /* Jet Black */
    --text-secondary: #59595e;
    /* Darkened for 4.5:1 contrast on surface-color */
    --accent-blue: #0066cc;
    /* Electric Blue */
    --border-color: #d2d2d7;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.1), 0 18px 36px -18px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.47059;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    padding: 0.5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.6rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Technical Blueprint Hero */
.hero-viz {
    background: var(--bg-color);
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
}

.line-art-blueprint {
    width: 100%;
    max-width: 800px;
    height: auto;
    stroke: var(--text-secondary);
    stroke-width: 0.5;
    fill: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-vector {
    width: 60%;
    height: 60%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .card-vector {
    transform: scale(1.1) rotate(2deg);
}

.product-image {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.blueprint-node:hover {
    stroke: var(--accent-blue);
    stroke-width: 1.5;
    cursor: pointer;
}

/* Laboratory Studio Grid */
.studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 6rem;
}

.category-card {
    background: var(--bg-color);
    border: none;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
}

.card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    order: 1;
    /* Title first */
}

/* Test Sub-Grid */
.test-subgrid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: auto;
    order: 3;
    /* Tests third */
}

.test-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: var(--surface-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-item:hover {
    background: #e8e8ed;
    color: var(--text-primary);
}

/* Monetization Slots */
.ad-slot-featured {
    background: var(--surface-color);
    padding: 1rem;
    margin: 0.6rem 0;
    border-radius: 20px;
    text-align: center;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Amazon Gallery Carousel */
.recommendation-carousel {
    padding: 4rem 0;
    background: var(--surface-color);
    margin: 4rem 0;
}

.carousel-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 2rem 0;
    scrollbar-width: none;
    /* Firefox */
}

.carousel-grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.product-card {
    min-width: 260px;
    background: var(--bg-color);
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background: #fdfdfd;
    margin-bottom: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eee;
}

.product-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.buy-button {
    display: inline-block;
    background: var(--accent-blue);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
}

/* E-E-A-T Footer */
.lab-footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 6rem 0 4rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-column p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.expert-bio {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.expert-avatar {
    width: 60px;
    height: 60px;
    background: var(--surface-color);
    border-radius: 50%;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .studio-grid {
        grid-template-columns: 1fr;
    }
}