@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
    /* Color System */
    --bg-gallery: #fcfbf9;
    --bg-limestone: #f5f2eb;
    --surface-concrete: #e8e6e1;
    --text-graphite: #2c2c2c;
    --text-charcoal: #4a4a4a;
    --accent-oak: #d9c3b0;
    --accent-brass: #8e7a48;
    --accent-olive: #6b705c;
    --accent-clay: #a85d44;
    --accent-terracotta: #9c413c;

    /* Fonts */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;

    /* Corner Radii */
    --radius-btn: 8px;
    --radius-card: 12px;
    --radius-overlay: 16px;
    --radius-frame: 16px;

    /* Transition Timings */
    --t-micro: 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --t-standard: 400ms cubic-bezier(0.25, 1, 0.5, 1);
    --t-large: 850ms cubic-bezier(0.25, 1, 0.5, 1);

    /* Cursor */
    --cursor-color: var(--text-graphite);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-gallery);
    color: var(--text-graphite);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor to use custom crosshair */
}

/* CUSTOM CURSOR */
.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: var(--cursor-color);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-ring {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(44, 44, 44, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, transform 0.1s ease-out;
}

/* Hover States for Cursor */
body.hovering-interactive .custom-cursor {
    width: 4px;
    height: 4px;
    background-color: var(--accent-brass);
}

body.hovering-interactive .custom-cursor-ring {
    width: 48px;
    height: 48px;
    border-color: var(--accent-brass);
    background-color: rgba(142, 122, 72, 0.05);
}

body.hovering-drag .custom-cursor-ring::after {
    content: 'DRAG';
    font-family: var(--font-sans);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.1em;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-brass);
}

/* LOADING SCREEN */
#loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-gallery);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity var(--t-large) forwards;
}

.loader-line-container {
    width: 200px;
    height: 1px;
    background-color: rgba(44, 44, 44, 0.08);
    position: relative;
    margin-bottom: 24px;
    overflow: hidden;
}

.loader-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: var(--text-graphite);
    animation: drawLine 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.loader-wordmark {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    color: var(--text-graphite);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeWordmark 1.5s cubic-bezier(0.25, 1, 0.5, 1) 0.8s forwards;
}

@keyframes drawLine {
    to { width: 100%; }
}

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

/* NAVIGATION */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px;
    z-index: 900;
    transition: background-color var(--t-standard), backdrop-filter var(--t-standard), border-bottom var(--t-standard);
    border-bottom: 1px solid transparent;
}

.header-nav.scrolled {
    background-color: rgba(252, 251, 249, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(44, 44, 44, 0.05);
}

.logo-container a {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--text-graphite);
    text-decoration: none;
    transition: opacity var(--t-micro);
}

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

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-charcoal);
    text-decoration: none;
    transition: color var(--t-micro);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-brass);
    transition: width var(--t-standard);
}

.nav-links a:hover {
    color: var(--text-graphite);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 1px;
    background-color: var(--text-graphite);
    transition: transform var(--t-standard), opacity var(--t-standard);
}

/* GRID & SECTIONS */
.grid-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 24px;
}

section {
    padding: 120px 0;
    position: relative;
    background-color: var(--bg-gallery);
}

/* HERO SECTION */
.hero-section {
    height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-gallery);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    filter: saturate(0.9) contrast(1.02);
}

/* Dust drifting effect overlay */
.dust-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, rgba(252, 251, 249, 0.4) 100%);
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin-left: 10%;
    padding: 0 24px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--text-graphite);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeReveal var(--t-large) 1s forwards;
}

.hero-sub {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-charcoal);
    max-width: 520px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeReveal var(--t-large) 1.4s forwards;
}

.hero-ctas {
    display: flex;
    gap: 24px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeReveal var(--t-large) 1.8s forwards;
}

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

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-btn);
    transition: background-color var(--t-standard), color var(--t-standard), border-color var(--t-standard), transform var(--t-micro);
}

.btn-primary {
    background-color: var(--text-graphite);
    color: var(--bg-gallery);
    border: 1px solid var(--text-graphite);
}

.btn-primary:hover {
    background-color: var(--accent-brass);
    border-color: var(--accent-brass);
    color: var(--bg-gallery);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-graphite);
    border: 1px solid rgba(44, 44, 44, 0.2);
}

