:root {
    --base-color: #fdf9f0;
    --second-color: #4B4A49; /* Maintained for text readability */
    --surface-color: #f7f0e2; /* Secondary color offset for cards/elements */
    --accent-color: #b3633d;
    --white: #fdf9f0; /* Map white elements to the base to avoid harsh contrast */
    --font-stack: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --accent-font: 'Playfair Display', serif;
    --border-color: rgba(75, 74, 73, 0.15);
    /* UI Grid System */
    --grid-max-width: 1440px;
    --grid-gutter: 24px;
    --grid-margin: 5vw;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--base-color);
    color: var(--second-color);
    font-family: var(--font-stack);
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ========================================================================= */
/* MAIN LAYOUT WRAPPER (Global GRID Constraints)                             */
/* ========================================================================= */
.main-layout-wrapper {
    /* REMOVED: max-width so background bleeds edge-to-edge */
    margin: 0 auto;
    position: relative;
    overflow: visible; /* Changed from clip to allow sticky children */
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--grid-max-width);
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

/* Typography basics */
h2 {
    font-size: min(3rem, 8vw);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

em,
.tag,
.badge {
    font-family: var(--accent-font);
    font-weight: 300;
    font-style: italic;
    color: var(--accent-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 74, 73, 0.3);
    opacity: 0.95;
}


/* Navbar — Fixed Liquid Glass */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: rgba(249, 240, 224, 0.22);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 32px rgba(10, 9, 8, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    width: 100%; 
    max-width: var(--grid-max-width); /* Align precisely with inner content container */
    position: fixed;
    top: 1.25rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 2000;
    transition:
        background 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-radius 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        top 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        max-width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        padding 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Scrolled — expands full width, flattens to a bar */
.navbar-scrolled {
    background: rgba(249, 240, 224, 0.9);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px rgba(10, 9, 8, 0.1);
    border-radius: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 3rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 25px;
    width: auto;
    max-height: 100%;
    object-fit: contain;
    /* Removed default filter: brightness(0) invert(1) */
    transition: filter 0.3s ease;
}

/* Home Navbar Specific: White logo on hero */
.navbar-home:not(.navbar-scrolled) .logo-image {
    filter: brightness(0) invert(1);
}

.navbar-scrolled .logo-image {
    filter: none; /* Logo stays active/black */
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    margin-left: 2rem;
    margin-right: auto;
}

.nav-links a {
    font-family: var(--font-stack);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--second-color); /* Defaults to charcoal */
    transition: opacity 0.2s ease, color 0.2s ease;
}

.navbar-home:not(.navbar-scrolled) .nav-links a {
    color: var(--white); /* White text on hero */
}

.navbar-scrolled .nav-links a {
    color: var(--second-color); /* Stay charcoal on scroll */
}

.nav-links a:hover {
    color: var(--accent-color);
}

.navbar-scrolled .nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a.active {
    color: var(--accent-color);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-login {
    font-family: var(--font-stack);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--second-color);
    transition: color 0.2s ease;
}

.navbar-home:not(.navbar-scrolled) .nav-login {
    color: var(--white); /* White text on hero */
}

.navbar-scrolled .nav-login {
    color: var(--second-color); /* Stay charcoal on scroll */
}

.nav-login:hover {
    color: var(--accent-color);
}

.navbar-scrolled .nav-login:hover {
    color: var(--accent-color);
}

.lang-btn {
    background: transparent;
    color: var(--second-color);
    font-family: var(--font-stack);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    padding: 0;
    display: inline-block;
    transition: all 0.2s ease;
}

.navbar-home:not(.navbar-scrolled) .lang-btn {
    color: var(--white); /* White text on hero */
}

.navbar-scrolled .lang-btn {
    color: var(--second-color); /* Stay charcoal on scroll */
}

.lang-btn:hover {
    color: var(--accent-color);
}

.navbar-scrolled .lang-btn:hover {
    color: var(--accent-color);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--second-color);
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.navbar-home:not(.navbar-scrolled) .mobile-menu-toggle {
    color: var(--white);
}

.navbar-scrolled .mobile-menu-toggle {
    color: var(--second-color);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.mobile-nav-close {
    background: transparent;
    border: none;
    color: var(--second-color);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--second-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-nav-links a:hover {
    color: var(--accent-color);
}

.mobile-nav-links .btn-primary {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

/* Hero Scene — full-width image background */
.hero-scene {
    position: relative;
    width: 100%;
    height: clamp(600px, 100vh, 1000px); /* Reverted aspect-ratio back to clamp without width lock */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Ensure body doesn't overflow horizontally */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Background image layers */
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: opacity;
    /* Prevent image from getting too small or shifting weirdly on mobile */
    min-height: 100%;
    min-width: 100%;
}

.hero-bg-1 {
    background-image: url('../images/hero-bg-1.jpg');
    animation: heroFadeAB 12s ease-in-out infinite;
}

.hero-bg-2 {
    background-image: url('../images/hero-bg-2.jpg.jpg');
    animation: heroFadeBA 12s ease-in-out infinite;
}

/* Ripple crossfade: image 1 is active, image 2 fades in, then swap */
@keyframes heroFadeAB {
    0% {
        opacity: 1;
    }

    40% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    90% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes heroFadeBA {
    0% {
        opacity: 0;
    }

    40% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Subtle dark overlay for text legibility */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(10, 9, 8, 0.35) 0%,
            rgba(10, 9, 8, 0.15) 60%,
            rgba(10, 9, 8, 0.45) 100%);
    z-index: 1;
}

/* Hero content sits above layers */
.hero {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: 12rem var(--grid-margin) 4rem var(--grid-margin); /* Align carefully with .container layout */
    margin: 0 auto;
    max-width: var(--grid-max-width); /* Enforce the master grid boundary inside the bleeding hero */
    width: 100%;
    color: #fff;
    flex-grow: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero h1 {
    font-family: var(--accent-font);
    font-size: min(4.5rem, 12vw);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 2rem;
    color: var(--white);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.hero p {
    font-family: var(--font-stack);
    font-weight: 400;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 800px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.hero-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.hero-logo-corner {
    position: absolute;
    bottom: 4rem; /* Match bottom padding of the hero container */
    /* Calculate right offset: if window > 1440px, (100vw - 1440px) / 2 + margin. If smaller, just the margin */
    right: max(var(--grid-margin), calc(50% - (var(--grid-max-width) / 2) + var(--grid-margin)));
    z-index: 10;
    /* Removed width, aspect ratio, padding, background, borders, and shadows */
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align right to grid edge */
    justify-content: center;
    text-align: right;
    gap: 0.8rem;
}

.hero-logo-corner .corner-logo {
    width: 500px; /* Massively enlarged to match yellow grid box */
    max-width: 90vw; /* Prevent overflow on very small devices */
    height: auto;
    opacity: 0.95; /* Less faded since there's no background */
    transition: opacity 0.3s ease;
}

.hero-logo-corner .corner-text {
    font-family: var(--font-stack);
    color: var(--white);
    font-size: 1.25rem; /* Increased base slightly to balance the massive logo */
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    gap: 1.2rem; /* Spacing between text and the vertical separator */
    opacity: 1; /* Solid text */
    white-space: nowrap; /* Keep on one line */
}

.hero-logo-corner .corner-separator {
    width: 1.5px; /* Vertical separator */
    height: 1.2rem;
    background-color: rgba(255, 255, 255, 0.5);
    display: block;
}

.hero-logo-corner:hover .corner-logo {
    opacity: 1;
}

/* Section Shared Styles */
section {
    padding: 5rem 5%;
}

.grid-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-inline: auto;
}

.grid-header p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Testing is Easy Section */
.testing-section {
    padding: 6rem 5%;
    text-align: center;
    margin-top: 2rem;
}

.section-title {
    font-size: min(3.5rem, 8vw);
    font-weight: 500;
    margin-bottom: 4rem;
    letter-spacing: -1.5px;
}

.section-title em {
    font-style: italic;
    color: var(--accent-color);
}

.testing-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    max-width: 1300px;
    margin: 0 auto 4rem auto;
}

.test-card {
    background-color: transparent; /* Removed background */
    border-radius: 0;
    padding: 2rem 0; /* Adjusted padding for frameless look */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: none; /* Removed shadow and border */
    min-height: 480px;
    user-select: none;
    -webkit-user-select: none;
}

.card-header {
    margin-bottom: 3rem;
    text-align: center;
}

.card-num {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 1rem;
}

.test-card h3 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.test-card p {
    font-size: 0.9rem;
    opacity: 0.6;
}

.card-visual {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Card 1: Calendar */
.visual-calendar {
    gap: 2rem;
    width: 100%;
    transform: scale(1.15);
}

.calendar-days {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 45px;
    transition: all 0.2s ease;
}

.cal-day span {
    font-size: 0.6rem;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 0.25rem;
}

.cal-day strong {
    font-size: 1.1rem;
    font-weight: 500;
}

.cal-day.active {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(75, 74, 73, 0.2);
}

.animate-in .cal-day.active {
    animation: bounceOnce 1s ease-out forwards;
}

@keyframes bounceOnce {
    0% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(75, 74, 73, 0);
    }

    50% {
        transform: translateY(-6px);
        box-shadow: 0 8px 15px rgba(75, 74, 73, 0.3);
    }

    100% {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(75, 74, 73, 0.2);
    }
}

.cal-day.active span {
    opacity: 0.9;
}

.calendar-times {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
    opacity: 0.4;
    transition: opacity 0.5s ease;
}

.animate-in .calendar-times {
    opacity: 1;
}

.time-slot {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.time-slot.active {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

/* Card 2: Graph */
.visual-graph {
    width: 100%;
    position: relative;
    transform: scale(1.1);
    transform-origin: center;
}

.graph-y-axis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.55rem;
    font-weight: 600;
    opacity: 0.4;
    padding: 2.5rem 0;
    /* Align with svg */
}

.graph-y-axis .highlight {
    opacity: 1;
    color: var(--second-color);
}

.graph-area {
    margin-left: 20px;
    width: calc(100% - 20px);
}

/* ── New Zone-Row Graph Layout ── */
.graph-zones {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gz-row {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.gz-row-above {
    min-height: 44px;
}

.gz-row-in {
    min-height: 40px;
}

.gz-row-below {
    min-height: 44px;
}

/* Indicator bars (capsules) */
.gz-bar {
    flex-shrink: 0;
    width: 8px;
    height: 30px;
    border-radius: 4px;
    align-self: center;
}

.gz-bar-empty {
    border: none;
    background: var(--second-color);
}

.gz-bar-filled {
    border: none;
    background: var(--second-color);
}

/* Zone labels */
.gz-label {
    flex-shrink: 0;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    opacity: 0.6;
    white-space: nowrap;
    width: 70px;
    color: var(--text-color);
}

.gz-label-in {
    opacity: 1;
}

/* Zone tracks (background strips) */
.gz-track {
    flex: 1;
    height: 100%;
    align-self: stretch;
    position: relative;
}

/* Extend the backgrounds left to the bar */
.gz-row::before {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 18px;
    /* 8px bar + 10px spacing */
    right: 0;
    border-radius: 4px;
    z-index: -1;
}

.gz-row-above::before {
    background: rgba(200, 50, 50, 0.17);
}

.gz-row-in::before {
    background: rgba(58, 170, 101, 0.22);
    border: 1px dashed rgba(75, 74, 73, 0.15);
    box-sizing: border-box;
}

.gz-row-below::before {
    background: rgba(200, 50, 50, 0.17);
}

/* SVG overlay */
.gz-svg-overlay {
    position: absolute;
    top: 0;
    left: 90px;
    /* bar (8) + gap (12) + label (70) = 90px */
    width: calc(100% - 90px);
    height: 100%;
    overflow: visible;
    z-index: 2;
    pointer-events: none;
}

.animated-line line {
    opacity: 0;
}

.animate-in .animated-line line {
    animation: fadeIn 1s ease 0.5s forwards;
}

.graph-path {
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    fill: none;
}

.graph-path-black {
    stroke: var(--second-color);
}

.animate-in .graph-path-black:nth-of-type(1) {
    animation: drawLine 1.2s ease-out 0.4s forwards;
}

.animate-in .graph-path-black:nth-of-type(2) {
    animation: drawLine 1s ease-out 1.2s forwards;
}

.point {
    opacity: 0;
    transform-origin: center;
    transition: transform 0.2s ease;
}

.point-black-outline {
    fill: #ffffff;
    stroke: var(--second-color);
    stroke-width: 2;
}

.animate-in .point:nth-of-type(1) {
    animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s forwards;
}

.animate-in .point:nth-of-type(2) {
    animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.0s forwards;
}

.animate-in .point:nth-of-type(3) {
    animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.5s forwards;
}

.point-label {
    font-size: 8px;
    fill: var(--text-color);
    font-weight: 700;
    opacity: 0;
}

.animate-in .point:nth-of-type(1)~.point-label:nth-of-type(1) {
    animation: fadeIn 0.3s ease 0.7s forwards;
}

.animate-in .point:nth-of-type(2)~.point-label:nth-of-type(2) {
    animation: fadeIn 0.3s ease 1.2s forwards;
}

.animate-in .point:nth-of-type(3)~.point-label:nth-of-type(3) {
    animation: fadeIn 0.3s ease 1.7s forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Biological Age Card ── */
.visual-bio-age {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.bio-age-card {
    background: transparent;
    border-radius: 0;
    padding: 2rem;
    width: 100%;
    max-width: 320px;
    box-shadow: none;
    text-align: center;
    position: relative;
    border: none;
    overflow: hidden;
}

.bio-age-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--second-color));
    opacity: 0.3; /* Subtle accent line instead of full bar if requested, but user said remove boxes, usually means the main container. I'll keep it subtle. */
}

.bio-age-value {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--accent-font);
}

.bio-age-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--second-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bio-age-subtext {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.bio-age-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.bio-age-date {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.5;
    font-weight: 500;
}

.bio-age-share {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bio-age-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--accent-color);
}

.bio-age-share svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Card 3: Protocol */
.visual-protocol {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.protocol-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
    transform: translateX(30px);
    /* Start shifted to the right */
    opacity: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.animate-in .protocol-item {
    animation: slideInRight 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.animate-in .protocol-item:nth-child(1) {
    animation-delay: 0.2s;
}

.animate-in .protocol-item:nth-child(2) {
    animation-delay: 0.4s;
}

.animate-in .protocol-item:nth-child(3) {
    animation-delay: 0.6s;
}

.icon-box {
    background-color: var(--accent-color);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.animate-in .protocol-item .icon-box {
    animation: floatSubtle 4s ease-in-out forwards;
}

.animate-in .protocol-item:nth-child(2) .icon-box {
    animation-delay: 1s;
}

.animate-in .protocol-item:nth-child(3) .icon-box {
    animation-delay: 2s;
}

@keyframes floatSubtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.item-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.item-text strong {
    font-size: 0.85rem;
    font-weight: 600;
}

.item-text span {
    font-size: 0.75rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Actions */
.testing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    background-color: transparent;
    border: 1px solid var(--second-color);
    color: var(--second-color);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--second-color);
    color: var(--white);
}

/* 3. Monitor Section */
.monitor-section {
    padding: 10rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.monitor-section .position-relative {
    position: relative;
    z-index: 2;
}

.monitor-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 500;
}

.monitor-title em {
    color: var(--accent-color);
    font-style: italic;
    font-weight: 400;
}

.monitor-subheading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5rem;
}

.monitor-subheading span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.check-circle-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.marquee-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-line {
    display: flex;
    width: 100%;
}

.marquee-content {
    flex-shrink: 0;
    min-width: 100%;
    white-space: nowrap;
    font-size: 1.25rem;
    color: rgba(75, 74, 73, 0.6);
    /* Slightly faded second color */
    animation: scroll-left 100s linear infinite;
    padding-right: 1.5rem;
}

.marquee-line.reverse .marquee-content {
    animation: scroll-right 100s linear infinite;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes scroll-right {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* 4. Categories Section */
.categories-section {
    padding: 6rem 5%;
    text-align: center;
}

.rounded-squares-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.square-item,
a.square-item {
    background-color: var(--surface-color);
    border-radius: 32px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 20px rgba(75, 74, 73, 0.08), 0 0 0 1px var(--border-color);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--second-color);
}

.square-item:hover,
a.square-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(75, 74, 73, 0.12), 0 0 0 1px var(--border-color);
    background-color: var(--surface-color);
}

.square-item h3,
a.square-item h3 {
    font-size: clamp(1.05rem, 1.875vw, 1.5rem); /* Scaled down black text by 25% */
    font-weight: 600;
    margin: 0;
}

.square-item .tag,
a.square-item .tag {
    font-size: 1.18rem; /* Enlarged orange fancy text by 25% */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

/* More Square Special Styling */
.square-item.more-square {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(204, 107, 79, 0.25);
}

.square-item.more-square h3 {
    color: var(--white);
    font-weight: 700;
}

.square-item.more-square:hover {
    transform: translateY(-8px);
    background-color: #D27B60;
    /* Slightly lighter orange on hover */
    box-shadow: 0 15px 40px rgba(204, 107, 79, 0.35);
}

/* 5. Scale / Map Section */
.scale-section {
    padding: 6rem 5%;
    text-align: center;
}

.map-container {
    background-color: var(--white);
    border-radius: 40px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03), 0 0 0 1px var(--border-color);
    overflow: hidden;
    padding: 4rem 2rem;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-overlay-text {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.scale-section .section-title {
    font-family: var(--font-stack); /* Base font for regular text */
    font-size: clamp(1.5rem, 4.2vw, 3.2rem); /* Reduced max from 4.2rem to fit single row */
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: -2px; /* Tightened to save space */
    white-space: nowrap; /* Force single row */
    overflow: hidden;
    text-overflow: ellipsis; /* Last resort safety */
}

.scale-section .section-title em {
    font-family: var(--accent-font);
    font-weight: 300;
    font-style: italic;
}

.map-overlay-text h3 {
    font-family: var(--font-stack); /* Base font for regular text */
    font-size: clamp(1.2rem, 3.8vw, 2.8rem); /* Reduced max from 3.8rem to fit single row */
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -1px; /* Tightened to save space */
    white-space: nowrap; /* Force single row */
    overflow: hidden;
    text-overflow: ellipsis; /* Last resort safety */
}

.map-overlay-text h3 em {
    font-family: var(--accent-font);
    font-weight: 300;
    font-style: italic;
    color: var(--accent-color);
}

.map-overlay-text p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.dot-map-container {
    position: relative;
    z-index: 1;
    /* Grid is set inline via JS */
    margin: 3rem auto 0 auto;
    padding: 0 5%;
}

.map-dot {
    width: 90%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    margin: 0 auto;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
}

.map-dot.empty {
    background-color: transparent;
}

.map-dot.regular {
    background-color: #d8c8b8;
    /* Base color for regular dots */
}

/* Random glow effect — dot briefly brightens */
.map-dot.glow {
    background-color: var(--accent-color) !important;
}

.map-dot.regular:hover {
    background-color: var(--accent-color);
    transform: scale(2.0) !important;
    cursor: pointer;
    z-index: 5;
    animation: none !important;
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

@keyframes pulseCityDot {

    0%,
    100% {
        opacity: 1;
        filter: brightness(1.1);
    }

    50% {
        opacity: 0.8;
        filter: brightness(1);
    }
}

/* waveDot removed — map is static with random glow */

/* 6. Comparison Table — Column-Based Flex Layout */
.comparison-section {
    padding: 8rem 5%;
    text-align: center;
}

/* Outer wrapper gives room for Loom to protrude above */
.comparison-table {
    display: flex;
    align-items: stretch;
    /* ALL columns same height — no staircase */
    width: 100%;
    margin: 0 auto;
    padding-top: 50px;
    /* room for Loom to protrude above */
    position: relative;
    overflow: visible;
}

/* ---- All columns share fixed row heights ---- */
.ct-col {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Fixed header height across ALL columns (spacer for non-Loom) */
.ct-header {
    height: 100px;
    /* matched to Standard header text fit */
    flex-shrink: 0;
}

/* Fixed row height for ALL rows — guarantees alignment */
.ct-row {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--second-color);
    flex-shrink: 0;
}

/* ---- Feature Column (left side of the flat table) ---- */
.ct-features {
    background: var(--base-color);
    border-radius: 28px 0 0 28px;
    border: 1px solid var(--border-color);
    border-right: none;
    flex: 1.8;
    /* wider feature column */
}

.ct-features .ct-header {
    background: transparent;
}

.ct-features .ct-row {
    justify-content: flex-start;
    font-size: clamp(1rem, 2vw, 1.3rem); /* Enlarged left table text */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ct-features .ct-row:first-of-type {
    border-top: none;
}

.ct-features .ct-row.ct-last {
    border-radius: 0 0 0 28px;
}

/* ---- Standard Column (right side of the flat table) ---- */
.ct-standard {
    background: var(--base-color);
    border-radius: 0 28px 28px 0;
    border: 1px solid var(--border-color);
    border-left: none;
    flex: 1;
}

.ct-standard .ct-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    height: 100px;
    background: transparent;
    gap: 0;
}

.std-title {
    font-size: 1.64rem;
    font-weight: 700;
    color: var(--second-color);
    opacity: 0.7;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.std-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--second-color);
    opacity: 0.45;
}

.std-count {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--second-color);
    line-height: 1;
    letter-spacing: -2px;
    opacity: 0.5;
    margin-top: 5px;
}

.std-sub {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--second-color);
    opacity: 0.35;
    margin-top: 0.2rem;
}

.ct-standard .ct-row {
    justify-content: center;
}

.ct-standard .ct-row:first-of-type {
    border-top: none;
}

.ct-standard .ct-row.ct-last {
    border-radius: 0 0 28px 0;
}

/* ---- Loom Column (the only thing that pops out) ---- */
.ct-loom {
    background-color: var(--accent-color);
    border-radius: 28px;
    /* fully rounded all sides */
    z-index: 10;
    flex: 1;
    position: relative;
    margin-top: -50px;
    /* protrudes 50px ABOVE the flat table */
    margin-bottom: -18px;
    /* protrudes 18px BELOW the flat table */
    box-shadow:
        0 -20px 60px rgba(204, 107, 79, 0.28),
        0 24px 60px rgba(204, 107, 79, 0.28),
        0 0 30px rgba(204, 107, 79, 0.18);
}

/* Loom header: fills the extra 50px + fixed 80px shared with others */
.ct-header-loom {
    height: 130px;
    /* 80px shared + 50px pop-out = column protrudes cleanly */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex-shrink: 0;
}

.loom-table-logo {
    max-width: 100%; /* Removing hard limit so it fills the column width */
    width: 75%; /* Reduced logo size by 20% on user request */
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 0.95;
    /* Optional slight lift on hover to match the pop-out vibe */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.loom-table-logo:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.loom-tests {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--base-color);
    opacity: 0.7;
}

/* Loom rows — same 72px height as others for alignment */
.ct-loom-row {
    justify-content: center;
    border-top-color: rgba(249, 240, 224, 0.18) !important;
}

/* Score cells — 150+ and 25 numeric comparison row */
.ct-score-cell {
    justify-content: center;
}

.ct-score-value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--base-color);
    letter-spacing: -1px;
    line-height: 1;
}

.ct-score-cell-std {
    justify-content: center;
}

.ct-score-value-std {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--second-color);
    opacity: 0.45;
    letter-spacing: -1px;
    line-height: 1;
}

.ct-row-score {
    font-weight: 600;
    color: var(--second-color);
}

.ct-loom .ct-row:first-of-type {
    border-top: none;
}

.ct-loom .ct-row.ct-last {
    border-bottom: none;
}

/* ---- Icons ---- */
.icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.icon-circle svg {
    width: 20px;
    height: 20px;
}

.ct-loom .icon-circle {
    background-color: rgba(249, 240, 224, 0.25);
    color: var(--base-color);
    box-shadow: 0 4px 12px rgba(204, 107, 79, 0.1);
}

.icon-cross {
    border: 1.5px solid rgba(75, 74, 73, 0.15);
    color: rgba(75, 74, 73, 0.3);
    background-color: rgba(75, 74, 73, 0.02);
}

.ct-loom-row:hover .icon-circle {
    transform: scale(1.1);
}



/* 8. Pricing Section */

.style-pricing {
    padding: 6rem 5%;
    display: flex;
    justify-content: center;
}

.pricing-card {
    background-color: var(--accent-color);
    color: var(--base-color);
    border-radius: 40px;
    padding: 5rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.pricing-card h2 {
    color: var(--base-color);
    margin-bottom: 1rem;
    font-size: min(3rem, 7vw);
}

.pricing-card p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 2.5rem;
}

.pricing-card .price {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    letter-spacing: -2px;
}

.pricing-card .price span {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: normal;
}

.pricing-card .btn-primary {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    background-color: var(--white);
    color: var(--accent-color);
    border-color: var(--white);
}

.pricing-card .btn-primary:hover {
    background-color: var(--base-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Footer (Restored) */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 5% 2rem 5%;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--second-color);
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Base Variable Cleanup */
.white-text {
    color: var(--base-color);
}

.accent-text {
    color: var(--accent-color);
}

.secondary-text {
    color: var(--second-color);
}

/* Responsive */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .nav-actions .btn-primary {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 10rem 5% 4rem 5%;
    }

    .hero h1 {
        font-size: min(3.5rem, 11vw);
    }

    .testing-section {
        padding: 4rem 5%;
    }

    .test-card {
        min-height: auto;
    }

    .testing-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
    }

    .testing-cards-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
}

/* Map Control Button */
#map-control-btn {
    position: absolute;
    bottom: 2rem;
    right: 5%;
    padding: 0.8rem 1.6rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(75, 74, 73, 0.08), 0 0 0 1px var(--border-color);
    color: var(--second-color);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

#map-control-btn:hover {
    background: var(--white);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(75, 74, 73, 0.12), 0 0 0 1px var(--accent-color);
}

#map-control-btn:active {
    transform: translateY(0);
}

#map-control-btn.paused {
    background: rgba(179, 99, 61, 0.1); /* Based on new #b3633d accent */
    border-color: rgba(179, 99, 61, 0.3);
    color: var(--accent-color);
}

