:root {
    /* Premium Platinum Palette */
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-surface-hover: #f0f2f5;

    --color-primary: #1F2937;
    /* Rich Dark Slate */
    --color-primary-hover: #111827;

    --color-accent: #D4AF37;
    /* Classic Gold Accent for 'Rich' feel */
    --color-accent-soft: rgba(212, 175, 55, 0.2);

    --color-text: #1a1a1a;
    --color-text-muted: #4B5563;
    --color-border: rgba(0, 0, 0, 0.08);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #ffffff 0%, #E5E7EB 100%);
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #AA8A25 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);

    --glass-bg: rgba(255, 255, 255, 0.85);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.08);
    /* Premium soft shadow */
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);
    /* Gold glow */
    --backdrop-blur: blur(12px);
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    /* Light Tile Pattern without Overlay */
    background: url('../assets/tile-pattern.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Premium parallax feel */
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    font-weight: 700;
    /* Bolder for premium feel */
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* === TILE PATTERN EFFECT === */
/* Utility Class if needed directly */
.text-tile-pattern,
h1,
h2,
h3,
.navbar .nav-links a,
.footer-links a {
    /* Reverting to solid color for readability */
    color: var(--color-primary);
    background: none;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
    display: inline-block;
    font-weight: 700;
}

/* Override for specific gold accents to keep them gold if needed, 
   but user asked for "everything" in headings/links to be tile.
   We will prioritize the tile pattern but allow .text-gold to override if explicitly used. */
.text-gold {
    background: var(--gradient-gold);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

h1 {
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    /* Base body text scale up */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* Utilities */
.container {
    max-width: 1400px;
    /* Widen layout for grand feel */
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

/* Metallic Buttons (Logo Concept) */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-accent);
    /* Gold border */
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    /* Slight radius for premium feel */
}

/* Metallic Shine Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.8),
            transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
    /* Gold glow */
    transform: translateY(-2px);
    background: var(--color-surface);
}

.btn-primary {
    background: linear-gradient(135deg, #e0e0e0 0%, #ffffff 50%, #c0c0c0 100%);
    /* Platinum Metallic */
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 50%, #d6dfd8 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #000;
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    /* Compact padding for alignment */
    z-index: 1000;
    transition: var(--transition-fast);
    background: url('../assets/tile-pattern-dark.png');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.5);
    /* Gold border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Ensure Logo and Links are White on Dark Tile */
.navbar .logo,
.navbar .nav-links a {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Navbar container */
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text);
    letter-spacing: 0.05em;
    font-weight: 700;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    padding: 2px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    position: relative;
    color: var(--color-text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    /* Gold Accent */
    transition: var(--transition-fast);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--color-accent);
    /* Gold Accent */
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section (Split Layout) */
.hero {
    min-height: 100vh;
    padding-top: 8rem;
    /* Clear navbar */
    position: relative;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    padding-right: 2rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-logo-wrapper {
    width: 100%;
    max-width: 500px;
    background: var(--color-surface);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    /* subtle floating animation */
    animation: float 6s ease-in-out infinite;
}

.floating-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        order: 2;
        /* Visual below Text is standard, but user wants visual visible. Let's keep Text first for H1 importance */
    }

    .hero-visual {
        order: 1;
        margin-bottom: 2rem;
    }

    .hero-logo-wrapper {
        padding: 2rem;
        max-width: 300px;
    }
}


.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.5;
}

/* Services - Glass Cards */
.glass-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 3rem;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    /* improved base shadow */
}

.glass-card:hover {
    background: var(--color-surface-hover);
    transform: translateY(-10px);
    border-color: var(--color-accent);
    /* Gold border on hover */
    box-shadow: var(--shadow-soft);
    /* Deep rich shadow */
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Testimonials */
.testimonial-slider {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.testimonial-card {
    min-width: 400px;
    scroll-snap-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 3rem;
}

/* Footer */
.footer {
    background: var(--color-surface);
    padding: 6rem 0 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer h4 {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-accent);
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Chatbot Overrides for Light Mode */
.chatbot-container {
    background: var(--color-surface);
    /* Solid surface for readability */
    border: 1px solid var(--color-border);
    color: var(--color-text);
    box-shadow: var(--shadow-soft);
    /* Premium float */
    border-radius: 16px;
    /* Smooth corners */
}

.chatbot-header {
    background: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
    color: white;
}

.chatbot-body {
    background: var(--color-surface);
}

.bot-message {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.user-message {
    background: var(--color-primary);
    color: #ffffff;
}

.chat-options button {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* --- Before/After Slider --- */
.comparison-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 450px;
    margin: 4rem auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.comparison-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-image.before {
    z-index: 1;
}

.comparison-image.after {
    z-index: 2;
    width: 50%;
    /* Initial state */
    border-right: 2px solid var(--color-primary);
}

.scroller {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    cursor: ew-resize;
    z-index: 3;
    pointer-events: none;
    /* Let JS handle container movement */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.comp-label {
    position: absolute;
    top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.8rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.before .comp-label {
    right: 1rem;
}

.after .comp-label {
    left: 1rem;
}

/* --- Portfolio Filters --- */
.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: #000;
    border-color: var(--color-primary);
}

.portfolio-item {
    transition: all 0.4s ease;
}

.portfolio-item.hidden {
    display: none;
}

/* --- Renovation Calculator --- */
.calculator-card {
    background: var(--color-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 3rem;
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.calc-progress-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-radius: 2px;
}

.calc-progress {
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    transition: width 0.4s ease;
}

.calc-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.calc-step.active {
    display: block;
}

.calc-step h3 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.calc-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.calc-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.calc-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
    transform: translateY(-2px);
}

.price-display {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 1rem 0;
    font-family: var(--font-heading);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}