.btn-secondary:hover {
    border-color: var(--text-graphite);
    background-color: rgba(44, 44, 44, 0.03);
}

.btn-text {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-graphite);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color var(--t-micro);
}

.btn-text svg {
    transition: transform var(--t-standard);
}

.btn-text:hover {
    color: var(--accent-brass);
}

.btn-text:hover svg {
    transform: translateX(6px);
}

/* INTRO SECTION */
.intro-section {
    background-color: var(--bg-limestone);
    padding: 140px 0;
}

.intro-image-col {
    grid-column: 2 / span 4;
}

.intro-image-col img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-frame);
    aspect-ratio: 3/4;
}

.intro-content-col {
    grid-column: 7 / span 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-brass);
    margin-bottom: 24px;
}

.intro-text {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.45;
    color: var(--text-graphite);
    margin-bottom: 32px;
}

.intro-author {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-charcoal);
    letter-spacing: 0.05em;
}

/* DESIGN PHILOSOPHY */
.philosophy-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 48px;
}

.philosophy-card {
    background: var(--bg-gallery);
    border: 1px solid rgba(44, 44, 44, 0.05);
    padding: 40px;
    border-radius: var(--radius-card);
    transition: transform var(--t-standard), border-color var(--t-standard);
}

.philosophy-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-oak);
}

.philosophy-icon {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--accent-brass);
    margin-bottom: 24px;
    font-style: italic;
}

.philosophy-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 16px;
    color: var(--text-graphite);
}

.philosophy-card p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-charcoal);
    line-height: 1.6;
}

/* MONOGRAPH PROJECTS */
.monograph-project {
    padding: 160px 0;
    border-bottom: 1px solid rgba(44, 44, 44, 0.05);
}

.project-meta-col {
    grid-column: 1 / span 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-title-area {
    margin-bottom: 48px;
}

.project-question {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-style: italic;
    font-weight: 300;
    color: var(--accent-brass);
    line-height: 1.35;
    margin-bottom: 24px;
}

.project-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 300;
    line-height: 1.1;
    color: var(--text-graphite);
    margin-bottom: 8px;
}

.project-location {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-charcoal);
}

.project-details-list {
    margin-top: auto;
    list-style: none;
}

.project-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(44, 44, 44, 0.08);
    font-size: 0.85rem;
}

.project-details-list .label {
    font-weight: 600;
    color: var(--text-charcoal);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.project-details-list .value {
    color: var(--text-graphite);
}

.project-visual-col {
    grid-column: 6 / span 7;
    position: relative;
    border-radius: var(--radius-frame);
    overflow: hidden;
    background-color: var(--surface-concrete);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

/* INTERACTIVE SLIDER (Villa Sand) */
.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    user-select: none;
}

.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.slider-img-sketch {
    z-index: 10;
}

.slider-img-built {
    z-index: 20;
    width: 50%; /* JS will change this */
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.6);
}

.slider-img-built img {
    width: 100%;
    /* Keep width of image matched to parent container width, not the changing clip-width */
    max-width: none;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 100%;
    margin-left: -20px;
    z-index: 30;
    cursor: ew-resize;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-line {
    width: 1px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.slider-button {
    width: 32px;
    height: 32px;
    background-color: var(--text-graphite);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    margin-top: -16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: background-color 0.2s;
}

.slider-button svg {
    fill: #ffffff;
}

.slider-container:hover .slider-button {
    background-color: var(--accent-brass);
}

/* INTERACTIVE FLOOR PLAN (Villa Sand Drawer) */
.floorplan-drawer {
    grid-column: 1 / -1;
    background-color: var(--bg-limestone);
    border: 1px solid rgba(44, 44, 44, 0.06);
    border-radius: var(--radius-card);
    margin-top: 32px;
    padding: 40px;
    display: none; /* JS toggles display */
    animation: slideDown var(--t-standard) forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.floorplan-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
}

.floorplan-svg-container {
    background: #ffffff;
    padding: 30px;
    border-radius: var(--radius-btn);
    border: 1px solid rgba(44, 44, 44, 0.05);
}

.floorplan-svg-container svg {
    width: 100%;
    height: auto;
}

/* SVG Interactive floorplan styles */
.floorplan-space {
    fill: transparent;
    stroke: rgba(44, 44, 44, 0.15);
    stroke-width: 1;
    transition: fill var(--t-micro), stroke var(--t-micro);
    cursor: pointer;
}

.floorplan-space:hover, .floorplan-space.active {
    fill: rgba(217, 195, 176, 0.2); /* Oak highlight */
    stroke: var(--accent-brass);
    stroke-width: 1.5;
}

.floorplan-walls {
    fill: none;
    stroke: var(--text-graphite);
    stroke-width: 2.5;
}

.floorplan-label-text {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    fill: var(--text-charcoal);
    pointer-events: none;
    letter-spacing: 0.05em;
}

.sun-path-line {
    stroke: var(--accent-brass);
    stroke-dasharray: 4, 4;
    stroke-width: 1;
    opacity: 0.5;
}

.sun-circle {
    fill: var(--accent-brass);
    opacity: 0.8;
}

.floorplan-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.floorplan-info-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-graphite);
    margin-bottom: 16px;
}