/* =========================================
   10. Final CTA & Footer Section
   ========================================= */

.cta-footer-section {
    padding: 12rem 5% 4rem; /* Increased top padding */
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container-cta {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CTA Header Area */
.cta-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 400;
    color: var(--second-color);
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.cta-title em {
    font-style: italic;
    color: var(--accent-color);
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--second-color);
    margin-bottom: 3rem;
    opacity: 0.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 6rem;
}

/* Category Specific Search Styles */
.category-specific-section {
    padding: 6rem 5%;
    text-align: center;
    background-color: var(--base-color);
}

.specific-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    font-style: italic;
    color: var(--second-color);
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.specific-description-window {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--second-color);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .specific-title {
        font-size: 2.2rem;
    }
    .specific-description-window {
        font-size: 1rem;
    }
}

/* Base button styling already exists, tweaking .btn-outline if needed */
.btn-outline {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    color: var(--accent-color);
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-outline:hover {
    background: rgba(204, 107, 79, 0.05);
    /* Slight accent tint */
}

/* Footer Card (Bento Style) */
.footer-card {
    background: transparent; /* Changed from var(--surface-color) */
    border-radius: 0;
    padding: 6rem 0; /* Align directly to margins */
    width: 100%;
    box-shadow: none; /* Removed */
    border: none; /* Removed */
    position: relative;
}

/* Frameless Footer for Category Pages - NO LONGER NEEDED AS GLOBAL IS FRAMELESS */
.bg-female-gradient .footer-card,
.bg-male-gradient .footer-card {
    padding: 0;
}

/* Frameless Footer for Category Pages */
.bg-female-gradient .footer-card,
.bg-male-gradient .footer-card {
    background: none;
    box-shadow: none;
    border: none;
    padding-left: 0;
    padding-right: 0;
}

.footer-top {
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 4rem; /* More space below logo */
}

.footer-logo-image {
    height: 38px;
    width: auto;
    transform: scale(2.0);
    transform-origin: left center;
    position: relative;
    top: 2px; /* Subtle nudge for perfect baseline alignment */
}

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 2fr;
    /* 3 narrow cols, 1 wide col for newsletter */
    gap: 2rem;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--second-color);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-col a {
    text-decoration: none;
    color: var(--second-color);
    opacity: 0.7;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}

