/* Font import moved to HTML for performance */

:root {
    --surface: #fff8f5;
    --clay: #C9A68F;
    --clay-dark: #ba947b;
    --primary: #316270;
    --primary-hover: #21434c;
    --secondary: #755845;
    --text-dark: #1D0E03;
    --outline-variant: rgba(29, 14, 3, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Manrope', sans-serif;
    color: var(--text-dark);
    background-color: var(--surface);
}

body {
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { font-size: 1.1rem; margin-bottom: 1.5rem; color: #4a3e35; }

/* Global Utilities */
.shadow-ambient { box-shadow: 0 12px 40px rgba(29, 14, 3, 0.06); }
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
    background-color: var(--primary); color: #fff; text-decoration: none;
    padding: 1rem 2.5rem; border-radius: 999px; font-weight: 700; transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.15), 0 8px 20px rgba(49, 98, 112, 0.2);
    border: none; cursor: pointer; font-family: inherit; font-size: 1.05rem; letter-spacing: 0.02em;
}
.btn-primary:hover {
    background-color: var(--primary-hover); transform: scale(1.02) translateY(-2px);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.15), 0 12px 25px rgba(49, 98, 112, 0.3);
}
.btn-block { width: 100%; margin-top: 1.5rem; padding: 1.25rem; font-size: 1.1rem; }
.btn-nav { padding: 0.6rem 1.5rem; font-size: 0.9rem; margin-left: 0.5rem; }

/* Reusable Glass Panel */
.glass-panel {
    background: rgba(255, 248, 245, 0.75); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 2rem; box-shadow: 0 24px 60px rgba(29, 14, 3, 0.08);
}

/* Glass Navigation */
.glass-nav {
    position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1400px;
    background: rgba(255, 248, 245, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 2rem; border-radius: 999px; display: flex; align-items: center; justify-content: space-between; z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 12px 40px rgba(29, 14, 3, 0.04);
    transition: all 0.3s ease;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 40px; width: auto; display: block; }
.nav-logo a { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-dark); transition: all 0.3s ease; }
.nav-logo a:hover { transform: scale(1.02); color: var(--primary); }
.logo-text { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 0.95rem; transition: color 0.3s ease; position: relative; display: inline-block; }
.nav-links a:hover { color: var(--primary); }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0;
    background-color: var(--primary); transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

/* Hero Section */
.hero {
    position: relative; height: 100vh; width: 100%; overflow: hidden; display: flex; align-items: center;
    background: linear-gradient(180deg, var(--surface) 0%, var(--clay) 100%); /* Loading placeholder */
}

.parallax-layers {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
}

.layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; will-change: transform;
}

/* Background gradient for depth */
.sky-base { background: linear-gradient(180deg, var(--surface) 0%, var(--clay) 100%); z-index: 0; }

/* Raster Image locked scale wrap */
.layer img { 
    width: 100vw; 
    height: 100vh; 
    object-fit: cover;
    object-position: center bottom;
    position: absolute; 
    bottom: 0;
    left: 0;
    filter: drop-shadow(0 15px 35px rgba(29, 14, 3, 0.4)); /* Restored for depth as requested */
}

.layer-hero-bg { z-index: 2; }
.layer-hero-fg { z-index: 5; }

/* Hero Content Overhaul */
.hero-content {
    position: relative; z-index: 10; width: 90%; max-width: 650px; padding: clamp(2rem, 4vw, 3.5rem);
    margin-left: max(5vw, calc(50vw - 700px));
    opacity: 0; transform: translateY(30px); animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

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

.hero-badge {
    display: inline-block; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-dark); margin-bottom: 1rem; padding: 0.5rem 1.2rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 4px 15px rgba(29, 14, 3, 0.05);
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1.5rem;
    color: var(--text-dark); text-shadow: 0 10px 40px rgba(255,248,245, 0.6);
}