.floorplan-info-desc {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-charcoal);
    line-height: 1.65;
    margin-bottom: 24px;
}

.floorplan-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-charcoal);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(44,44,44,0.1);
}

/* DAYLIGHT SIMULATOR (Concrete Pavilion) */
.daylight-simulator {
    width: 100%;
    aspect-ratio: 3/2;
    position: relative;
    overflow: hidden;
}

.daylight-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--t-standard) ease-in-out;
}

.daylight-image.active {
    opacity: 1;
    z-index: 10;
}

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

.daylight-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(252, 251, 249, 0.9);
    backdrop-filter: blur(8px);
    padding: 6px;
    border-radius: 30px;
    display: flex;
    gap: 4px;
    z-index: 30;
    border: 1px solid rgba(44, 44, 44, 0.08);
}

.daylight-btn {
    border: none;
    background: none;
    padding: 8px 18px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-charcoal);
    transition: background-color var(--t-micro), color var(--t-micro);
}

.daylight-btn.active {
    background-color: var(--text-graphite);
    color: var(--bg-gallery);
}

/* MATERIALS LIBRARY */
.materials-section {
    background-color: var(--bg-limestone);
}

.materials-intro {
    grid-column: 1 / -1;
    margin-bottom: 64px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.materials-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.material-card {
    background-color: var(--bg-gallery);
    border-radius: var(--radius-card);
    border: 1px solid rgba(44, 44, 44, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--t-standard), box-shadow var(--t-standard);
}

.material-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.material-card-img {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background-color: var(--surface-concrete);
    position: relative;
}

.material-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-standard), filter var(--t-standard);
}

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

/* Material Daylight Overlay Tones */
.material-daylight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity var(--t-standard), background-color var(--t-standard);
}

/* Light states on overlay class triggers */
.material-card[data-light="morning"] .material-daylight-overlay {
    opacity: 0.35;
    background-color: #cfe2f3; /* Cool soft blue */
}
.material-card[data-light="noon"] .material-daylight-overlay {
    opacity: 0; /* Neutral bright */
}
.material-card[data-light="sunset"] .material-daylight-overlay {
    opacity: 0.45;
    background-color: #fce5cd; /* Warm golden-hour orange */
}

.material-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.material-meta {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--accent-brass);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.material-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text-graphite);
}

.material-card p {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-charcoal);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.material-spec-list {
    border-top: 1px solid rgba(44, 44, 44, 0.08);
    padding-top: 12px;
    list-style: none;
    font-size: 0.75rem;
}

.material-spec-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--text-charcoal);
}

.material-spec-list li span:first-child {
    font-weight: 600;
}

/* RESEARCH LAB */
.research-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    margin-top: 32px;
}

.research-card {
    border: 1px solid rgba(44,44,44,0.06);
    border-radius: var(--radius-card);
    padding: 40px;
    background-color: var(--bg-gallery);
}

.research-card h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 16px;
}

.research-card p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-charcoal);
    line-height: 1.65;
    margin-bottom: 32px;
}