.footer-col a:hover {
    opacity: 1;
}

/* Newsletter Section */
.footer-newsletter h3 {
    font-size: 2.8rem; /* Notably larger as per reference */
    font-weight: 500;
    color: var(--second-color);
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.footer-newsletter h3 em {
    font-style: italic;
    color: var(--accent-color);
}

.footer-newsletter p {
    font-size: 0.9rem;
    color: var(--second-color);
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 2rem;
    max-width: 90%;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1.2rem 2.5rem; /* Larger pill */
    border-radius: 9999px;
    border: 1px solid rgba(75, 74, 73, 0.1); /* Softer border */
    background: rgba(255, 255, 255, 0.5); /* Neutral/Soft background */
    font-size: 1rem;
    color: var(--second-color);
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form .btn-outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    padding: 1.2rem 3rem;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: 600;
}

.newsletter-form input:focus {
    background: white;
    border-color: var(--accent-color);
}

.newsletter-form .btn-outline {
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--accent-color);
    padding: 1.2rem 3rem;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Footer Bottom Links */
.footer-bottom {
    display: flex;
    justify-content: flex-start;
}

.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.legal-links a {
    text-decoration: none;
    color: var(--second-color);
    opacity: 0.6;
    font-size: 0.75rem;
    transition: opacity 0.2s ease;
}

.legal-links a:hover {
    opacity: 1;
}

/* Responsive CTA & Footer */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-newsletter {
        grid-column: span 3;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-card {
        padding: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-newsletter {
        grid-column: span 1;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .legal-links {
        gap: 1rem;
        flex-direction: column;
    }
}

/* =========================================
   11. Language Modal
   ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(75, 74, 73, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content.lang-modal-content {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--second-color);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    opacity: 1;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--second-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.lang-option {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    color: var(--second-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.lang-option:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(204, 107, 79, 0.05);
    /* very light accent */
}

.lang-option.active {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

/* How it Works Page Styles */
.hiw-hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: var(--base-color);
}

.hiw-grid-section {
    padding: 9rem 0 8rem;
}

.hiw-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    max-width: 850px;
    margin: 0 auto;
}

.hiw-step-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 4rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 48px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hiw-step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    border-color: var(--accent-color);
}

