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

/* General Body Styling */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #faf7f2;
    color: #2d3a2e;
    transition: background-color 1.2s ease;
    overflow-x: hidden;
    scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}
body.dark {
    background-color: #0a0f1a;
}

.desktop {
    display: none;
}

@media (min-width: 1200px) {
    .desktop {
        display: initial;
    }
}

/* ========================= */
/*       DARK MODE TOGGLE     */
/* ========================= */

#dark-toggle {
    position: absolute;
    right: 0;
    z-index: 200;
    background: transparent;
    color: inherit;
    border: none;
    border-radius: 0;
    padding: 10px 12px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: opacity 0.1s ease;
    opacity: 0.75;
    box-shadow: none;
}
#dark-toggle:hover { opacity: 0.25; }
#dark-toggle {
    pointer-events: auto;
}
#dark-toggle.hidden {
    opacity: 0;
    pointer-events: none;
}
@media (min-width: 1200px) {
    #dark-toggle {
        display: none;
    }
}

#dark-toggle-desktop {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 7px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 6px;
    transition: background 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    margin-right: 12px;
}
#dark-toggle-desktop:hover { background: rgba(255,255,255,0.25); }
.dark #dark-toggle-desktop {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.dark #dark-toggle-desktop:hover { background: rgba(255,255,255,0.22); }
@media (min-width: 1200px) {
    #dark-toggle-desktop {
        display: flex;
    }
}

/* ========================= */
/*          HEADER            */
/* ========================= */

header {
    display: grid;
    background-color: #2d3a2e;
    /* Reserve space for left logo and right controls so center nav stays centered */
    grid-template-columns: minmax(140px, auto) 1fr minmax(160px, auto);
    padding: 5px 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    align-items: center;
    transition: background-color 1.2s ease, opacity 0.6s ease;
}

@media (min-width: 1200px) {
    header {
        top: 16px;
        left: 50%;
        transform: translateX(-50%);
        width: min(1400px, 80%);
        border-radius: 50px;
        padding: 8px 36px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    }
}

/* Desktop: give slightly more reserved space to left/right columns */
@media (min-width: 1200px) {
    header { grid-template-columns: minmax(180px, auto) 1fr minmax(220px, auto); }
    header { height: 64px; }
    a.logo { height: 44px; }
    header nav.center a { height: 64px; display: inline-flex; align-items: center; }
}

/* Fade strip below the header — masks content scrolling past */
body::before {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, #faf7f2, transparent);
    z-index: 99;
    pointer-events: none;
    transition: background 1.2s ease, opacity 0.4s ease;
    opacity: 0;
}
@media (min-width: 1200px) {
    body::before {
        opacity: 1;
    }
}
body.dark::before {
    background: linear-gradient(to bottom, #0a0f1a 40%, transparent);
}
body.header-gone::before,
body.nav-open::before {
    opacity: 0;
    transition: background 1.2s ease, opacity 0.2s ease;
}
.dark header {
    background-color: #0a0f1a;
}
header.fading {
    opacity: 0;
    pointer-events: none;
}

/* Logo Styling */
a.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background-color: transparent;
    cursor: pointer;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
}

/* Add a slight left offset so the logo doesn't sit on the rounded edge */
a.logo { margin-left: 6px; }
a.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    mix-blend-mode: lighten;
    transition: transform 0.2s ease;
}
a.logo:hover {
    opacity: 0.92;
}
a.logo:hover img {
    transform: scale(1.15);
}

/* Hamburger button */
#nav-toggle {
    background: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease;
}
#nav-toggle:hover { opacity: 0.7; }
@media (min-width: 1200px) {
    #nav-toggle { display: none; }
}

/* 2-bar → 1-bar animation when drawer opens */
#nav-icon .bar {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
body.nav-open #nav-icon .bar-top {
    opacity: 0;
    transform: translateY(4px);
}
body.nav-open #nav-icon .bar-bottom {
    transform: translateY(-4px);
}

