/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    --color-lightest: #d1d1d1;
    --color-light: #8b8378;
    --color-medium: #707070;
    --color-dark: #565656;
    --color-darkest: #000000;
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;
    --bg-light: #f5f5f5;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --text-dark: #2a2a2a;
    --font-primary: 'Cormorant', serif;
    --font-secondary: 'Cormorant Garamond', serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.6s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #0a0a0a;
    overflow-x: hidden;
    cursor: none;
}

/* ===========================
   Loading Screen
   =========================== */
.loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('../images/texture-background.png');
    background-size: cover;
    background-position: center;
    background-color: #0a0a0a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}
.loading-logo {
    height: 60px;
    width: auto;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    object-fit: contain;
}
.loading-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}
.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--text-primary);
    animation: loadProgress 2s ease forwards;
}
@keyframes loadProgress { to { width: 100%; } }

/* ===========================
   Custom Cursor
   =========================== */
.custom-cursor {
    pointer-events: none;
    position: fixed;
    top: 0; left: 0;
    z-index: 10000;
    mix-blend-mode: difference;
}
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}
.cursor-outline {
    width: 40px; height: 40px;
    border: 1px solid var(--text-primary);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}
.custom-cursor.link-hover .cursor-dot { width: 20px; height: 20px; }
.custom-cursor.link-hover .cursor-outline { width: 60px; height: 60px; opacity: 0.5; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.4s ease, border-color 0.4s ease;
    display: none;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    background-color: #0a0a0a;
    padding: 8px 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.logo-img {
    height: 75px;
    width: auto;
    filter: brightness(1.05);
    transition: var(--transition-fast);
    object-fit: contain;
    display: block;
}
.logo-img:hover { filter: brightness(1.25); }
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}
.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding: 0.75rem 1.25rem;
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    display: inline-block;
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.menu-toggle span {
    width: 25px; height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    background: transparent;
    z-index: 0;
}
.hero-content { max-width: 900px; }
.hero-logo {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.hero-logo img {
    height: 800px;
    width: auto;
    max-width: 92vw;
    filter: drop-shadow(0 10px 40px rgba(0,0,0,0.35));
    cursor: pointer;
    transition: var(--transition-normal);
    object-fit: contain;
}
.hero-logo:hover img {
    filter: drop-shadow(0 14px 60px rgba(0,0,0,0.5));
}


.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===========================
   Section Styles
   =========================== */
section {
    padding: var(--spacing-xl) 0;
    position: relative;
}
.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
.section-number {
    font-size: 1.5rem;
    color: var(--color-medium);
    letter-spacing: 2px;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ===========================
   About Section
   =========================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}
.about-text .lead {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}
.about-text p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}
.stat-item {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}
.stat-item:hover { border-color: rgba(255, 255, 255, 0.3); }
.stat-number {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}
.about-image { height: 500px; }

/* ===========================
   Projects Section
   =========================== */
.projects-filter {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}
.filter-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition-fast);
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-md);
}
.project-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
}
.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}
.project-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}
.project-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.project-card:hover .project-img { transform: scale(1.05); }

/* Dual-image hover card */
.merged-card-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.merged-card-img--hover { opacity: 0; }
.project-card:hover .merged-card-img:not(.merged-card-img--hover) { opacity: 0; }
.project-card:hover .merged-card-img--hover { opacity: 1; }

.project-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-normal);
}
.project-card:hover .project-overlay { opacity: 1; }
.view-project-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--text-primary);
    border: none;
    color: var(--bg-dark);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.view-project-btn:hover { transform: rotate(90deg) scale(1.1); }

.project-info { padding: var(--spacing-md); }
.project-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.project-title {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    font-weight: 400;
}
.project-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===========================
   Services Section
   =========================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}
.service-card {
    padding: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.service-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}
.service-title {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 1px;
}
.service-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===========================
   Contact Section
   =========================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}