/* Vector Diagram Styles */
.diagram-container {
    width: 100%;
    aspect-ratio: 2/1;
    border: 1px solid rgba(44, 44, 44, 0.06);
    background-color: #ffffff;
    border-radius: var(--radius-btn);
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagram-container svg {
    max-height: 100%;
    width: auto;
}

/* Animated lines for wind patterns */
.wind-path {
    stroke: var(--accent-brass);
    stroke-width: 1.5;
    stroke-dasharray: 6, 40;
    stroke-linecap: round;
    animation: flowWind 4s linear infinite;
}

.wind-path-2 {
    animation-delay: -1.5s;
}

.wind-path-3 {
    animation-delay: -3s;
}

@keyframes flowWind {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -200; }
}

/* Rotating sun for diagram */
.diagram-sun {
    fill: var(--accent-brass);
    opacity: 0.9;
    transform-origin: center;
    animation: pulseSun 4s ease-in-out infinite alternate;
}

@keyframes pulseSun {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* PRACTICE & PEOPLE */
.practice-intro-col {
    grid-column: 1 / span 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.practice-intro-col h2 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 24px;
    line-height: 1.15;
}

.practice-intro-col p {
    font-size: 1rem;
    color: var(--text-charcoal);
    line-height: 1.7;
    margin-bottom: 32px;
}

.practice-image-col {
    grid-column: 7 / span 6;
}

.practice-image-col img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-frame);
    aspect-ratio: 3/2;
    filter: grayscale(100%);
}

.people-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 64px;
}

.profile-card {
    background-color: var(--bg-limestone);
    padding: 32px;
    border-radius: var(--radius-card);
    border: 1px solid rgba(44, 44, 44, 0.04);
}

.profile-img-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 24px;
    background-color: var(--surface-concrete);
    filter: grayscale(100%);
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.profile-role {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent-brass);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.profile-bio {
    font-size: 0.85rem;
    color: var(--text-charcoal);
    line-height: 1.6;
    margin-bottom: 16px;
}

.profile-details {
    border-top: 1px solid rgba(44, 44, 44, 0.08);
    padding-top: 16px;
    font-size: 0.8rem;
    color: var(--text-charcoal);
}

.profile-details p {
    margin-bottom: 6px;
}

.profile-details strong {
    color: var(--text-graphite);
}

/* CLIENT PORTAL (CONCEPT) */
.portal-section {
    background-color: var(--bg-limestone);
}

.portal-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 48px;
    margin-top: 40px;
}

.portal-sidebar {
    background-color: var(--bg-gallery);
    border-radius: var(--radius-card);
    padding: 32px;
    border: 1px solid rgba(44, 44, 44, 0.05);
}

.portal-sidebar-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.portal-timeline {
    margin-top: 32px;
    position: relative;
    padding-left: 20px;
}

.portal-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    width: 1px;
    height: 100%;
    background-color: rgba(44, 44, 44, 0.1);
}

.timeline-step {
    position: relative;
    padding-bottom: 28px;
}

.timeline-step::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -20px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--surface-concrete);
    border: 2px solid var(--bg-gallery);
    outline: 1px solid rgba(44,44,44,0.2);
    transition: background-color 0.3s;
}

.timeline-step.active::before {
    background-color: var(--accent-brass);
    outline-color: var(--accent-brass);
}

.timeline-step.completed::before {
    background-color: var(--accent-olive);
    outline-color: var(--accent-olive);
}

.timeline-step-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-graphite);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-step-desc {
    font-size: 0.8rem;
    color: var(--text-charcoal);
}

.portal-workspace {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pinboard-container {
    width: 100%;
    height: 380px;
    background-color: #fbf9f4; /* Linen look background */
    border: 1px solid rgba(44, 44, 44, 0.06);
    border-radius: var(--radius-card);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.01);
}

.pinboard-header {
    background-color: rgba(44, 44, 44, 0.02);
    padding: 12px 24px;
    border-bottom: 1px solid rgba(44, 44, 44, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-charcoal);
}

/* Draggable Items on Pin-Up Wall */
.pin-item {
    position: absolute;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(44, 44, 44, 0.08);
    cursor: grab;
    user-select: none;
    transition: box-shadow var(--t-micro);
    padding: 12px;
}

.pin-item:active {
    cursor: grabbing;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    z-index: 100;
}