/* Animate 2 bars → 1 bar when drawer is open */
#nav-icon .bar {
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: center;
}
#nav-drawer.open ~ * #nav-icon .bar-top,
body.nav-open #nav-icon .bar-top {
    transform: translateY(4px);
    opacity: 0;
}
body.nav-open #nav-icon .bar-bottom {
    transform: translateY(-4px);
}

/* Side nav drawer */
#nav-drawer {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    z-index: 90;
    background: #1a241b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    pointer-events: none;
}
#nav-drawer.open {
    max-height: 400px;
    padding: 40px 0;
    pointer-events: auto;
}
#nav-drawer a {
    color: #fff;
    text-decoration: none;
    padding: 14px 0;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease;
}
#nav-drawer a:hover { background: rgba(255,255,255,0.06); }
.dark #nav-drawer {
    background: #0a0f1a;
}

header nav.right {
    text-align: right;
    margin-left: auto;
    display: flex;
    align-items: center;
}

header nav.center {
    text-align: center;
}

/* Ensure nav centers in the middle grid column and doesn't wrap */
header nav.center {
    justify-self: center;
    display: flex;
    justify-content: center;
    gap: 24px;
    align-items: center;
}

/* Ensure center nav items don't overflow into logo or controls */
header nav.center a {
    white-space: nowrap;
}

/* Mobile adjustments: keep logo left, nav-toggle right */
@media (max-width: 1199px) {
    header {
        padding: 8px 18px;
        grid-template-columns: auto 1fr auto;
    }
    a.logo { padding-left: 6px; }
    #dark-toggle-desktop { display: none; }
}

/* Mobile: ensure center nav is hidden and hamburger + logo align correctly */
@media (max-width: 900px) {
    header {
        grid-template-columns: auto 1fr auto;
        padding: 8px 12px;
        border-radius: 0 0 12px 12px;
        height: 56px;
    }
    /* hide desktop nav and make sure nav-toggle is visible */
    .center.desktop { display: none !important; }
    #nav-toggle { display: flex; }
    /* logo styling for mobile */
    a.logo { font-size: 0.95rem; padding: 6px 10px; margin-left: 4px; }
}

/* Explicit vertical centering for header children */
/* Remove broad selector to avoid unintended side effects */
/* Desktop header height */
@media (min-width: 1200px) {
    header { height: 64px; }
    a.logo, header nav.center, header nav.right { height: 100%; display: flex; align-items: center; }
    a.logo { padding-left: 12px; }
    header nav.center a { padding: 0 12px; }
}

/* Mobile header height */
@media (max-width: 1199px) {
    header { height: 56px; }
    a.logo, header nav.right { height: 100%; display: flex; align-items: center; }
}

/* Place right controls in the rightmost grid cell */
header nav.right {
    justify-self: end;
}

/* Prevent the text logo from wrapping into multiple lines */
a.logo {
    white-space: nowrap;
    line-height: 1;
}

@media (min-width: 1200px) {
    a.logo { font-size: 1rem; padding: 10px 18px; }
}

/* Limit the center nav width so it stays visually centered between logo and controls */
@media (min-width: 1200px) {
    header nav.center { max-width: 760px; }
}

.center.desktop.links {
    background: transparent;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0 15px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
}
.center.desktop.links:hover { color: #a09b91; }

header nav.center {
    text-align: center;
    padding-top: 0;
    height: 100%;
}

#headerLinks {
    margin-top: 0;
}

/* ========================= */
/*         SECTIONS           */
/* ========================= */

section {
    padding: 6rem 2rem;
    padding-top: 80px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    scroll-margin-top: 60px;
}

section + section {
    margin-top: 0;
}

.content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d3a2e;
}

@media (max-width: 768px) {
    section {
        padding: 4rem 1.5rem;
        padding-top: 80px;
    }

    section h1 {
        font-size: 2rem;
    }

    section p {
        font-size: 1rem;
    }
}

/* ========================= */
/*      ABOUT / HERO          */
/* ========================= */

#aboutsection {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf7f2;
    color: #2d3a2e;
    text-align: center;
    height: 100vh;
    min-height: 600px;
    padding: 60px 2rem 0;
    overflow: visible;
    position: relative;
    transition: background 1.2s ease, color 1.2s ease;
}
.dark #aboutsection {
    background: #0a0f1a;
    color: #ffffff;
}