.hero-content p {
    font-size: 1.15rem; line-height: 1.6; color: #3a2e25; max-width: 90%; margin-bottom: 2rem;
    text-shadow: 0 4px 15px rgba(255,248,245, 0.8);
}

.hero-actions { display: flex; gap: 1rem; }

/* Connective Flow Between Sections & Environment Decor */
main { position: relative; z-index: 20; background-color: transparent; margin-top: -5vh; overflow: hidden; }
section { position: relative; padding: 10rem 10% 8rem 10%; min-height: 80vh; }

.section-title { text-align: center; max-width: 600px; margin: 0 auto 4rem auto; position: relative; z-index: 2; }
.section-title.inverse-light h2, .section-title.inverse-light p { color: var(--surface); text-shadow: 0 4px 15px rgba(29, 14, 3, 0.4); }

/* Remove old blobs */
.bg-shape, .shape-clay, .shape-dark { display: none; }

/* Diorama Topography Segments */
.paper-slice {
    position: absolute; width: 130vw; height: 350px; left: -10vw; z-index: 1; pointer-events: none;
}

/* O nás environment (Clay) */
#o-nas { background-color: var(--clay); border-radius: 0; box-shadow: none; z-index: 5; }
.slice-top {
    top: -150px; background-color: var(--clay); transform: rotate(-3deg);
    filter: drop-shadow(0 -15px 35px rgba(29, 14, 3, 0.35));
}

.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center; position: relative; z-index: 10; }
.about-text { padding: 4rem; z-index: 10; transform: translateX(3rem); }

/* SVG Composition Box */
.about-visual {
    background-color: var(--clay-dark); border-radius: 2rem; height: 600px; width: 100%;
    z-index: 1; position: relative; overflow: hidden; box-shadow: 0 24px 60px rgba(29, 14, 3, 0.15);
}
.about-image-master {
    width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block;
}

/* Služby environment (Earthy Anchor) */
#sluzby { background-color: var(--secondary); z-index: 6; padding-top: 15rem; }
.slice-mid {
    top: -180px; background-color: var(--secondary); transform: rotate(4deg);
    filter: drop-shadow(0 -15px 40px rgba(29, 14, 3, 0.5));
    display: flex; align-items: center; justify-content: center;
}

/* Editorial Transition Quote */
.quote-banner {
    max-width: 800px; margin: 0 auto; text-align: center;
    position: relative; z-index: 2; padding: 0 2rem;
}
.quote-banner blockquote p {
    font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 300; font-style: italic;
    color: var(--surface); line-height: 1.4; opacity: 0.95; position: relative;
}
.quote-banner blockquote::before {
    content: "“"; font-family: Georgia, serif; font-size: 10rem;
    position: absolute; top: -5rem; left: -1rem; color: var(--clay);
    opacity: 0.15; font-weight: 700; line-height: 1; pointer-events: none;
}
.quote-banner cite {
    display: block; margin-top: 2rem; font-size: 1.1rem; font-weight: 600;
    color: var(--clay); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase;
}

.bg-plant-accent { position: absolute; opacity: 0.05; z-index: 0; pointer-events: none; }
.bg-plant-accent.top-left { top: -50px; left: -150px; width: 800px; transform: rotate(20deg); }
.bg-plant-accent.bottom-right { bottom: -100px; right: -150px; width: 600px; transform: rotate(-10deg); }

/* Custom Bento Grid Layout */
.services-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3rem; margin-top: 4rem; position: relative; z-index: 10; }
.service-card:nth-child(1), .service-card:nth-child(2), .service-card:nth-child(3) { grid-column: span 4; }
.service-card:nth-child(4), .service-card:nth-child(5), .service-card:nth-child(6), .service-card:nth-child(7) { grid-column: span 3; }