.hiw-step-card .hiw-step-tag {
    font-family: var(--accent-font);
    font-size: 0.9rem;
    font-weight: 300;
    font-style: italic;
    color: var(--accent-color);
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hiw-step-card h3 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 500;
    color: var(--second-color);
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.hiw-step-card .hiw-subtitle {
    font-size: 1.25rem;
    color: var(--second-color);
    opacity: 0.8;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hiw-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

.hiw-feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 1.15rem;
    color: var(--second-color);
}

.hiw-feature-list .check-icon {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hiw-step-card .btn-primary {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 9999px;
}

/* Map Control Button Polish */
#map-control-btn {
    display: block;
    margin: 3rem auto 0;
    padding: 0.8rem 2rem;
    background: #fff;
    color: var(--second-color);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

#map-control-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#map-control-btn.paused {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Background Gradients for Category Pages */
.bg-female-gradient {
    background-color: var(--base-color);
    background-image: linear-gradient(to bottom, rgba(75, 74, 73, 0.05), var(--base-color) 400px);
    background-attachment: fixed;
}

.bg-male-gradient {
    background-color: var(--base-color);
    background-image: linear-gradient(to bottom, rgba(75, 74, 73, 0.03), var(--base-color) 400px);
    background-attachment: fixed;
}

/* Category Page Hero Card Style (Based on Testing is Easy) */
.category-hero {
    padding-top: 14rem; /* Increased gap from navbar */
    padding-bottom: 8rem;
}

.category-hero-card {
    background-color: transparent;
    border-radius: 0;
    padding: 2rem 0; /* Reduced vertical padding since no box */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: none;
    max-width: 1000px;
    margin: 0 auto;
    border: none;
}

.category-hero-card h1 {
    font-family: var(--accent-font); /* "Fancy" font */
    font-size: clamp(3.125rem, 7.5vw, 5.625rem); /* Increased by 25% (2.5 * 1.25, 6 * 1.25, 4.5 * 1.25) */
    font-weight: 700;
    color: var(--second-color); /* Charcoal */
    margin-bottom: 2rem;
    letter-spacing: -2px;
    line-height: 1;
}

.category-hero-card h1 em {
    font-style: italic;
    color: var(--accent-color); /* Orange */
}

.category-hero-card .mission-text {
    font-size: 1.56rem; /* Increased by 25% (1.25 * 1.25) */
    line-height: 1.7;
    color: var(--second-color);
    opacity: 0.9;
    max-width: 700px; /* Narrowed to fit text in exactly 5 rows at this size */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .category-hero {
        padding-top: 6rem;
    }
    .category-hero-card {
        padding: 3.5rem 2rem;
        border-radius: 24px;
    }
    .category-hero-card h1 {
        font-size: 3rem;
        letter-spacing: -1px;
    }
    .category-hero-card .mission-text {
        font-size: 1.1rem;
    }
    .hiw-grid {
        flex-direction: column;
        padding: 0 2rem;
    }
}

/* Category Pricing Section (Logo Left / Content Right) */
.category-pricing-section {
    padding: 6rem 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

/* Unused pricing window removed */

.pricing-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.pricing-logo-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pricing-logo-col img {
    width: 100%;
    max-width: 530px;
    height: auto;
    opacity: 0.95;
}

.pricing-content-col {
    text-align: left;
    color: var(--second-color);
}

.pricing-content-col h2 {
    font-family: var(--font-stack);
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    white-space: nowrap;
}

.pricing-content-col .pricing-subtitle {
    font-family: var(--font-stack);
    font-size: 1.3rem;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.pricing-content-col .pricing-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.85;
}

.pricing-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.pricing-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 3rem;
    width: 100%;
    margin-top: 1rem;
}

.pricing-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.pricing-buy-btn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1.2rem 4.4rem;
    border-radius: 9999px;
    font-family: var(--font-stack);
    font-size: 1.25rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    text-transform: none;
    white-space: nowrap;
}

.pricing-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 99, 61, 0.3);
    opacity: 0.95;
}

