/* ============================================
   GLOBAL STYLES & RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors - Edit these to change your whole site's color scheme */
    --primary-dark: #1a1a1a;
    --primary-accent: #8B2635;     /* Deep wine/burgundy - luxury feel */
    --primary-light: #F8F5F0;      /* Warm off-white */
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #7a7a7a;
    --border-light: #e8e4dd;
    --background-cream: #F8F5F0;
    --background-white: #ffffff;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Spacing */
    --max-width: 1400px;
    --section-padding: 100px 20px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--background-white);
    overflow-x: hidden;
}

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

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 30px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
    color: var(--primary-accent);
    margin-bottom: 15px;
}

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */
.announcement-bar {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    /* Keep the logo image vertically centered with the menu links and
       sized to fit naturally inside the nav bar. */
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.logo img {
    /* Logo image displays at its original size (50px tall). Change the
       max-height value below to make the logo bigger or smaller. */
    max-height: 50px;
    width: auto;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    /* Knock out any solid-white background baked into the logo file so
       it sits flush on the header. Works for both the JPG and PNG. */
    mix-blend-mode: multiply;
}

.main-nav {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.3s;
}

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

.nav-cta {
    background: var(--primary-dark);
    color: white !important;
    padding: 10px 24px;
    border-radius: 2px;
    transition: background 0.3s;
}

.nav-cta:hover {
    background: var(--primary-accent);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--primary-dark);
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.hero h1 {
    color: white;
    max-width: 700px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 16px 36px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    border-radius: 2px;
}

.btn-primary {
    background: white;
    color: var(--primary-dark);
}

.btn-primary:hover {
    background: var(--primary-accent);
    color: white;
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--primary-dark);
    color: white;
}

.btn-dark:hover {
    background: var(--primary-accent);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 1.5px solid var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary-dark);
    color: white;
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
    background: var(--background-cream);
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-light);
}

.trust-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    /* Three equal columns — one per remaining trust tile. If you ever
       add or remove a tile, update the number below to match. */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.trust-item {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--text-medium);
}

.trust-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 500;
}

/* ============================================
   SECTIONS - GENERAL
   ============================================ */
.section {
    padding: var(--section-padding);
}

.section-cream {
    background: var(--background-cream);
}

.section-dark {
    background: var(--primary-dark);
    color: white;
}

.section-dark h2 {
    color: white;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-top: 20px;
}

/* ============================================
   PRODUCTS GRID (Showcase)
   ============================================ */
.products-section {
    padding: 100px 20px;
}

.filter-bar {
    max-width: var(--max-width);
    margin: 0 auto 50px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1.5px solid var(--border-light);
    cursor: pointer;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

/* Best Sellers — premium filled accent button that draws the eye even
   when not selected. Becomes the standard dark active style on click. */
.filter-btn--bestsellers {
    background: var(--primary-accent);
    color: #fff;
    border-color: var(--primary-accent);
    font-weight: 600;
}
.filter-btn--bestsellers:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Rollpack — dark navy/charcoal outline so it stands apart from the
   plain category filters while still feeling on-brand. */
.filter-btn--rollpack {
    background: transparent;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
    font-weight: 600;
}
.filter-btn--rollpack .filter-btn-icon {
    margin-right: 6px;
    font-size: 0.95em;
}
.filter-btn--rollpack:hover,
.filter-btn--rollpack.active {
    background: var(--primary-dark);
    color: #fff;
}

/* Inline "Rollpack Available" tag shown on product cards in the
   rollpack collection view. Sits between firmness and the name. */
.product-card-rollpack-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 8px;
    padding: 4px 10px;
    background: var(--background-cream);
    color: var(--primary-dark);
    border: 1px solid var(--border-light);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 999px;
    width: fit-content;
}

.products-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.product-card {
    cursor: pointer;
    transition: transform 0.4s;
}

.product-card:hover {
    transform: translateY(-8px);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 4/5;
    /* Cream background fills any space around the contained image so odd
       aspect-ratio photos still look intentional. */
    background: #f8f5f0;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    /* contain (not cover) so the full mattress is always visible. */
    object-fit: contain;
    transition: transform 0.6s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-accent);
    color: white;
    padding: 6px 14px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.product-card-info {
    padding: 0 5px;
}