.hero-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.about-content {
    max-width: 800px;
    text-align: center;
    z-index: 2;
}

/* ---- Neighborhood Infill Animation ---- */

.neighborhood-container {
    width: 100%;
    height: 40vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
    overflow: visible;
}

.neighborhood {
    display: block;
    width: 100%;
    height: 100%;
}

/* Ground plane */
.street        { fill: #b8b3a8; }
.sidewalk-near { fill: #d4cfc6; }
.sidewalk-far  { fill: #d4cfc6; }

/* Existing buildings — sage tones */
.existing-building .face-top    { fill: #4a5d4b; }
.existing-building .face-right  { fill: #2d3a2e; }
.existing-building .face-left   { fill: #1a241b; }

/* Existing building detail elements */
.ctx-window  { fill: #1a241b; }
.left-house-window { fill: #1a241b; }
.ctx-door    { fill: #243026; }
.roof-right  { fill: #3a4d3b; }
.roof-left   { fill: #2d3a2e; }
.chimney     { fill: #4a5d4b; stroke: none; }
.chimney-top { fill: #3a4d3b; stroke: none; }

/* Infill buildings — terracotta / off-white tones */
.infill-base               { fill: #a09b91; }
.infill-building .face-top  { fill: #d4a574; }
.infill-building .face-right { fill: #c4703f; }
.infill-building .face-left  { fill: #8b5e3c; }

.infill-window { fill: #faf7f2; opacity: 0.7; }
.infill-door   { fill: #faf7f2; opacity: 0.5; }

.parapet { fill: #d4a574; opacity: 0.8; }
.balcony { fill: #a09b91; }

.floor-line {
    stroke: rgba(255,255,255,0.15);
    stroke-width: 0.5;
}

/* Empty lot dashed outlines */
.empty-lot {
    fill: rgba(160, 155, 145, 0.15);
    stroke: #a09b91;
    stroke-width: 1;
    stroke-dasharray: 6 4;
    animation: fade-lot 0.4s ease-out 1.2s forwards;
}

/* Existing trees */
.existing-tree ellipse { opacity: 0.9; }

/* ---- Animation sequence (8s loop) ---- */
/* 0:00 - Scene visible, empty lot shown
   0:00.5 - Property boundary traces
   0:02 - Building rises from ground
   0:04 - Details bloom (balconies, landscaping)
   0:05.5 - Window glow, pause, then reset */

/* Property boundary trace */
.property-line {
    fill: none;
    stroke: url(#lot-line-grad);
    stroke-width: 3;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: trace-boundary 1.6s ease-in-out 0.3s forwards;
}

@keyframes trace-boundary {
    to { stroke-dashoffset: 0; }
}

@keyframes fade-lot {
    to { opacity: 0; }
}

/* Building rise (smooth extrude from ground) */
.infill-building {
    transform: translateY(340px);
    opacity: 0;
    animation: grow-up 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1.2s forwards;
}

@keyframes grow-up {
    0%   { transform: translateY(340px); opacity: 0; }
    1%   { opacity: 1; }
    62%  { transform: translateY(-42px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Detail bloom — balconies push out */
.detail-element {
    opacity: 0;
    transform: scale(0.3);
    transform-origin: center bottom;
    animation: bloom-detail 0.4s ease-out 2.8s forwards;
}

@keyframes bloom-detail {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Landscaping springs up after building */
.new-tree, .new-shrub {
    opacity: 0;
    transform: scale(0);
    transform-origin: center bottom;
}

.tree-n1 { animation: plant-tree 0.4s ease-out 3.0s forwards; }
.tree-n2 { animation: plant-tree 0.4s ease-out 3.1s forwards; }
.shrub-1 { animation: plant-tree 0.3s ease-out 3.3s forwards; }
.shrub-2 { animation: plant-tree 0.3s ease-out 3.4s forwards; }
.shrub-3 { animation: plant-tree 0.3s ease-out 3.35s forwards; }

@keyframes plant-tree {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Street trees — planted one-by-one from outer corners inward after park appears */
.street-tree {
    opacity: 0;
    transform: scale(0);
    transform-origin: center bottom;
}

/* Park edge trees — two per side, flanking the back tip */
.st-l1, .st-r1 { animation: plant-tree 0.35s ease-out 4.0s  forwards; }
.st-l2, .st-r2 { animation: plant-tree 0.35s ease-out 4.3s  forwards; }
.st-l3, .st-r3 { animation: plant-tree 0.35s ease-out 4.6s  forwards; }

/* Window glow — warm lights turn on */
.window-glow {
    fill: #f5c96a;
    opacity: 0;
    filter: blur(1.5px);
}

.glow-1 { animation: light-on 0.3s ease-in 3.6s forwards; }
.glow-2 { animation: light-on 0.3s ease-in 3.7s forwards; }
.glow-3 { animation: light-on 0.3s ease-in 3.8s forwards; }
.glow-4 { animation: light-on 0.3s ease-in 3.65s forwards; }
.glow-5 { animation: light-on 0.3s ease-in 3.75s forwards; }
.glow-6 { animation: light-on 0.3s ease-in 3.85s forwards; }
.glow-7 { animation: light-on 0.3s ease-in 3.9s forwards; }
.glow-8 { animation: light-on 0.3s ease-in 4.0s forwards; }

@keyframes light-on {
    to { opacity: 0.85; }
}

/* Park landscaping — fades in after infill building finishes rising */
.park-landscaping {
    opacity: 0;
    animation: park-reveal 1.2s ease-out 2.7s forwards;
}

/* Boarding on left house — visible at start, fades out as landscaping comes in */
.boarding {
    opacity: 1;
    animation: boarding-remove 1.5s ease-out 2.7s forwards;
}
@keyframes boarding-remove {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes park-reveal {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* Golden hour shadow sweep */
.golden-shadow {
    fill: url(#golden-shadow);
    opacity: 0;
    animation: shadow-sweep 1.4s ease-in-out 2.6s forwards;
}

@keyframes shadow-sweep {
    to { opacity: 0.6; }
}

/* People walking along sidewalk */
.person {
    opacity: 0;
}

.person-1 { animation: walk-right-loop 11s linear 4.2s infinite; }
.person-2 { animation: walk-left-loop 12s linear 4.5s infinite; }
.person-5 { animation: walk-left-loop-slow 13s linear 4.8s infinite; }
.person-6 { animation: bike-ride 12s linear 4.8s forwards; }

@keyframes walk-right-loop {
    0%   { opacity: 0; transform: translateX(0) translateY(0); }
    5%   { opacity: 1; }
    80%  { opacity: 1; transform: translateX(400px) translateY(80px); }
    81%  { opacity: 0; transform: translateX(420px) translateY(84px); }
    82%  { opacity: 0; transform: translateX(0) translateY(0); }
    100% { opacity: 0; transform: translateX(0) translateY(0); }
}

@keyframes walk-left-loop {
    0%   { opacity: 0; transform: translateX(0) translateY(0); }
    5%   { opacity: 1; }
    80%  { opacity: 1; transform: translateX(-400px) translateY(80px); }
    81%  { opacity: 0; transform: translateX(-420px) translateY(84px); }
    82%  { opacity: 0; transform: translateX(0) translateY(0); }
    100% { opacity: 0; transform: translateX(0) translateY(0); }
}

@keyframes walk-left-loop-slow {
    0%   { opacity: 0; transform: translateX(0) translateY(0); }
    6%   { opacity: 1; }
    80%  { opacity: 1; transform: translateX(-350px) translateY(70px); }
    81%  { opacity: 0; transform: translateX(-370px) translateY(74px); }
    82%  { opacity: 0; transform: translateX(0) translateY(0); }
    100% { opacity: 0; transform: translateX(0) translateY(0); }
}

@keyframes bike-ride {
    0%   { opacity: 0; transform: translateX(0) translateY(0); }
    2%   { opacity: 1; }
    88%  { opacity: 1; transform: translateX(730px) translateY(146px); }
    100% { opacity: 0; transform: translateX(784px) translateY(157px); }
}

/* Walking leg/arm swing — infinite loop */
/* Person 1 */
.person-1 .leg-l { animation: stride-leg 0.75s ease-in-out 4.2s infinite; }
.person-1 .leg-r { animation: stride-leg-r 0.75s ease-in-out 4.2s infinite; }
.person-1 .arm-l { animation: stride-arm-r 0.75s ease-in-out 4.2s infinite; }
.person-1 .arm-r { animation: stride-arm 0.75s ease-in-out 4.2s infinite; }

/* Person 2 */
.person-2 .leg-l { animation: stride-leg 0.75s ease-in-out 4.5s infinite; }
.person-2 .leg-r { animation: stride-leg-r 0.75s ease-in-out 4.5s infinite; }
.person-2 .arm-l { animation: stride-arm-r 0.75s ease-in-out 4.5s infinite; }
.person-2 .arm-r { animation: stride-arm 0.75s ease-in-out 4.5s infinite; }

/* Person 5 */
.person-5 .leg-l { animation: stride-leg 0.75s ease-in-out 4.8s infinite; }
.person-5 .leg-r { animation: stride-leg-r 0.75s ease-in-out 4.8s infinite; }
.person-5 .arm-l { animation: stride-arm-r 0.75s ease-in-out 4.8s infinite; }
.person-5 .arm-r { animation: stride-arm 0.75s ease-in-out 4.8s infinite; }

/* Cyclist pedaling: rides 12s from 4.8s */
.cyclist .pedal-l { animation: stride-leg 0.35s ease-in-out 4.8s 34 forwards; }
.cyclist .pedal-r { animation: stride-leg-r 0.35s ease-in-out 4.8s 34 forwards; }

/* Full stride: starts neutral → forward → neutral → back → neutral */
@keyframes stride-leg {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(20deg); }
    50%  { transform: rotate(0deg); }
    75%  { transform: rotate(-20deg); }
    100% { transform: rotate(0deg); }
}
@keyframes stride-leg-r {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(-20deg); }
    50%  { transform: rotate(0deg); }
    75%  { transform: rotate(20deg); }
    100% { transform: rotate(0deg); }
}
@keyframes stride-arm {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(15deg); }
    50%  { transform: rotate(0deg); }
    75%  { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}
@keyframes stride-arm-r {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(-15deg); }
    50%  { transform: rotate(0deg); }
    75%  { transform: rotate(15deg); }
    100% { transform: rotate(0deg); }
}

/* Dog legs trot — faster, stops with walker */
.dog-leg-l { animation: stride-leg 0.3s ease-in-out 4.8s 15 forwards; }
.dog-leg-r { animation: stride-leg-r 0.3s ease-in-out 4.8s 15 forwards; }

.about-heading {
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    font-weight: 600;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d3a2e;
    transition: color 1.2s ease;
}
.dark .about-heading { color: #ffffff; }

.about-text {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    margin-bottom: 0;
    line-height: 1.6;
    color: #6b7a6c;
    font-weight: 400;
    transition: color 1.2s ease;
}
.dark .about-text { color: #b0b8c0; }

.about-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 1.5rem;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cta-button.primary {
    background-color: #c4703f;
    color: #fff;
}

.cta-button.primary:hover {
    background-color: #a85d33;
}

.cta-button.secondary {
    background-color: transparent;
    border: 2px solid #2d3a2e;
    color: #2d3a2e;
    transition: border-color 1.2s ease, color 1.2s ease;
}
.dark .cta-button.secondary {
    border-color: #ffffff;
    color: #ffffff;
}

.cta-button.secondary:hover {
    background-color: #f0ece4;
}

@media (max-width: 768px) {
    .cta-button {
        font-size: 0.85rem;
        padding: 10px 22px;
    }

    .about-cta {
        margin-top: 0.8rem;
    }

    .hero-group {
        gap: 0;
    }

    .neighborhood-container {
        width: 130%;
        height: 35vh;
        margin-top: -1rem;
    }
}


/* Store figures — fade in after building lands (2.6s) */
.store-figure {
    opacity: 0;
    animation: figure-fade 1.2s ease-in-out 2.8s forwards;
}
@keyframes figure-fade {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* Cafe tables — fade in half a beat after retail tables (5.5s + 0.5s) */
.cafe-table {
    opacity: 0;
    animation: cafe-appear 0.6s ease-out 6.0s forwards;
}
@keyframes cafe-appear {
    0%   { opacity: 0; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1); }
}

/* Retail building cafe tables — appear as biker passes the building (~0.5s after biker becomes visible) */
.cafe-table-retail {
    opacity: 0;
    animation: cafe-appear 0.6s ease-out 5.5s forwards;
}

/* ---- Street lamps — shown only in dark mode ---- */
.street-lamp {
    opacity: 0;
    transition: opacity 1.2s ease;
}
.dark .street-lamp {
    opacity: 1;
    animation: lamp-flicker 0.6s ease-in 0s forwards;
}
@keyframes lamp-flicker {
    0%   { opacity: 0; }
    30%  { opacity: 1; }
    45%  { opacity: 0.2; }
    60%  { opacity: 1; }
    75%  { opacity: 0.4; }
    100% { opacity: 1; }
}
.lamp-bulb {
    filter: drop-shadow(0 0 6px #ffe060);
}

/* SVG lamp cone — grows when dark mode activates */
.lamp-cone {
    opacity: 0;
    clip-path: inset(0% 0% 100% 0%);
    transition: opacity 0.4s ease;
}
.dark .lamp-cone {
    animation: cone-grow 0.875s ease-out 0.2s forwards;
}
@keyframes cone-grow {
    0%   { opacity: 0;   clip-path: inset(0% 0% 100% 0%); }
    8%   { opacity: 0.9; clip-path: inset(0% 0% 100% 0%); }
    15%  { opacity: 0.2; clip-path: inset(0% 0% 95% 0%); }
    22%  { opacity: 1;   clip-path: inset(0% 0% 88% 0%); }
    100% { opacity: 1;   clip-path: inset(0% 0% 0% 0%); }
}

/* ---- Night mode windows ---- */
.ctx-window {
    transition: fill 0.8s ease;
}
.dark .ctx-window { fill: #f5c842; }

.infill-window {
    transition: fill 0.8s ease, opacity 0.8s ease;
}
.dark .infill-window { fill: #ffe066; opacity: 1; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .infill-building {
        animation: none;
        transform: translateY(0);
        opacity: 1;
    }

    .property-line {
        animation: none;
        stroke-dashoffset: 0;
    }

    .empty-lot {
        animation: none;
        opacity: 0;
    }

    .park-landscaping {
        animation: none;
        opacity: 1;
    }

    .boarding {
        animation: none;
        opacity: 0;
    }

    .street-tree {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }

    .cafe-table,
    .cafe-table-retail,
    .store-figure {
        animation: none;
        opacity: 1;
    }

    .ctx-window { transition: none; }
    .infill-window { transition: none; }

    .detail-element,
    .new-tree,
    .new-shrub {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }

    .window-glow {
        animation: none;
        opacity: 0.85;
    }

    .golden-shadow {
        animation: none;
        opacity: 0.6;
    }

    .person {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .person .leg-l, .person .leg-r,
    .person .arm-l, .person .arm-r,
    .cyclist .pedal-l, .cyclist .pedal-r,
    .dog-leg-l, .dog-leg-r {
        animation: none;
    }
}

/* ========================= */
/*        PROJECTS            */
/* ========================= */

#projectssection {
    text-align: center;
    background-color: #f0ece4;
    transition: background-color 1.2s ease, color 1.2s ease;
}
.dark #projectssection {
    background-color: #0a0f1a;
    color: #ffffff;
}

.projects-heading {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3a2e;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 1.2s ease;
}
.dark .projects-heading { color: #ffffff; }

.projects-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #6b7a6c;
    transition: color 1.2s ease;
}
.dark .projects-text { color: #b0b8c0; }

.projects-grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
}

.project-box {
    display: flex;
    flex-direction: column;
    background-color: #faf7f2;
    border: 1px solid #d4cfc6;
    transition: background-color 1.2s ease, border-color 1.2s ease;
    border-radius: 4px;
    overflow: hidden;
    text-align: center;
    padding: 0;
    width: 340px;
    min-height: 370px;
    transition: box-shadow 0.3s ease;
}

.project-box:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.project-box h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 1rem 0.5rem;
    color: #2d3a2e;
    transition: color 1.2s ease;
}
.dark .project-box h2 { color: #ffffff; }

.project-box p {
    font-size: 0.95rem;
    color: #6b7a6c;
    margin: 0 1rem 1rem;
    transition: color 1.2s ease;
}
.dark .project-box p { color: #b0b8c0; }

/* Photo coming soon placeholder */
.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8e4dd;
    color: #6b7a6c;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 8px;
}
.dark .photo-placeholder {
    background-color: #1e2635;
    color: #b0b8c0;
}

/* Project carousel */
.project-carousel {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.project-carousel .project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.project-carousel .project-image.active {
    opacity: 1;
}

/* Day/night hero image swapping */
.night-hero { display: none; }
.dark .night-hero { display: block; }
.dark .day-hero { display: none; }


.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    border-radius: 2px;
    transition: background 0.2s ease;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-arrow.left {
    left: 8px;
}

.photo-coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0dbd3;
}

.photo-coming-soon span {
    font-size: 0.95rem;
    color: #6b7a6c;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.carousel-arrow.right {
    right: 8px;
}

.project-link {
    margin: auto auto 1.5rem;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3a2e;
    background-color: transparent;
    border: 1px solid #2d3a2e;
    text-decoration: none;
    transition: color 1.2s ease, border-color 1.2s ease;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.5;
}

.project-link:hover {
    background-color: #c4703f;
    border-color: #c4703f;
    color: #fff;
}

/* Project card expand/collapse */
.project-details {
    display: none;
    list-style: none;
    padding: 0;
    margin: 1rem 1.5rem;
    text-align: left;
}

.project-details li {
    font-size: 0.95rem;
    color: #2d3a2e;
    padding: 0.5rem 0;
    border-bottom: 1px solid #d4cfc6;
    transition: color 1.2s ease;
}
.dark .project-details li { color: #ffffff; }
.dark .project-box { background-color: #161d2e; border-color: #2a3550; }
.dark .project-link { color: #ffffff; border-color: #ffffff; }

.project-details li:last-child {
    border-bottom: none;
}

.project-box.expanded .project-carousel {
    display: none;
}

.project-box.expanded .project-details {
    display: block;
}

@media (max-width: 768px) {
    .projects-grid {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .project-box {
        width: 100%;
        max-width: 400px;
    }

    .project-carousel {
        height: 220px;
    }
}

/* ========================= */
/*        STRATEGY            */
/* ========================= */

#strategysection {
    text-align: center;
    background-color: #faf7f2;
}

.strategy-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.strategy-heading {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d3a2e;
}

.strategy-text {
    font-size: 1.1rem;
    color: #6b7a6c;
    margin-bottom: 2rem;
    max-width: 800px;
    line-height: 1.6;
    text-align: center;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 2rem;
}

.strategy-box {
    background-color: #f0ece4;
    border: 1px solid #d4cfc6;
    border-radius: 4px;
    padding: 24px;
    text-align: left;
    color: #2d3a2e;
    transition: box-shadow 0.3s ease;
}

.strategy-box:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.strategy-box h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3a2e;
}

.strategy-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6b7a6c;
}

@media (max-width: 768px) {
    .strategy-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ========================= */
/*         PARTNER            */
/* ========================= */

#partnersection {
    text-align: center;
    background-color: #f0ece4;
}

.partner-content {
    max-width: 800px;
    margin: 0 auto;
}

.partner-heading {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d3a2e;
}

.partner-text {
    font-size: 1.1rem;
    color: #6b7a6c;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.faq {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 800px;
}

.faq-item {
    border-bottom: 1px solid #d4cfc6;
    transition: all 0.3s ease;
}

.faq-item:first-child {
    border-top: 1px solid #d4cfc6;
}

.faq-question {
    background-color: transparent;
    color: #2d3a2e;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    padding: 1.25rem 0;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.faq-question:hover {
    color: #6b7a6c;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease-out;
    padding: 0;
    color: #6b7a6c;
}

.faq-answer p {
    margin: 0;
    padding: 0 0 1.25rem;
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 0;
}

/* ========================= */
/*         CONTACT            */
/* ========================= */

#contactsection {
    background: #faf7f2;
    color: #2d3a2e;
    padding: 6rem 2rem 0;
    text-align: center;
    justify-content: center;
}

.contact-content {
    max-width: 800px;
    text-align: center;
    position: relative;
}

.contact-heading {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d3a2e;
}

.headshot-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 1rem auto 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.contact-text {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2d3a2e;
    font-weight: 500;
}

.contact-details p {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #6b7a6c;
}

.contact-details a {
    color: #2d3a2e;
    text-decoration: none;
    border-bottom: 1px solid #d4cfc6;
    transition: border-color 0.3s ease;
}

.contact-details a:hover {
    color: #c4703f;
    border-color: #c4703f;
}

.bio-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0ece4;
    border-radius: 4px;
    text-align: left;
}

.bio-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3a2e;
}

.bio-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7a6c;
}

@media (max-width: 768px) {
    .contact-heading {
        font-size: 2rem;
    }

    .headshot-container {
        width: 100px;
        height: 100px;
    }

    .bio-section {
        padding: 1rem;
    }

    .bio-heading {
        font-size: 1.1rem;
    }

    .bio-text {
        font-size: 0.9rem;
    }
}

/* ========================= */
/*          FOOTER            */
/* ========================= */

.footer {
    width: 100%;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid #d4cfc6;
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.footer-links a,
.footer-social a {
    color: #6b7a6c;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-social a:hover {
    color: #c4703f;
}

.footer-social {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #a09b91;
}

/* ========================= */
/*     DESKTOP (>1200px)      */
/* ========================= */

@media (min-width: 1200px) {
    section h1 {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }

    .content {
        max-width: 1000px;
    }

    .about-heading {
        font-size: 5rem;
    }

    .about-text {
        font-size: 1.5rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 16px 40px;
    }

    .about-cta {
        gap: 24px;
        margin-top: 2rem;
    }

    .projects-heading {
        font-size: 3rem;
    }

    .projects-text {
        font-size: 1.3rem;
        margin-bottom: 3rem;
    }

    .projects-grid {
        gap: 32px;
    }

    .project-box {
        width: 450px;
    }

    .project-carousel {
        height: 340px;
    }

    .project-box h2 {
        font-size: 1.4rem;
    }

    .project-box p {
        font-size: 1.05rem;
    }

    .strategy-heading {
        font-size: 3rem;
    }

    .strategy-text {
        font-size: 1.3rem;
        max-width: 1000px;
    }

    .strategy-grid {
        gap: 24px;
        grid-template-columns: repeat(3, 1fr);
    }

    .strategy-box {
        padding: 30px;
    }

    .strategy-box h2 {
        font-size: 1.4rem;
    }

    .strategy-box p {
        font-size: 1.05rem;
    }

    .partner-content {
        max-width: 1000px;
    }

    .partner-heading {
        font-size: 3rem;
    }

    .partner-text {
        font-size: 1.3rem;
    }

    .faq {
        max-width: 1000px;
    }

    .faq-question {
        font-size: 1.15rem;
    }

    .contact-heading {
        font-size: 3rem;
    }

    .headshot-container {
        width: 150px;
        height: 150px;
    }

    .contact-text {
        font-size: 1.15rem;
    }

    .contact-details p {
        font-size: 1.1rem;
    }

    .bio-section {
        padding: 2rem;
        max-width: 600px;
    }

    .bio-heading {
        font-size: 1.4rem;
    }

    .bio-text {
        font-size: 1.05rem;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 1rem;
    }

    .footer-links a,
    .footer-social a {
        font-size: 0.85rem;
    }
}