.price-month {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--second-color);
    display: inline-block;
    line-height: 1;
}

.price-year {
    font-size: 2.2rem;
    font-weight: 500;
    display: inline-block;
    padding-top: 0.5rem;
    line-height: 1;
}

@media (max-width: 1100px) {
    .pricing-content-col h2 {
        white-space: normal;
        font-size: 2.22rem;
    }
}

@media (max-width: 992px) {
    .pricing-window {
        padding: 3rem 2rem;
    }
    .pricing-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .pricing-content-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .pricing-content-col h2 {
        font-size: 2rem;
    }
    .pricing-footer {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    .pricing-details {
        align-items: center;
        text-align: center;
    }
    .price-month {
        font-size: 2.6rem;
    }
    .price-year {
        font-size: 1.8rem;
    }
}

/* Category Gallery Section (Scrolling Images) */
.category-gallery-section {
    padding: 6rem 0 12rem 0; /* Increased spacing */
    overflow: hidden;
    width: 100%;
}

.gallery-container {
    padding: 2rem 0;
}

.gallery-track {
    display: flex;
    gap: 2rem;
    animation: scroll-right 40s linear infinite;
    width: max-content;
}

@keyframes scroll-right {
    0% {
        transform: translateX(calc(-50%));
    }
    100% {
        transform: translateX(0);
    }
}

.gallery-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.gallery-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
}

