/* ============================================
   addrproxy.com - Mid-Century Architectural Bureau
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Libre Franklin', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: #4A3F35;
    background-color: #FFF8EB;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 1000;
    background: rgba(255, 248, 235, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color 300ms ease;
}

#main-nav.scrolled {
    border-bottom-color: rgba(196, 149, 106, 0.3);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compass-rose {
    transition: transform 200ms ease-out;
}

.nav-logotype {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #3B2820;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8B6E4E;
    text-decoration: none;
    transition: color 300ms ease;
}

.nav-link:hover {
    color: #C4956A;
}

/* --- Accent Colors (Rosewood Blush & Civic Teal) --- */
.badge {
    background: #C8847A;
    color: #FFF8EB;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 2px;
}

.accent-teal {
    color: #4A7C7B;
}

/* --- Blueprint Bands --- */
.blueprint-band {
    position: relative;
    background-color: #2C3E50;
    overflow: hidden;
}

.blueprint-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 248, 235, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 248, 235, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 600ms ease;
}

.blueprint-grid.visible {
    opacity: 1;
}

/* --- Model Table Bands --- */
.model-table-band {
    position: relative;
    background: linear-gradient(180deg, #FFF8EB 0%, #F5EDD8 100%);
    padding: 80px 24px 100px;
}

.model-table-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(59, 40, 32, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 40, 32, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* --- Section Dividers --- */
.section-divider {
    text-align: center;
    padding: 20px 0 40px;
    position: relative;
    z-index: 1;
}

.address-block {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: #B8AFA3;
    animation: letterSpacingPulse 4s ease-in-out infinite;
}

.address-block--light {
    color: #A89880;
}

@keyframes letterSpacingPulse {
    0%, 100% { letter-spacing: 0.2em; }
    50% { letter-spacing: 0.22em; }
}

/* --- Section Headers --- */
.section-header {
    max-width: 960px;
    margin: 0 auto 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.section-header h2 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: 52px;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: #3B2820;
    margin-bottom: 24px;
}

.section-intro {
    font-family: 'Libre Franklin', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.65;
    color: #4A3F35;
    max-width: 640px;
    margin: 0 auto;
}

/* --- Hero Section --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 56px;
}

.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 248, 235, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 248, 235, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    clip-path: circle(0% at 50% 50%);
    animation: gridReveal 2s ease-out forwards;
}

@keyframes gridReveal {
    0% { clip-path: circle(0% at 50% 50%); }
    100% { clip-path: circle(150% at 50% 50%); }
}

.contour-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 1.5s ease 1s forwards;
}

.contour-lines svg {
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: 12vw;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: #E8DCC8;
    margin-bottom: 24px;
    min-height: 1.2em;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letterReveal 500ms ease-out forwards;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: #A89880;
    min-height: 1.5em;
}

.typewriter-cursor {
    animation: cursorBlink 800ms step-end infinite;
    color: #C4956A;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Scan Line --- */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #4A7C7B;
    opacity: 0.2;
    animation: scanDown 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanDown {
    0% { top: 0; }
    100% { top: 100%; }
}

/* --- Building Silhouette --- */
.building-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background:
        linear-gradient(to right,
            transparent 0%,
            transparent 3%,
            rgba(255, 248, 235, 0.08) 3%,
            rgba(255, 248, 235, 0.08) 5%,
            transparent 5%,
            transparent 8%,
            rgba(255, 248, 235, 0.06) 8%,
            rgba(255, 248, 235, 0.06) 10%,
            transparent 10%,
            transparent 12%,
            rgba(255, 248, 235, 0.08) 12%,
            rgba(255, 248, 235, 0.08) 16%,
            transparent 16%,
            transparent 18%,
            rgba(255, 248, 235, 0.05) 18%,
            rgba(255, 248, 235, 0.05) 20%,
            transparent 20%,
            transparent 24%,
            rgba(255, 248, 235, 0.07) 24%,
            rgba(255, 248, 235, 0.07) 28%,
            transparent 28%,
            transparent 30%,
            rgba(255, 248, 235, 0.06) 30%,
            rgba(255, 248, 235, 0.06) 32%,
            transparent 32%,
            transparent 35%,
            rgba(255, 248, 235, 0.08) 35%,
            rgba(255, 248, 235, 0.08) 40%,
            transparent 40%,
            transparent 42%,
            rgba(255, 248, 235, 0.05) 42%,
            rgba(255, 248, 235, 0.05) 44%,
            transparent 44%,
            transparent 48%,
            rgba(255, 248, 235, 0.07) 48%,
            rgba(255, 248, 235, 0.07) 51%,
            transparent 51%,
            transparent 54%,
            rgba(255, 248, 235, 0.06) 54%,
            rgba(255, 248, 235, 0.06) 56%,
            transparent 56%,
            transparent 58%,
            rgba(255, 248, 235, 0.08) 58%,
            rgba(255, 248, 235, 0.08) 63%,
            transparent 63%,
            transparent 65%,
            rgba(255, 248, 235, 0.05) 65%,
            rgba(255, 248, 235, 0.05) 67%,
            transparent 67%,
            transparent 70%,
            rgba(255, 248, 235, 0.07) 70%,
            rgba(255, 248, 235, 0.07) 73%,
            transparent 73%,
            transparent 76%,
            rgba(255, 248, 235, 0.06) 76%,
            rgba(255, 248, 235, 0.06) 78%,
            transparent 78%,
            transparent 80%,
            rgba(255, 248, 235, 0.08) 80%,
            rgba(255, 248, 235, 0.08) 84%,
            transparent 84%,
            transparent 86%,
            rgba(255, 248, 235, 0.05) 86%,
            rgba(255, 248, 235, 0.05) 88%,
            transparent 88%,
            transparent 91%,
            rgba(255, 248, 235, 0.07) 91%,
            rgba(255, 248, 235, 0.07) 94%,
            transparent 94%,
            transparent 97%,
            rgba(255, 248, 235, 0.06) 97%,
            rgba(255, 248, 235, 0.06) 100%
        );
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
    mask-image: linear-gradient(to top,
        black 0%,
        black 20%,
        transparent 20%,
        transparent 30%,
        black 30%,
        black 60%,
        transparent 60%,
        transparent 65%,
        black 65%,
        black 100%
    );
    -webkit-mask-image: linear-gradient(to top,
        black 0%,
        black 20%,
        transparent 20%,
        transparent 30%,
        black 30%,
        black 60%,
        transparent 60%,
        transparent 65%,
        black 65%,
        black 100%
    );
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* --- Cards --- */
.card {
    background: #FFF8EB;
    border-radius: 3px;
    box-shadow: 0 4px 16px rgba(139, 109, 78, 0.12);
    border-bottom: 2px solid #C4956A;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition:
        transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 300ms ease,
        border-bottom-width 300ms ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:nth-child(even).visible {
    transform: translateY(40px);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(139, 109, 78, 0.18);
    border-bottom-width: 4px;
}

.card:nth-child(even):hover {
    transform: translateY(32px);
}

.card-image {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #F5EDD8;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(196, 149, 106, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 300ms ease;
}

.card:hover .card-image::after {
    opacity: 1;
}

.city-render {
    width: 100%;
    height: 100%;
    display: block;
}

.card-content {
    padding: 20px 20px 24px;
}

.card-title {
    font-family: 'Libre Franklin', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #3B2820;
    margin-bottom: 10px;
}

.card-text {
    font-family: 'Libre Franklin', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    color: #4A3F35;
}

/* --- Routes Section --- */
#the-routes {
    padding: 100px 24px 120px;
}

.contour-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 600ms ease;
}

.contour-bg.visible {
    opacity: 1;
}

.contour-bg svg {
    width: 100%;
    height: 100%;
}

.routes-content {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.routes-heading {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: 56px;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: #E8DCC8;
    margin-bottom: 40px;
    text-align: center;
}

.routes-text p {
    font-family: 'Libre Franklin', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.65;
    color: #E8DCC8;
    margin-bottom: 24px;
}

.routes-pullquote {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 28px;
    line-height: 1.4;
    color: #D4A86C;
    padding: 32px 0;
    border-left: 3px solid #C4956A;
    padding-left: 28px;
    margin: 40px 0;
}

/* --- Footer --- */
#the-directory {
    padding: 80px 24px 60px;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-address {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-label {
    font-family: 'Libre Franklin', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C4956A;
    margin-bottom: 8px;
}

.footer-line {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #A89880;
    line-height: 1.6;
}

/* --- Fade In Utility --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Card Entry Animations --- */
@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardEnterEven {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(40px);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 16vw;
    }

    .section-header h2 {
        font-size: 36px;
    }

    .routes-heading {
        font-size: 38px;
    }

    .routes-pullquote {
        font-size: 22px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .card:nth-child(even).visible {
        transform: translateY(0);
    }

    .card:nth-child(even):hover {
        transform: translateY(-8px);
    }

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

    .nav-links {
        gap: 16px;
    }

    .nav-link {
        font-size: 11px;
        letter-spacing: 0.08em;
    }

    #the-routes {
        padding: 60px 24px 80px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 20vw;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .routes-heading {
        font-size: 30px;
    }

    .model-table-band {
        padding: 60px 16px 80px;
    }
}
