:root {
    /* Responsive tube translation values - updated via media queries */
    --tube-translate-amount: 20px; /* Default for mobile */
}

@media (min-width: 1024px) {
    :root {
        --tube-translate-amount: 30px; /* Desktop */
    }
}

body {
    font-family: 'Montserrat', sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
}

img[src*="transparentlogo"] {
    background: transparent;
    mix-blend-mode: normal;
}

/* Bottle Wall Pattern Effect */
.bottle-wall-bg {
    background-image: radial-gradient(circle at 50% 50%, rgba(74, 124, 89, 0.4) 10%, transparent 10.5%),
                      radial-gradient(circle at 50% 50%, rgba(74, 111, 165, 0.4) 10%, transparent 10.5%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

.text-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.text-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

.scroll-hide::-webkit-scrollbar {
    display: none;
}

/* Thermos Animation Styles */
.thermos-container { transition: background-color 1s ease; }
.sun-orb { transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.sun-rays { transition: opacity 0.5s ease; }
.thermal-mass-wall { transition: fill 2s ease; }
.snow-flake { transition: opacity 0.5s ease; }

.season-btn { transition: all 0.3s ease; }
.season-btn.active { background-color: #2d2d2d; color: #f3f0e6; }
.dark .season-btn.active { background-color: #f3f0e6; color: #2d2d2d; }

/* Animation Utility Classes */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 1000ms;
}

.origin-top { transform-origin: top; }
.origin-damper { transform-origin: 180px 234px; }
.origin-transom-inner { transform-origin: 290px 135px; }
.origin-transom-outer { transform-origin: 350px 135px; }

/* WINTER DAY/NIGHT CYCLE ANIMATIONS */
@keyframes winter-sun-cycle {
    0%, 40% { transform: translate(0, 0); opacity: 1; }
    50%, 90% { transform: translate(0, 300px); opacity: 0; }
    100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes winter-moon-cycle {
    0%, 40% { opacity: 0; transform: translate(0, 0); }
    50%, 90% { opacity: 1; transform: translate(0, 0); }
    100% { opacity: 0; transform: translate(0, 0); }
}
@keyframes winter-heat-cycle {
    0%, 40% { opacity: 0.5; }
    50%, 90% { opacity: 1; }
    100% { opacity: 0.5; }
}
@keyframes winter-ray-cycle {
    0%, 40% { opacity: 1; }
    45%, 100% { opacity: 0; }
}

/* SUMMER DAY/NIGHT CYCLE ANIMATIONS */
@keyframes summer-sun-cycle {
    0%, 40% { transform: translate(-250px, -80px); opacity: 1; }
    50%, 90% { transform: translate(-250px, 200px); opacity: 0; }
    100% { transform: translate(-250px, -80px); opacity: 1; }
}
@keyframes summer-moon-cycle {
    0%, 40% { opacity: 0; transform: translate(-250px, -80px); }
    50%, 90% { opacity: 1; transform: translate(-250px, -80px); }
    100% { opacity: 0; transform: translate(-250px, -80px); }
}
@keyframes summer-heat-cycle {
    0%, 45% { opacity: 0; }
    50%, 95% { opacity: 0.8; }
    100% { opacity: 0; }
}
@keyframes summer-damper-cycle {
    0%, 40% { transform: rotate(-90deg); }
    50%, 90% { transform: rotate(0deg); }
    100% { transform: rotate(-90deg); }
}
@keyframes summer-transom-cycle {
    0%, 40% { transform: rotate(45deg); }
    50%, 90% { transform: rotate(0deg); }
    100% { transform: rotate(45deg); }
}
@keyframes summer-airflow-cycle {
    0%, 40% { opacity: 1; }
    50%, 90% { opacity: 0; }
    100% { opacity: 1; }
}

/* Quonset Reveal Scoped Styles */
.quonset-reveal {
    position: relative;
    isolation: isolate;
    z-index: 20;
    margin: 120px auto;
    max-width: 1100px;
    padding: 0 16px;
}
.quonset-reveal .qr-spacer {
    height: 12000px;
}
.quonset-reveal .qr-sticky-stage {
    position: sticky;
    top: 10vh;
    width: 100%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 30;
}
.quonset-reveal .qr-label-container {
    position: absolute;
    top: 10%;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 50;
    perspective: 1000px;
}
.quonset-reveal .label-group {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.quonset-reveal .label-group.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.quonset-reveal #label-8 { padding-bottom: 0; }
.quonset-reveal #label-8.active {
    opacity: 1;
    transform: translateY(0) scale(1) !important;
}
.quonset-reveal .label-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--qr-text-primary, #111827);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 20px 40px var(--qr-bg-primary, #f8f9fa);
    -webkit-text-stroke: 1px var(--qr-text-primary, #111827);
    transition: color 0.3s ease, text-shadow 0.3s ease, -webkit-text-stroke 0.3s ease;
}
.quonset-reveal .label-pill {
    background-color: var(--qr-bg-secondary, #ffffff);
    color: var(--qr-text-secondary, #4b5563);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px var(--qr-shadow, rgba(0,0,0,0.1)), 0 2px 4px -1px var(--qr-shadow, rgba(0,0,0,0.1));
    border: 1px solid var(--qr-border, #e5e7eb);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.quonset-reveal .guide-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--qr-guide, #cbd5e1) 0%, transparent 100%);
    margin-bottom: 10px;
    opacity: 0.5;
}
.quonset-reveal svg {
    width: 90%;
    max-width: 900px;
    height: auto;
    max-height: 75vh;
    filter: drop-shadow(0px 40px 60px rgba(0,0,0,0.15));
    overflow: visible;
    transition: transform 0.1s ease-out;
}
#cooling-tubes-static {
    transition: transform 0.6s ease, opacity 0.6s ease;
}
.quonset-reveal .layer-group { will-change: transform, opacity; }
.quonset-reveal .qr-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 60;
    pointer-events: auto;
    background: var(--qr-bg-secondary, #ffffff);
    border: 1px solid var(--qr-border, #e5e7eb);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--qr-shadow, rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}
.quonset-reveal .qr-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--qr-shadow, rgba(0,0,0,0.1));
}
.quonset-reveal .qr-theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--qr-text-primary, #111827);
    transition: fill 0.3s ease, transform 0.3s ease;
}
.quonset-reveal .qr-theme-toggle:hover svg { transform: rotate(15deg); }
.quonset-reveal .sun-icon { display: none; }
.quonset-reveal .moon-icon { display: block; }
.quonset-reveal[data-theme="dark"] .sun-icon { display: block; }
.quonset-reveal[data-theme="dark"] .moon-icon { display: none; }
.quonset-reveal {
    --qr-bg-primary: #f8f9fa;
    --qr-bg-secondary: #ffffff;
    --qr-text-primary: #111827;
    --qr-text-secondary: #4b5563;
    --qr-border: #e5e7eb;
    --qr-shadow: rgba(0, 0, 0, 0.1);
    --qr-guide: #cbd5e1;
}
.quonset-reveal[data-theme="dark"] {
    --qr-bg-primary: #0f1419;
    --qr-bg-secondary: #1a1f26;
    --qr-text-primary: #e7e9ea;
    --qr-text-secondary: #8b98a5;
    --qr-border: #2f3336;
    --qr-shadow: rgba(0, 0, 0, 0.4);
    --qr-guide: #3d4448;
}
.quonset-reveal[data-theme="dark"] svg { filter: drop-shadow(0px 40px 60px rgba(0,0,0,0.5)); }
.quonset-reveal[data-theme="dark"] #layer-1-facade > path:first-child { filter: brightness(0.6); }
.quonset-reveal[data-theme="dark"] #layer-2-outer > path:first-child { fill: #52525b; stroke: #71717a; }
.quonset-reveal[data-theme="dark"] #layer-3-airgap > path:first-child { fill: #3b82f6; stroke: #60a5fa; }
.quonset-reveal[data-theme="dark"] #layer-4-insulation > path:first-child { filter: brightness(0.7); }
.quonset-reveal[data-theme="dark"] #layer-5-greenhouse > path:first-child { filter: brightness(0.6); }
.quonset-reveal[data-theme="dark"] #layer-6-rammed > path:first-child { filter: brightness(0.7); }
.quonset-reveal[data-theme="dark"] #layer-7-inner > path:first-child { fill: #52525b; stroke: #71717a; }
.quonset-reveal[data-theme="dark"] #cooling-tubes-static rect:first-child { fill: #4a3728; }
.quonset-reveal[data-theme="dark"] #cooling-tubes-static text { fill: #71717a; }
.quonset-reveal[data-theme="dark"] #greenhouse-windows rect { fill: rgba(100,150,180,0.25); stroke: #475569; }
@media (max-width: 600px) {
    .quonset-reveal .label-title { font-size: 1.8rem; }
    .quonset-reveal .qr-label-container { top: 15%; }
}

/* Keep later sections beneath the reveal */
#materiality-section,
#designs { position: relative; z-index: 0; }
:root {
    /* Responsive tube translation values - updated via media queries */
    --tube-translate-amount: 20px; /* Default for mobile */
}

@media (min-width: 1024px) {
    :root {
        --tube-translate-amount: 30px; /* Desktop */
    }
}

body {
    font-family: 'Montserrat', sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
}

img[src*="transparentlogo"] {
    background: transparent;
    mix-blend-mode: normal;
}

/* Bottle Wall Pattern Effect */
.bottle-wall-bg {
    background-image: radial-gradient(circle at 50% 50%, rgba(74, 124, 89, 0.4) 10%, transparent 10.5%),
                      radial-gradient(circle at 50% 50%, rgba(74, 111, 165, 0.4) 10%, transparent 10.5%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}

.text-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.text-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

.scroll-hide::-webkit-scrollbar {
    display: none;
}

/* Thermos Animation Styles */
.thermos-container { transition: background-color 1s ease; }
.sun-orb { transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.sun-rays { transition: opacity 0.5s ease; }
.thermal-mass-wall { transition: fill 2s ease; }
.snow-flake { transition: opacity 0.5s ease; }

.season-btn { transition: all 0.3s ease; }
.season-btn.active { background-color: #2d2d2d; color: #f3f0e6; }
.dark .season-btn.active { background-color: #f3f0e6; color: #2d2d2d; }

/* Animation Utility Classes */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 1000ms;
}

.origin-top { transform-origin: top; }
.origin-damper { transform-origin: 180px 234px; }
.origin-transom-inner { transform-origin: 290px 135px; }
.origin-transom-outer { transform-origin: 350px 135px; }

/* WINTER DAY/NIGHT CYCLE ANIMATIONS */
@keyframes winter-sun-cycle {
    0%, 40% { transform: translate(0, 0); opacity: 1; }
    50%, 90% { transform: translate(0, 300px); opacity: 0; }
    100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes winter-moon-cycle {
    0%, 40% { opacity: 0; transform: translate(0, 0); }
    50%, 90% { opacity: 1; transform: translate(0, 0); }
    100% { opacity: 0; transform: translate(0, 0); }
}

@keyframes winter-heat-cycle {
    0%, 40% { opacity: 0.5; }
    50%, 90% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes winter-ray-cycle {
    0%, 40% { opacity: 1; }
    45%, 100% { opacity: 0; }
}

/* SUMMER DAY/NIGHT CYCLE ANIMATIONS */
@keyframes summer-sun-cycle {
    0%, 40% { transform: translate(-250px, -80px); opacity: 1; }
    50%, 90% { transform: translate(-250px, 200px); opacity: 0; }
    100% { transform: translate(-250px, -80px); opacity: 1; }
}

@keyframes summer-moon-cycle {
    0%, 40% { opacity: 0; transform: translate(-250px, -80px); }
    50%, 90% { opacity: 1; transform: translate(-250px, -80px); }
    100% { opacity: 0; transform: translate(-250px, -80px); }
}

@keyframes summer-heat-cycle {
    0%, 45% { opacity: 0; }
    50%, 95% { opacity: 0.8; }
    100% { opacity: 0; }
}

@keyframes summer-damper-cycle {
    0%, 40% { transform: rotate(-90deg); }
    50%, 90% { transform: rotate(0deg); }
    100% { transform: rotate(-90deg); }
}

@keyframes summer-transom-cycle {
    0%, 40% { transform: rotate(45deg); }
    50%, 90% { transform: rotate(0deg); }
    100% { transform: rotate(45deg); }
}

@keyframes summer-airflow-cycle {
    0%, 40% { opacity: 1; }
    50%, 90% { opacity: 0; }
    100% { opacity: 1; }
}

.animate-winter-sun { animation: winter-sun-cycle 12s infinite; }
.animate-winter-moon { animation: winter-moon-cycle 12s infinite; }
.animate-winter-heat { animation: winter-heat-cycle 12s infinite; }
.animate-winter-rays { animation: winter-ray-cycle 12s infinite; }

.animate-summer-sun { animation: summer-sun-cycle 12s infinite; }
.animate-summer-moon { animation: summer-moon-cycle 12s infinite; }
.animate-summer-heat { animation: summer-heat-cycle 12s infinite; }
.animate-summer-damper { animation: summer-damper-cycle 12s infinite; }
.animate-summer-transom { animation: summer-transom-cycle 12s infinite; }
.animate-summer-airflow { animation: summer-airflow-cycle 12s infinite; }

/* Scoped styles for Quonset Reveal */
.quonset-reveal {
    position: relative;
    isolation: isolate;
    z-index: 20;
    margin: 120px auto;
    max-width: 1100px;
    padding: 0 16px;
}
.quonset-reveal .qr-spacer {
    height: 12000px;
}
.quonset-reveal .qr-sticky-stage {
    position: sticky;
    top: 10vh;
    width: 100%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 30;
}
.quonset-reveal .qr-label-container {
    position: absolute;
    top: 10%;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 50;
    perspective: 1000px;
}
.quonset-reveal .label-group {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.quonset-reveal .label-group.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.quonset-reveal #label-8 {
    padding-bottom: 0;
}
.quonset-reveal #label-8.active {
    opacity: 1;
    transform: translateY(0) scale(1) !important;
}
.quonset-reveal .label-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--qr-text-primary, #111827);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 20px 40px var(--qr-bg-primary, #f8f9fa);
    -webkit-text-stroke: 1px var(--qr-text-primary, #111827);
    transition: color 0.3s ease, text-shadow 0.3s ease, -webkit-text-stroke 0.3s ease;
}
.quonset-reveal .label-pill {
    background-color: var(--qr-bg-secondary, #ffffff);
    color: var(--qr-text-secondary, #4b5563);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px var(--qr-shadow, rgba(0,0,0,0.1)), 0 2px 4px -1px var(--qr-shadow, rgba(0,0,0,0.1));
    border: 1px solid var(--qr-border, #e5e7eb);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.quonset-reveal .guide-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--qr-guide, #cbd5e1) 0%, transparent 100%);
    margin-bottom: 10px;
    opacity: 0.5;
}
.quonset-reveal svg {
    width: 90%;
    max-width: 900px;
    height: auto;
    max-height: 75vh;
    filter: drop-shadow(0px 40px 60px rgba(0,0,0,0.15));
    overflow: visible;
    transition: transform 0.1s ease-out;
}
#cooling-tubes-static {
    transition: transform 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}
.quonset-reveal .layer-group {
    will-change: transform, opacity;
}
.quonset-reveal .qr-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 60;
    pointer-events: auto;
    background: var(--qr-bg-secondary, #ffffff);
    border: 1px solid var(--qr-border, #e5e7eb);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--qr-shadow, rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}
.quonset-reveal .qr-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--qr-shadow, rgba(0,0,0,0.1));
}
.quonset-reveal .qr-theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--qr-text-primary, #111827);
    transition: fill 0.3s ease, transform 0.3s ease;
}
.quonset-reveal .qr-theme-toggle:hover svg {
    transform: rotate(15deg);
}
.quonset-reveal .sun-icon { display: none; }
.quonset-reveal .moon-icon { display: block; }
.quonset-reveal[data-theme="dark"] .sun-icon { display: block; }
.quonset-reveal[data-theme="dark"] .moon-icon { display: none; }
.quonset-reveal {
    --qr-bg-primary: #f8f9fa;
    --qr-bg-secondary: #ffffff;
    --qr-text-primary: #111827;
    --qr-text-secondary: #4b5563;
    --qr-border: #e5e7eb;
    --qr-shadow: rgba(0, 0, 0, 0.1);
    --qr-guide: #cbd5e1;
}
.quonset-reveal[data-theme="dark"] {
    --qr-bg-primary: #0f1419;
    --qr-bg-secondary: #1a1f26;
    --qr-text-primary: #e7e9ea;
    --qr-text-secondary: #8b98a5;
    --qr-border: #2f3336;
    --qr-shadow: rgba(0, 0, 0, 0.4);
    --qr-guide: #3d4448;
}
.quonset-reveal[data-theme="dark"] svg {
    filter: drop-shadow(0px 40px 60px rgba(0,0,0,0.5));
}
.quonset-reveal[data-theme="dark"] #layer-1-facade > path:first-child { filter: brightness(0.6); }
.quonset-reveal[data-theme="dark"] #layer-2-outer > path:first-child { fill: #52525b; stroke: #71717a; }
.quonset-reveal[data-theme="dark"] #layer-3-airgap > path:first-child { fill: #3b82f6; stroke: #60a5fa; }
.quonset-reveal[data-theme="dark"] #layer-4-insulation > path:first-child { filter: brightness(0.7); }
.quonset-reveal[data-theme="dark"] #layer-5-greenhouse > path:first-child { filter: brightness(0.6); }
.quonset-reveal[data-theme="dark"] #layer-6-rammed > path:first-child { filter: brightness(0.7); }
.quonset-reveal[data-theme="dark"] #layer-7-inner > path:first-child { fill: #52525b; stroke: #71717a; }
.quonset-reveal[data-theme="dark"] #cooling-tubes-static rect:first-child { fill: #4a3728; }
.quonset-reveal[data-theme="dark"] #cooling-tubes-static text { fill: #71717a; }
.quonset-reveal[data-theme="dark"] #greenhouse-windows rect { fill: rgba(100,150,180,0.25); stroke: #475569; }
@media (max-width: 600px) {
    .quonset-reveal .label-title { font-size: 1.8rem; }
    .quonset-reveal .qr-label-container { top: 15%; }
}

/* Keep later sections beneath the reveal */
#materiality-section,
#designs {
    position: relative;
    z-index: 0;
}