.gallery-category-btn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 90%;
}

/* Pause animation on hover */
.gallery-track:hover {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .gallery-card {
        min-width: 260px;
        max-width: 260px;
        padding: 1rem;
    }
    .gallery-card img {
        height: 180px;
    }
}

/* Category Specific Search Section */
.category-specific-section {
    padding: 8rem 5% 15rem 5%; /* Increased spacing */
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
}

.specific-title {
    font-family: var(--accent-font);
    color: var(--accent-color);
    font-size: 3.8rem;
    margin-bottom: 3rem;
    font-weight: 400;
}

.specific-description-window {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 1rem 0;
    box-shadow: none;
    color: var(--charcoal);
    font-size: 1.69rem; /* Increased by 25% (1.35 * 1.25) */
    line-height: 1.7;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .category-hero {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }
    .membership-section {
        padding: 6rem 5%;
    }
    .category-gallery-section {
        padding: 4rem 0 6rem 0;
    }
    .category-specific-section {
        padding: 4rem 5% 8rem 5%;
    }
    .cta-footer-section {
        padding: 6rem 5% 2.5rem;
    }
    .specific-title {
        font-size: 2.5rem;
    }
    .specific-description-window {
        padding: 2.5rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* How It Works Steps Section */
.hiw-steps-section {
    padding: 10rem 0 4rem 0;
    background-color: var(--base-color);
}

.hiw-steps-section .section-label {
    text-align: center;
    font-family: var(--font-stack);
    letter-spacing: 3px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-color);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.hiw-steps-section .section-title {
    text-align: center;
    margin-bottom: 5rem;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.timeline-wrapper {
    position: relative;
    max-width: 1200px; /* Increased to allow alternating sides */
    margin: 4rem auto 0;
    padding: 4rem 2rem;
}

.timeline-line-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
}

.timeline-line {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--border-color);
    opacity: 0.3;
}

.timeline-progress {
    position: absolute;
    width: 100%;
    height: 0%; /* Dynamic height on scroll */
    background: var(--accent-color);
    transition: height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 20px var(--accent-color), 0 0 40px rgba(204, 107, 79, 0.3);
}

/* Pulsing head dot for the progress line */
.timeline-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-color);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: translate(-50%, 50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, 50%) scale(1.5); opacity: 0.7; }
    100% { transform: translate(-50%, 50%) scale(1); opacity: 1; }
}