.contact-lead {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}
.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
.contact-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}
.contact-item i {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 0.2rem;
}
.contact-item h4 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}
.contact-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}
.social-links { display: flex; gap: var(--spacing-md); }
.social-link {
    width: 45px; height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition-fast);
}
.social-link:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.form-group { position: relative; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--text-primary);
    background: transparent;
}
.form-group label {
    position: absolute;
    top: 1rem; left: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
    transition: var(--transition-fast);
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:valid + label {
    top: -0.7rem;
    left: 0.8rem;
    font-size: 0.75rem;
    padding: 0 0.5rem;
    color: var(--text-primary);
}
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e5e5e5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
.form-group select option {
    background: #1a1a1a;
    color: var(--text-primary);
}
.submit-button {
    padding: 1rem 2.5rem;
    background: var(--text-primary);
    border: 1px solid var(--text-primary);
    color: var(--bg-dark);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-normal);
    align-self: flex-start;
}
.submit-button:hover {
    background: transparent;
    color: var(--text-primary);
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-content { text-align: center; }
.footer-logo {
    margin-bottom: var(--spacing-md);
    display: inline-block;
    background-color: #0a0a0a;
    padding: 16px 32px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.footer-logo img {
    height: 60px;
    width: auto;
    opacity: 0.95;
    display: block;
}
.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.footer-tagline {
    color: var(--color-medium);
    font-size: 0.85rem;
    font-style: italic;
}

/* ===========================
   Bottom Toolbar
   =========================== */
.bottom-toolbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 131, 120, 0.3);
    z-index: 9999;
    padding: 6px 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.5);
}
.toolbar-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}
.toolbar-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--color-lightest);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 60px;
    flex: 1;
    max-width: 120px;
    box-shadow: none;
}
.toolbar-button:hover {
    background: transparent;
    transform: translateY(-4px);
    box-shadow: none;
}
.toolbar-icon {
    font-size: 28px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toolbar-text {
    font-size: 10px;
    font-family: var(--font-primary);
    text-align: center;
    letter-spacing: 0.5px;
}

/* ===========================
   Toolbar Hover Preview
   =========================== */
#toolbar-preview-popup {
    position: fixed;
    z-index: 9000;
    width: 220px;
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease;
    clip-path: inset(-20px -20px 0 -20px);
}
#toolbar-preview-popup.tpp--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.tpp-img-wrap {
    position: relative;
    width: 100%; height: 150px;
    overflow: hidden;
    background: #111;
    border-radius: 10px 10px 0 0;
}
.tpp-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.tpp-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 55%);
    z-index: 3;
    pointer-events: none;
}
.tpp-caption {
    padding: 10px 14px 12px;
    font-family: var(--font-primary);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(220,215,205,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tpp-arrow {
    position: absolute;
    bottom: -8px;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(30,25,20,0.95);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ===========================
   Texture Background System
   =========================== */
body {
    background-image: none;
    background-color: var(--bg-dark);
}

body.tx-sandstone {
    background-image: url('../images/textures/texture-sandstone.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
body.tx-concrete-light {
    background-image: url('../images/textures/texture-concrete-light.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
body.tx-volcanic {
    background-image: url('../images/textures/texture-concrete-dark.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0a0807;
    position: relative;
}
body.tx-volcanic::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(4, 3, 2, 0.72);
    pointer-events: none;
    z-index: 0;
}
body.tx-volcanic > * { position: relative; z-index: 1; }
body.tx-concrete-dark {
    background-image: url('../images/textures/texture-concrete-dark.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
body.tx-rust {
    background-image: url('../images/textures/texture-rust.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
body.tx-limestone {
    background-image: url('../images/textures/texture-limestone.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Light-background pages */
body.tx-sandstone,
body.tx-concrete-light,
body.tx-limestone {
    --text-primary: #1c1a17;
    --text-secondary: #3e3a34;
    --color-lightest: #1c1a17;
}
/* Dark-background pages */
body.tx-concrete-dark,
body.tx-volcanic,
body.tx-rust {
    --text-primary: #ede8e2;
    --text-secondary: #b0a89e;
    --color-lightest: #ede8e2;
}

/* Navbar adapts per texture */
body.tx-sandstone .navbar,
body.tx-concrete-light .navbar,
body.tx-limestone .navbar {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.12);
}

/* Scroll-driven home */
body.tx-scroll-home {
    background-image: none !important;
    background-color: transparent !important;
}

/* data-theme adaptive rules (texture-scroll.js) */
[data-theme="dark"] .navbar {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.10);
}
[data-theme="dark"] .navbar .nav-link { color: #1c1a17; }
[data-theme="light"] .navbar {
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
[data-theme="light"] .navbar .nav-link { color: #e8e4df; }

/* Smooth color transitions */
h1, h2, h3, h4, h5, h6, p, span, a, li, label {
    transition: color 0.8s ease;
}

/* Card adaptive rules per texture */
body.tx-sandstone .project-card,
body.tx-sandstone .service-card,
body.tx-sandstone .stat-item,
body.tx-concrete-light .project-card,
body.tx-concrete-light .service-card,
body.tx-concrete-light .stat-item,
body.tx-limestone .project-card,
body.tx-limestone .service-card,
body.tx-limestone .stat-item {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(0,0,0,0.10);
}
body.tx-concrete-dark .project-card,
body.tx-concrete-dark .service-card,
body.tx-concrete-dark .stat-item,
body.tx-rust .project-card,
body.tx-rust .service-card,
body.tx-rust .stat-item {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(255,255,255,0.08);
}

/* Section headings adapt per texture */
body.tx-sandstone .section-title,
body.tx-concrete-light .section-title,
body.tx-limestone .section-title { color: #1c1a17; }
body.tx-concrete-dark .section-title,
body.tx-rust .section-title { color: #ede8e2; }

/* Home scroll section padding */
body.tx-scroll-home section {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

/* data-theme card adaptive */
[data-theme="dark"] .project-card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .stat-item {
    background: rgba(255,255,255,0.40);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(0,0,0,0.10);
}
[data-theme="light"] .project-card,
[data-theme="light"] .service-card,
[data-theme="light"] .stat-item {
    background: rgba(0,0,0,0.30);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(255,255,255,0.08);
}

/* ===========================
   Responsive Design
   =========================== */

/* Tablet */
@media (max-width: 1024px) {
    .about-content,
    .contact-content { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .about-stats { grid-template-columns: repeat(3, 1fr); }
    .about-image { height: 400px; }
    .hero-logo img { height: 550px; max-width: 90vw; }
}

/* Mobile */
@media (max-width: 768px) {
    .custom-cursor { display: none !important; }
    body { cursor: auto; }
    :root { --spacing-xl: 3.5rem; --spacing-lg: 2.5rem; }

    .navbar { display: block !important; }
    .nav-menu {
        position: fixed;
        top: 70px; left: -100%;
        width: 100%; height: calc(100vh - 70px);
        background-image: url('../images/texture-background.png');
        background-size: cover;
        background-position: center;
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-md);
        transition: var(--transition-normal);
    }
    .nav-menu.active { left: 0; }
    .menu-toggle { display: flex; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
    .nav-link { font-size: 1rem; padding: 1rem 2rem; min-width: 200px; text-align: center; }

    .hero { min-height: 100svh; padding: var(--spacing-lg) var(--spacing-sm); padding-bottom: 100px; }
    .hero-logo img { height: auto; width: 75vw; max-width: 380px; max-height: 60vh; }
    .scroll-indicator { bottom: 90px; }
    .scroll-indicator span { font-size: 0.7rem; }
    section { padding: var(--spacing-lg) 0; }
    .section-header { gap: var(--spacing-sm); margin-bottom: var(--spacing-md); }
    .section-title { font-size: clamp(1.5rem, 6vw, 2.2rem); letter-spacing: 2px; }
    .section-number { font-size: 1.2rem; }

    .about-content { grid-template-columns: 1fr; gap: var(--spacing-md); }
    .about-text .lead { font-size: 1.05rem; line-height: 1.7; }
    .about-stats { grid-template-columns: repeat(3, 1fr); gap: var(--spacing-sm); margin-top: var(--spacing-md); }
    .stat-item { padding: var(--spacing-sm); text-align: center; }
    .stat-number { font-size: 1.8rem; }
    .stat-label { font-size: 0.75rem; }
    .about-image { height: 300px; order: -1; }

    .projects-filter { gap: var(--spacing-xs); justify-content: center; }
    .filter-btn { padding: 0.5rem 0.8rem; font-size: 0.7rem; }
    .projects-grid { grid-template-columns: 1fr; gap: var(--spacing-sm); }
    .project-image { height: 220px; }
    .project-info { padding: var(--spacing-sm); }
    .project-title { font-size: 1.1rem; }

    .services-grid { grid-template-columns: 1fr; gap: var(--spacing-sm); }
    .service-card { padding: var(--spacing-md); }
    .service-title { font-size: 1.1rem; }
    .service-description { font-size: 0.9rem; }

    .contact-content { grid-template-columns: 1fr; gap: var(--spacing-md); }
    .contact-lead { font-size: 1.1rem; }
    .contact-item { gap: var(--spacing-sm); }
    .submit-button { width: 100%; text-align: center; }

    .footer { padding: var(--spacing-md) 0; padding-bottom: 80px; }
    .footer-logo { padding: 10px 20px; }
    .footer-logo img { height: 40px; }

    .bottom-toolbar { padding: 4px 0; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
    .toolbar-container { gap: 2px; padding: 0 6px; }
    .toolbar-button { padding: 4px 2px; min-width: 48px; }
    .toolbar-button:hover { transform: none; }

    #toolbar-preview-popup { display: none !important; }

    body.tx-sandstone,
    body.tx-concrete-light,
    body.tx-volcanic,
    body.tx-concrete-dark,
    body.tx-rust,
    body.tx-limestone { background-attachment: scroll; }
}

/* Small phones */
@media (max-width: 480px) {
    :root { --spacing-xl: 2.5rem; --spacing-lg: 2rem; }
    .nav-container { padding: 0 var(--spacing-sm); }
    .container { padding: 0 var(--spacing-sm); }
    .section-header { flex-direction: column; align-items: flex-start; gap: var(--spacing-xs); }
    .hero-logo img { width: 70vw; max-width: 280px; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.65rem; }
    .form-group input,
    .form-group textarea,
    .form-group select { padding: 0.85rem; font-size: 16px; }
    .filter-btn { padding: 0.4rem 0.6rem; font-size: 0.65rem; }
    .toolbar-button { min-width: 42px; padding: 3px 1px; }
}