/* 3 Items limit breakpoint */
@media (max-width: 1200px) {
    .services-grid { grid-template-columns: repeat(6, 1fr); }
    .service-card:nth-child(1), .service-card:nth-child(2) { grid-column: span 3; }
    .service-card:nth-child(3), .service-card:nth-child(4), .service-card:nth-child(5) { grid-column: span 2; }
    .service-card:nth-child(6), .service-card:nth-child(7) { grid-column: span 3; }
}

/* 2 Items limit breakpoint */
@media (max-width: 900px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .service-card:nth-child(1) { grid-column: span 2; }
    .service-card:nth-child(n+2) { grid-column: span 1; }
}

/* Mobile */
@media (max-width: 650px) {
    .services-grid { grid-template-columns: 1fr; }
    .service-card { grid-column: span 1 !important; }
}
.service-card {
    background: rgba(255, 248, 245, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 3.5rem 3rem; border-radius: 2rem; border: 1px solid rgba(255, 255, 255, 0.5); 
    box-shadow: 0 24px 50px rgba(10, 25, 30, 0.2); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative; overflow: hidden;
}
.service-card:hover { background: rgba(255, 255, 255, 1); transform: scale(1.03) translateY(-10px); box-shadow: 0 24px 50px rgba(10, 25, 30, 0.4); border-color: var(--clay-dark); }
.service-card h3 { color: var(--primary); margin-bottom: 0.5rem; position: relative; z-index: 2; font-size: 1.4rem; line-height: 1.3; }

/* Editorial Card Indexing */
.card-number { 
    position: absolute; top: 10px; right: 20px; 
    font-size: 6rem; font-weight: 700; color: var(--clay); opacity: 0.15; 
    transition: all 0.5s ease; z-index: 0; pointer-events: none; line-height: 1;
}
.service-card:hover .card-number { opacity: 0.25; transform: scale(1.05); color: var(--secondary); }

.card-divider { width: 40px; height: 3px; background: var(--primary); margin-bottom: 1.5rem; border-radius: 2px; transition: width 0.4s ease; position: relative; z-index: 2; }
.service-card:hover .card-divider { width: 80px; }

.card-action { 
    display: inline-block; margin-top: 2rem; font-weight: 700; color: var(--primary); 
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
    opacity: 0; transform: translateX(-15px); transition: all 0.4s ease; position: relative; z-index: 2;
}
.service-card:hover .card-action { opacity: 1; transform: translateX(0); }
.service-card p { position: relative; z-index: 2; }

/* Kontakt environment (Surface) */
#kontakt { background-color: var(--surface); z-index: 7; position: relative; padding: 4rem 10% 4rem 10%; box-shadow: 0 -20px 40px rgba(29, 14, 3, 0.15); border-radius: 3rem 3rem 0 0; min-height: auto; }


.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; position: relative; z-index: 10; align-items: start; max-width: 1200px; margin: 1rem auto 0 auto; }
.contact-info h2 { color: var(--primary); margin-bottom: 2rem; font-size: 3rem;}
.contact-info p { color: var(--text-dark); margin-bottom: 3rem; font-size: 1.15rem; line-height: 1.6;}
.contact-details { list-style: none; }
.contact-details li { margin-bottom: 2rem; font-size: 1.15rem; color: var(--text-dark); display: flex; flex-direction: column; }
.contact-details strong { color: var(--secondary); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.1em; margin-bottom: 0.25rem; }

.contact-map-container { padding: 0.5rem; background: var(--surface); border: 2px solid var(--outline-variant); border-radius: 2rem; display: flex; box-shadow: 0 24px 60px rgba(29, 14, 3, 0.08); overflow: hidden; }

/* Consultation Overlay View Transition */
.consultation-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(10, 25, 30, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.4s ease; padding: 24px;
}
.consultation-overlay.open { display: flex; }
.consultation-overlay.visible { opacity: 1; }