.hiw-steps-container {
    display: flex;
    flex-direction: column;
    gap: 12rem; /* Large spacing between steps for narrative flow */
    position: relative;
    z-index: 2;
}

.hiw-step-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    max-width: 480px; /* Reduced from 580px to make text shorter and move right-aligned items further right */
    background-color: transparent;
    border-radius: 0;
    padding: 4.5rem 0;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 1;
    transform: translateY(0);
    box-shadow: none;
    position: relative;
    border: none;
}

.hiw-step-item:hover {
    transform: translateY(-5px);
    /* Removed box-shadow and border-color change */
}

/* Alternating Alignment */
.hiw-step-item:nth-child(odd) {
    align-self: flex-start;
}

.hiw-step-item:nth-child(even) {
    align-self: flex-end;
}

/* Staggered Delays */
.hiw-step-item:nth-child(1) { transition-delay: 0.1s; }
.hiw-step-item:nth-child(2) { transition-delay: 0.2s; }
.hiw-step-item:nth-child(3) { transition-delay: 0.3s; }

/* Active Animation State */
.hiw-step-item.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
    .timeline-wrapper {
        max-width: 600px;
    }
    
    .hiw-step-item {
        align-self: center !important;
        max-width: 100%;
        padding: 3rem 2.5rem;
    }
}

.step-number {
    font-family: var(--accent-font);
    font-size: 4rem;
    font-weight: 300;
    font-style: italic;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.step-divider {
    width: 32px;
    height: 1px;
    background: var(--accent-color);
    margin-bottom: 1.5rem;
    opacity: 0.4;
}

.hiw-step-item h3 {
    font-family: var(--font-stack);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
    color: var(--second-color);
    text-wrap: balance;
}

.hiw-step-item p {
    font-family: var(--font-stack);
    font-size: 0.95rem;
    line-height: 1.75;
    opacity: 0.7;
    color: var(--second-color);
}

@media (max-width: 991px) {
    .timeline-wrapper {
        margin-top: 2rem;
        padding: 2rem 0;
    }

    .hiw-steps-container {
        gap: 6rem;
    }

    .hiw-step-item {
        max-width: 100%;
        padding: 1.5rem;
    }
}

/* Membership Section Styles (Superpower Inspired) */
.membership-section {
    padding: 14rem 5%; /* Increased for consistency */
    display: flex;
    justify-content: center;
    background-color: var(--base-color);
}

.membership-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

/* Visual Column - LOOM 365 Display Frame */
.membership-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px; /* Added for 3D tilt effect */
}