.product-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.product-card-description {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 12px;
    line-height: 1.5;
}

.product-card-firmness {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-accent);
    margin-bottom: 12px;
    font-weight: 500;
}

.product-card-price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-top: 10px;
}

.product-card-price-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 4px;
}

/* ============================================
   FEATURE SECTIONS (alternating layouts)
   ============================================ */
.feature-section {
    padding: 100px 20px;
}

.feature-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.feature-grid.reverse {
    direction: rtl;
}

.feature-grid.reverse > * {
    direction: ltr;
}

.feature-image {
    aspect-ratio: 4/5;
    background: var(--background-cream);
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-content h2 {
    margin-bottom: 25px;
}

.feature-content p {
    color: var(--text-medium);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* ============================================
   PROBLEM/BENEFIT GRID
   ============================================ */
.benefits-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.benefit-card {
    text-align: center;
    padding: 20px;
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.benefit-card p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* ============================================
   REVIEWS / TESTIMONIALS
   ============================================ */
.reviews-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.review-card {
    background: white;
    padding: 35px 30px;
    border: 1px solid var(--border-light);
}

.review-stars {
    color: var(--primary-accent);
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.review-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.6;
}

.review-author {
    font-size: 0.85rem;
    font-weight: 500;
}

.review-verified {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============================================
   PRESS QUOTES
   ============================================ */
.press-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.press-card {
    text-align: center;
    padding: 30px 20px;
}

.press-publication {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.press-quote {
    font-style: italic;
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ============================================
   FOUNDERS SECTION
   ============================================ */
.founders-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.founder-card {
    text-align: center;
}

.founder-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--background-cream);
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.founder-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-card h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.founder-role {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-accent);
    margin-bottom: 15px;
}

.founder-bio {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.6;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--primary-dark);
    color: white;
    padding: 80px 20px 30px;
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
}

.footer-brand p {
    opacity: 0.7;
    font-size: 0.95rem;
    max-width: 350px;
    line-height: 1.6;
}

.footer-column h4 {
    color: white;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    opacity: 0.7;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.footer-column a:hover {
    opacity: 1;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 20px;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail {
    padding: 60px 20px;
}

.product-detail-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 4/5;
    /* Cream background fills space around the contained image. */
    background: #f8f5f0;
    margin-bottom: 15px;
    overflow: hidden;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    /* contain (not cover) so the full mattress is always visible. */
    object-fit: contain;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-thumbnail {
    aspect-ratio: 1;
    background: var(--background-cream);
    cursor: pointer;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.product-thumbnail.active {
    border-color: var(--primary-dark);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.product-info-firmness {
    display: inline-block;
    background: var(--background-cream);
    padding: 6px 14px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.product-info-description {
    font-size: 1.05rem;
    color: var(--text-medium);
    margin-bottom: 30px;
    line-height: 1.7;
}

.product-info-price {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.product-info-price-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.product-options {
    margin: 30px 0;
}

.product-options h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    padding: 12px 20px;
    border: 1.5px solid var(--border-light);
    background: white;
    font-size: 0.9rem;
}

.product-specs-list {
    margin-top: 40px;
    border-top: 1px solid var(--border-light);
    padding-top: 30px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.spec-row strong {
    color: var(--text-dark);
}

.spec-row span {
    color: var(--text-medium);
    text-align: right;
}

/* ============================================
   RESPONSIVE / MOBILE
   ============================================ */
@media (max-width: 968px) {
    .main-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .main-nav.mobile-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .feature-grid,
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .benefits-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .press-grid,
    .founders-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

    .section {
        padding: 60px 20px;
    }

    .hero {
        height: 70vh;
    }

    .hero-features {
        flex-direction: column;
        gap: 15px;
    }

    .product-gallery {
        position: static;
    }
}

@media (max-width: 600px) {
    .press-grid,
    .founders-grid {
        grid-template-columns: 1fr;
    }

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

/* ============================================
   SHOP BY COLLECTION — banner row of 4 equal-width category cards
   on the homepage. Each card is a full-bleed background photo with
   a dark overlay and a centered white title. Hover slightly zooms
   the photo. Cards stack vertically on mobile.
   ============================================ */

.collection-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    /* Four equal columns — one banner per category in a single row. */
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.collection-card {
    position: relative;
    display: block;
    height: 350px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    /* Subtle lift on hover so the card feels interactive. */
    transition: box-shadow 0.4s ease;
}

.collection-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.collection-card-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    /* Slow zoom on hover for a premium feel. */
    transform: scale(1);
    transition: transform 0.7s ease;
}

.collection-card:hover .collection-card-image {
    transform: scale(1.06);
}

.collection-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

.collection-card-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    /* Slightly smaller than the 2x2 version because each card is now
       narrower (about 1/4 of the page width). The longest label
       ("Edge to Edge Pocketed Coil") still wraps gracefully. */
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-align: center;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Tablet — drop to 2 columns so titles stay readable instead of
   getting squished in 4 narrow columns. */
@media (max-width: 1024px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .collection-card-title {
        font-size: 1.85rem;
    }
}

/* Phone — single column, slightly shorter banners. */
@media (max-width: 600px) {
    .collection-grid {
        grid-template-columns: 1fr;
    }
    .collection-card {
        height: 280px;
    }
    .collection-card-title {
        font-size: 1.75rem;
    }
}

/* ============================================
   SLEEP QUIZ CTA SECTION (homepage)
   Dark, premium two-up split: copy on the left,
   atmospheric photo on the right with a gradient
   blend so the image bleeds into the dark backdrop.
   ============================================ */

.quiz-cta-section {
    background: var(--primary-dark);
    color: white;
    min-height: 550px;
    overflow: hidden;
}

.quiz-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 550px;
}

.quiz-cta-content {
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 640px;
    margin-left: auto;   /* keep the copy block aligned with the page max-width
                            instead of stretching to the screen edge */
}

.quiz-cta-eyebrow {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-accent);
    margin-bottom: 22px;
    font-weight: 600;
}

.quiz-cta-heading {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.1;
    color: white;
    margin: 0 0 24px;
    letter-spacing: 0.01em;
}

.quiz-cta-paragraph {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 460px;
}

.quiz-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 36px;
}

.quiz-cta-features li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-cta-check {
    color: var(--primary-accent);
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* Standalone button (intentionally not using the existing .btn classes
   so the dark-on-dark contrast and size match the editorial section). */
.quiz-cta-button {
    display: inline-block;
    align-self: flex-start;
    background: var(--primary-accent);
    color: white;
    padding: 16px 36px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.quiz-cta-button:hover {
    background: #A12C40;   /* slight lift from --primary-accent on hover */
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.quiz-cta-secondary {
    margin: 22px 0 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
}
.quiz-cta-secondary a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
.quiz-cta-secondary a:hover {
    color: var(--primary-accent);
}

.quiz-cta-visual {
    position: relative;
    overflow: hidden;
    /* Ensures the image fills the cell at every height. */
    min-height: 550px;
}

.quiz-cta-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Left-edge gradient blend — fades the image into the dark left half
   so the seam between copy and photo is invisible. */
.quiz-cta-visual-fade {
    position: absolute;
    inset: 0 auto 0 0;
    width: 30%;
    background: linear-gradient(
        to right,
        var(--primary-dark) 0%,
        rgba(26, 26, 26, 0) 100%
    );
    pointer-events: none;
}

/* Stack on tablet + mobile — copy on top, image below at 300px tall. */
@media (max-width: 900px) {
    .quiz-cta-section {
        min-height: 0;
    }
    .quiz-cta-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .quiz-cta-content {
        padding: 60px 28px 50px;
        max-width: none;
        margin: 0;
    }
    .quiz-cta-heading {
        font-size: 2.2rem;
    }
    .quiz-cta-visual {
        min-height: 0;
        height: 300px;
    }
    /* When stacked, fade from the top edge instead of the left, so the
       seam between copy block and photo blends smoothly. */
    .quiz-cta-visual-fade {
        width: 100%;
        height: 80px;
        background: linear-gradient(
            to bottom,
            var(--primary-dark) 0%,
            rgba(26, 26, 26, 0) 100%
        );
    }
}

/* ============================================
   COMPARISON CTA SECTION (homepage)
   Mirror of .quiz-cta-section — same 550px height
   and 2-column structure, but with a CREAM background,
   image on the LEFT, and a dark site-style CTA button.
   The two sections together form a balanced light/dark
   pair on the homepage.
   ============================================ */

.compare-cta-section {
    background: var(--primary-light);
    color: var(--text-dark);
    min-height: 550px;
    overflow: hidden;
}

.compare-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 550px;
}

.compare-cta-visual {
    position: relative;
    overflow: hidden;
    min-height: 550px;
}
.compare-cta-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right-edge gradient blend — fades the image into the cream right half
   so the seam between photo and copy is invisible. */
.compare-cta-visual-fade {
    position: absolute;
    inset: 0 0 0 auto;
    width: 30%;
    background: linear-gradient(
        to left,
        var(--primary-light) 0%,
        rgba(248, 245, 240, 0) 100%
    );
    pointer-events: none;
}

.compare-cta-content {
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 640px;
    margin-right: auto;   /* mirror of .quiz-cta-content's margin-left:auto */
}

.compare-cta-eyebrow {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-accent);
    margin-bottom: 22px;
    font-weight: 600;
}

.compare-cta-heading {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--text-dark);
    margin: 0 0 24px;
    letter-spacing: 0.01em;
}

.compare-cta-paragraph {
    color: var(--text-medium);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 460px;
}

.compare-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 36px;
}
.compare-cta-features li {
    color: var(--text-dark);
    font-size: 1rem;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.compare-cta-check {
    color: var(--primary-accent);
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* Dark button matching the rest of the site's btn-dark style. Standalone
   so we can keep the editorial padding + tracking consistent with the
   accent-color button in the Sleep Quiz CTA above. */
.compare-cta-button {
    display: inline-block;
    align-self: flex-start;
    background: var(--primary-dark);
    color: white;
    padding: 16px 36px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.compare-cta-button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.compare-cta-secondary {
    margin: 22px 0 0;
    font-size: 0.88rem;
    color: var(--text-medium);
}
.compare-cta-secondary a {
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
.compare-cta-secondary a:hover {
    color: var(--primary-accent);
}

/* Stack on tablet + mobile — image on top at 300px, content below. */
@media (max-width: 900px) {
    .compare-cta-section {
        min-height: 0;
    }
    .compare-cta-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .compare-cta-visual {
        min-height: 0;
        height: 300px;
        /* When stacked, image comes first naturally — already correct DOM order. */
    }
    .compare-cta-content {
        padding: 60px 28px 50px;
        max-width: none;
        margin: 0;
    }
    .compare-cta-heading {
        font-size: 2.2rem;
    }
    /* Rotate the fade from a right-edge horizontal blend to a bottom-edge
       vertical blend so the seam between photo and copy still vanishes. */
    .compare-cta-visual-fade {
        width: 100%;
        height: 80px;
        inset: auto 0 0 0;
        background: linear-gradient(
            to top,
            var(--primary-light) 0%,
            rgba(248, 245, 240, 0) 100%
        );
    }
}

/* ============================================
   LANGUAGE TOGGLE (EN | ES)
   Small pill on the far right of the nav.
   The active language is in the accent color.
   ============================================ */

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 24px;
    padding: 4px 12px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    background: white;
}
.lang-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-medium);
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    padding: 2px 4px;
    transition: color 0.2s ease;
}
.lang-toggle button:hover {
    color: var(--primary-accent);
}
.lang-toggle button.is-active {
    color: var(--primary-accent);
    font-weight: 700;
}
.lang-sep {
    color: var(--text-light);
    user-select: none;
}

@media (max-width: 900px) {
    .lang-toggle {
        margin-left: 0;
        margin-top: 14px;
    }
}