.pin-item-sketch {
    width: 140px;
    border-radius: 2px;
    transform: rotate(-2deg);
}

.pin-item-sketch img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 8px;
}

.pin-item-note {
    width: 120px;
    background-color: #fffdf0; /* Sticky warm yellow note */
    transform: rotate(3deg);
    padding: 16px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-graphite);
    border-left: 2px solid var(--accent-brass);
}

.pin-item-swatch {
    width: 90px;
    padding: 6px;
    transform: rotate(-1.5deg);
}

.swatch-color {
    width: 100%;
    height: 60px;
    background-color: var(--accent-oak);
    border-radius: 2px;
    margin-bottom: 6px;
}

.swatch-color.stone {
    background-color: var(--bg-limestone);
}

.swatch-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-charcoal);
}

/* EDITORIAL JOURNAL */
.journal-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.journal-card {
    background: var(--bg-gallery);
    border: 1px solid rgba(44, 44, 44, 0.05);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform var(--t-standard), border-color var(--t-standard);
}

.journal-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-brass);
}

.journal-card-img {
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background-color: var(--surface-concrete);
}

.journal-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85);
    transition: transform var(--t-standard);
}

.journal-card:hover .journal-card-img img {
    transform: scale(1.03);
}

.journal-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.journal-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-brass);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.journal-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-graphite);
}

.journal-card p {
    font-size: 0.85rem;
    color: var(--text-charcoal);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.journal-readmore {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-graphite);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: color 0.2s;
}

.journal-card:hover .journal-readmore {
    color: var(--accent-brass);
}

/* CONTACT & INVITATION SECTION */
.contact-section {
    background-color: var(--bg-limestone);
    padding: 160px 0;
}

.invite-content-col {
    grid-column: 1 / span 5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.invite-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 24px;
}

.invite-desc {
    font-size: 0.95rem;
    color: var(--text-charcoal);
    line-height: 1.7;
    margin-bottom: 40px;
}

.invite-img-container {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-frame);
    overflow: hidden;
    background-color: var(--surface-concrete);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.invite-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-form-col {
    grid-column: 7 / span 6;
    background-color: var(--bg-gallery);
    border: 1px solid rgba(44, 44, 44, 0.05);
    border-radius: var(--radius-card);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.02);
}

/* Letter style correspondence form */
.correspondence-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-row {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-charcoal);
    margin-bottom: 8px;
}

.form-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(44, 44, 44, 0.15);
    padding: 10px 0;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--text-graphite);
    transition: border-bottom-color var(--t-standard), outline var(--t-standard);
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--accent-brass);
}

textarea.form-input {
    resize: none;
    height: 100px;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* FORM ERROR & CONFIRMATION STATES */
.form-input.error {
    border-bottom-color: var(--accent-terracotta);
}

.error-message {
    font-size: 0.75rem;
    color: var(--accent-terracotta);
    margin-top: 4px;
    display: none;
}

.form-input.error + .error-message {
    display: block;
}

.form-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-gallery);
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    text-align: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-standard) ease-in-out;
}

.form-success-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.success-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(107, 112, 92, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.success-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 12px;
}

.success-desc {
    font-size: 0.9rem;
    color: var(--text-charcoal);
    line-height: 1.6;
    max-width: 320px;
}

/* MONOGRAPH FOOTER */
.monograph-footer {
    background-color: var(--bg-gallery);
    border-top: 1px solid rgba(44, 44, 44, 0.05);
    padding: 100px 0 60px 0;
}

.footer-top {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    border-bottom: 1px solid rgba(44, 44, 44, 0.05);
    padding-bottom: 60px;
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-graphite);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-charcoal);
    text-decoration: none;
    transition: color var(--t-micro);
}

.footer-links a:hover {
    color: var(--accent-brass);
}

/* Newsletter form */
.newsletter-form {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.newsletter-input {
    flex-grow: 1;
    background-color: var(--bg-limestone);
    border: 1px solid rgba(44, 44, 44, 0.08);
    border-radius: var(--radius-btn);
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-graphite);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent-brass);
}

.newsletter-btn {
    border: none;
    background-color: var(--text-graphite);
    color: var(--bg-gallery);
    border-radius: var(--radius-btn);
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color var(--t-micro);
}