.loom-365-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    max-width: 600px;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none;
    transition: transform 0.1s ease-out; /* Sharper for tracked tilt */
    transform-style: preserve-3d;
    cursor: pointer;
}

.loom-365-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.12));
    transform: translateZ(20px); /* Lift image slightly off the plane */
}

.loom-365-frame::after {
    display: none;
}

.loom-365-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.12));
}

.loom-365-frame:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Content Column - Alignment & Tidy Layout */
.membership-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0; /* Centered visually by grid align-items */
}

/* Removed .value-comparison styles as requested */

/* Unused labels and comparisons removed for tidiness */

.membership-content h2 {
    font-family: var(--font-stack);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1;
    color: var(--second-color);
    margin: 0;
}

.membership-description {
    font-size: 1.2rem;
    color: var(--second-color);
    opacity: 0.8;
    line-height: 1.6;
    max-width: 520px;
}

.membership-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.membership-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--second-color);
}

.membership-features li svg {
    color: var(--accent-color);
    flex-shrink: 0;
}

.membership-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0;
    background: none;
    border: none;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-annual-sub {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--second-color);
    opacity: 0.7;
    margin-left: 0.2rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--second-color);
}

.amount {
    font-size: 4rem;
    font-weight: 700;
    color: var(--second-color);
    letter-spacing: -1px;
}

.period {
    font-size: 1.1rem;
    opacity: 0.6;
    font-weight: 500;
}

.membership-buy-btn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1.4rem 3.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(179, 99, 61, 0.2);
}

.membership-buy-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(179, 99, 61, 0.3);
}

@media (max-width: 1024px) {
    .membership-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .membership-content {
        align-items: center;
    }

    .membership-features {
        justify-content: center;
    }
    
    .membership-section {
        padding: 6rem 5%;
    }
}

/* ========================================================================= */
/* MOBILE EXPERIENCE OPTIMIZATION (< 768px)                                   */
/* ========================================================================= */
@media (max-width: 768px) {
    /* 1. Hero Section Refinement */
    .hero-scene {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .hero {
        padding: 8rem 5% 2rem 5%;
        align-items: center;
        text-align: center;
        flex-grow: 0;
    }

    .hero h1 {
        font-size: min(3rem, 10vw);
        white-space: normal;
        margin-bottom: 1.5rem;
    }

    .hero p {
        font-size: 1.1rem;
        white-space: normal;
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .hero-logo-corner {
        position: relative;
        bottom: auto;
        right: auto;
        left: auto;
        margin: 2rem auto 4rem auto;
        align-items: center;
        text-align: center;
        width: 100%;
        padding: 0 5%;
    }

    .hero-logo-corner .corner-logo {
        width: 280px;
        max-width: 100%;
    }

    .hero-logo-corner .corner-text {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 1.1rem;
    }

    .hero-logo-corner .corner-separator {
        width: 40px;
        height: 1.5px;
    }

    /* 2. 6-Card Grid (Rounded Squares) */
    .rounded-squares-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 1rem;
    }

    .square-item, a.square-item {
        aspect-ratio: auto;
        min-height: 200px;
        padding: 2rem;
    }

    /* 3. Map Section Responsiveness */
    .scale-section {
        padding: 4rem 5%;
    }

    .scale-section .section-title {
        white-space: normal;
        font-size: 1.8rem;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .map-container {
        padding: 3rem 1rem;
        min-height: 400px;
        border-radius: 20px;
        overflow: hidden; /* Safety */
    }

    .dot-map-container {
        transform: scale(min(1, 0.9)); /* Slight scale down to ensure fit */
        transform-origin: center center;
        width: 100%;
        margin-top: 1rem;
    }

    .map-overlay-text h3 {
        font-size: 1.2rem;
    }

    /* 4. Comparison Table Mobile Layout */
    .comparison-section {
        padding: 4rem 2%;
    }

    .comparison-table {
        display: flex;
        flex-direction: row; /* Keep row for comparison */
        overflow-x: auto; /* Allow horizontal scroll */
        -webkit-overflow-scrolling: touch;
        padding: 40px 10px 20px 10px;
        gap: 0;
        scroll-snap-type: x mandatory;
    }

    .ct-col {
        flex: 0 0 85%; /* Slightly wider peek */
        scroll-snap-align: center;
        min-width: 200px; /* Reduced min-width */
    }

    .ct-features {
        flex: 0 0 120px; /* Thinner feature column for mobile */
        position: sticky;
        left: 0;
        z-index: 10;
        background: var(--base-color);
        box-shadow: 5px 0 15px rgba(0,0,0,0.05);
        border-right: 1px solid var(--border-color) !important;
        scroll-snap-align: start;
    }

    .ct-features .ct-row {
        white-space: normal;
        font-size: 0.75rem; /* Smaller text */
        line-height: 1.2;
        padding: 0 0.75rem;
        justify-content: flex-start;
        text-align: left;
    }

    .ct-row {
        height: 64px; /* More compact height */
        padding: 0 0.5rem;
    }

    .ct-loom {
        flex: 0 0 200px; /* Matched to min-width */
        box-shadow: 0 10px 30px rgba(179, 99, 61, 0.15);
        border-radius: 20px;
        margin: 0 8px;
    }

    .ct-standard {
        flex: 0 0 180px;
        border-radius: 20px !important;
        border-left: 1px solid var(--border-color) !important;
    }

    .ct-header {
        height: 80px; /* Compact header */
    }

    .std-title {
        font-size: 1rem;
    }

    .std-count {
        font-size: 1.8rem;
    }

    .ct-score-cell-std .ct-score-value-std {
        font-size: 1.5rem;
    }
}