.consultation-modal {
    background: var(--surface); border-radius: 2rem; max-width: 600px; width: 100%;
    overflow: hidden; padding: 3rem; transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 40px 80px rgba(10, 25, 30, 0.15); border: 1px solid var(--outline-variant);
}
.consultation-overlay.visible .consultation-modal { transform: scale(1) translateY(0); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.modal-header h2 { color: var(--primary); font-size: 2rem; margin: 0; }
.close-modal { 
    background: none; border: none; font-size: 2.5rem; color: var(--clay-dark); 
    cursor: pointer; opacity: 0.5; transition: opacity 0.3s; line-height: 1; margin-top: -5px; outline: none;
}
.close-modal:hover { opacity: 1; color: var(--primary); }

/* Form Component styling inside modal */
.form-group { display: flex; flex-direction: column; margin-bottom: 2.5rem; }
.form-group label { color: var(--primary); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input, .form-group textarea { 
    background: transparent; border: none; border-bottom: 2px solid var(--clay);
    padding: 1rem 0; font-size: 1.1rem; color: var(--text-dark); font-family: inherit; transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-bottom-color: var(--primary); }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(29, 14, 3, 0.3); }

/* Site Footer */
.site-footer {
    background: var(--surface); padding: 2rem 10% 2rem 10%; border-top: 1px solid var(--outline-variant); color: var(--text-dark); position: relative; z-index: 10;
}
.footer-content {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; max-width: 1200px; margin: 0 auto; margin-bottom: 4rem;
}
.footer-brand h3 { color: var(--primary); font-size: 1.5rem; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 1.05rem; opacity: 0.8; margin-bottom: 1.5rem; line-height: 1.5; }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--outline-variant); color: var(--clay-dark); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.footer-socials a:hover { color: var(--surface); background-color: var(--primary); border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(49, 98, 112, 0.2); }
.footer-links h4, .footer-legal h4, .footer-contact h4 { color: var(--clay-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.5rem; }
.footer-links ul, .footer-legal ul, .footer-contact ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a, .footer-legal a, .footer-contact li { color: var(--text-dark); text-decoration: none; transition: color 0.3s; font-size: 1.05rem; line-height: 1.5; }
.footer-links a:hover, .footer-legal a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--outline-variant); padding-top: 2rem; max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-bottom p { font-size: 0.9rem; opacity: 0.6; margin: 0; }

/* Responsive */
@media (max-width: 1000px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-text { transform: translateX(0); padding: 2.5rem; margin-bottom: -4rem; }
    .about-visual { height: 400px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
@media (max-width: 900px) {
    .hero-content { margin-left: 5%; padding: 2.5rem; }
    .services-grid { gap: 1.5rem; }
    .service-card { padding: 2.5rem 2rem; }
    .layer img { object-position: 75% bottom; }
    .glass-nav { width: 95%; flex-direction: column; gap: 1rem; top: 1rem; padding: 1rem; border-radius: 2rem; }
    .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    main { margin-top: -2vh; }
    
    /* Mobile / Touch-Screen Safety Optimizations */
    .service-card { padding: 2.5rem 1.5rem; }
    .card-action { opacity: 1; transform: translateX(0); }
    .card-divider { width: 80px; }
    .card-number { opacity: 0.25; transform: scale(1.05); color: var(--secondary); }

    /* Mobile Hero Still Optimization */
    .parallax-layers { display: none; }
    .hero {
        background-image: url('images/hero-bg/hero-mobile.avif'); /* 78KB vs 500KB */
        background-image: -webkit-image-set(url('images/hero-bg/hero-mobile.avif') type('image/avif'), url('images/hero-bg/hero-mobile.webp') type('image/webp'));
        background-image: image-set(url('images/hero-bg/hero-mobile.avif') type('image/avif'), url('images/hero-bg/hero-mobile.webp') type('image/webp'));
        background-size: cover;
        background-position: center center;
        background-attachment: scroll; /* Performance win on mobile */
    }
}

@media (max-width: 650px) {
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
}