.newsletter-btn:hover {
    background-color: var(--accent-brass);
}

.footer-bottom {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    font-size: 0.75rem;
    color: var(--text-charcoal);
}

/* SYSTEM MOTION INHIBITION */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    .wind-path {
        animation: none !important;
    }
    .diagram-sun {
        animation: none !important;
    }
    body {
        cursor: auto !important;
    }
    .custom-cursor, .custom-cursor-ring {
        display: none !important;
    }
}

/* RESPONSIVE STYLING */
@media (max-width: 1024px) {
    .grid-container {
        padding: 0 40px;
    }
    section {
        padding: 96px 0;
    }
    .nav-links {
        gap: 20px;
    }
    /* Grid layout adjustments */
    .intro-image-col { grid-column: 1 / span 5; }
    .intro-content-col { grid-column: 7 / span 6; }
    .project-meta-col { grid-column: 1 / span 5; }
    .project-visual-col { grid-column: 6 / span 7; }
    .materials-grid { grid-template-columns: repeat(2, 1fr); }
    .people-row { grid-template-columns: repeat(3, 1fr); }
    .portal-grid { grid-template-columns: 1fr; }
    .practice-intro-col { grid-column: 1 / span 6; }
    .practice-image-col { grid-column: 7 / span 6; }
    .invite-content-col { grid-column: 1 / span 5; }
    .contact-form-col { grid-column: 6 / span 7; }
}

@media (max-width: 768px) {
    .header-nav {
        padding: 0 24px;
    }
    .menu-toggle {
        display: flex;
        z-index: 1000;
    }
    
    /* Navigation drawer overlay on mobile */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-gallery);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        z-index: 999;
        transition: right var(--t-standard);
        box-shadow: -10px 0 30px rgba(0,0,0,0.03);
    }
    .nav-links.active {
        right: 0;
    }
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    body {
        cursor: auto; /* Fallback to standard touch on tablet/mobile */
    }
    .custom-cursor, .custom-cursor-ring {
        display: none;
    }

    .intro-image-col { grid-column: 1 / -1; margin-bottom: 40px; }
    .intro-content-col { grid-column: 1 / -1; }
    
    .project-meta-col { grid-column: 1 / -1; margin-bottom: 24px; }
    .project-visual-col { grid-column: 1 / -1; }
    .floorplan-grid { grid-template-columns: 1fr; }

    .philosophy-row { grid-template-columns: 1fr; gap: 24px; }
    .research-grid { grid-template-columns: 1fr; }
    .practice-intro-col { grid-column: 1 / -1; margin-bottom: 40px; }
    .practice-image-col { grid-column: 1 / -1; }
    .people-row { grid-template-columns: 1fr; gap: 24px; }
    .journal-grid { grid-template-columns: 1fr; gap: 24px; }
    
    .invite-content-col { grid-column: 1 / -1; margin-bottom: 48px; }
    .contact-form-col { grid-column: 1 / -1; padding: 32px; }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ============================================================
   MOBILE OPTIMIZATION
   ============================================================ */
@media (pointer: coarse) {
  .btn, .nav-link, .view-tab, a, button {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
  }
  .btn { padding: 14px 24px; }
  .nav-link { padding: 12px 8px; }
  body { cursor: auto; -webkit-text-size-adjust: 100%; }
  html, body { overflow-x: hidden; overscroll-behavior-x: none; }
}

@media (max-width: 480px) {
  .hero-headline, .hero-section h1 { font-size: 1.75rem; line-height: 1.15; }
  .hero-section .hero-desc, .hero-section p { font-size: 0.95rem; }
  .hero-ctas, .hero-actions { flex-direction: column; width: 100%; }
  .hero-ctas .btn, .hero-actions .btn { width: 100%; justify-content: center; }
  .grid-container { grid-template-columns: 1fr !important; padding: 0 16px; }
  .footer-top { grid-template-columns: 1fr; }
  .page-section, .section { padding-top: 32px; padding-bottom: 32px; }
  .project-detail-modal, .modal-content { width: 95vw; max-width: 95vw; }
  .view-tab { padding: 10px 14px; font-size: 0.8rem; }
}

