/* ==========================================================================
   LEGIO DESIGN - Style Sheet (Roman Imperial Arches / Classical Heritage)
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800;900&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    /* Roman Color Palette */
    --imperial-red: #991B1B;
    --imperial-red-hover: #7F1D1D;
    --golden-brass: #D97706;
    --golden-brass-light: #F59E0B;
    --carrara-pearl: #F3F4F6;
    --carrara-pearl-dark: #E5E7EB;
    --shadow-charcoal: #111827;
    --shadow-charcoal-light: #1F2937;
    --pure-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lora', serif;
    
    /* Layout & Spacing */
    --max-width: 1280px;
    --transition-speed: 0.4s;
    --ease-classic: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--shadow-charcoal);
    color: var(--carrara-pearl);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

body {
    overflow-x: hidden;
    background-color: var(--shadow-charcoal);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--shadow-charcoal);
}
::-webkit-scrollbar-thumb {
    background: var(--golden-brass);
    border: 2px solid var(--shadow-charcoal);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--golden-brass-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--pure-white);
    letter-spacing: 0.08em;
    font-weight: 600;
}

p {
    color: var(--carrara-pearl-dark);
}

a {
    color: var(--golden-brass);
    text-decoration: none;
    transition: color var(--transition-speed) var(--ease-classic);
}

a:hover {
    color: var(--golden-brass-light);
}

/* Structural Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--golden-brass);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: padding var(--transition-speed) var(--ease-classic);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--golden-brass);
    letter-spacing: 0.15em;
    line-height: 1;
}

.logo-sub {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--carrara-pearl);
    margin-top: 0.2rem;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav ul li a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--carrara-pearl);
    letter-spacing: 0.1em;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--golden-brass);
    transition: width var(--transition-speed) var(--ease-classic);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--golden-brass);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--carrara-pearl);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(17,24,39,0.4) 0%, rgba(17,24,39,0.85) 100%);
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.4;
    transition: transform 10s ease-out;
}

.hero:hover .hero-bg {
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-arch-frame {
    border: 3px double var(--golden-brass);
    border-radius: 200px 200px 0 0;
    padding: 4rem 3rem 3rem 3rem;
    background: rgba(153, 27, 27, 0.15); /* Tint of imperial red */
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.hero h1 span {
    color: var(--golden-brass);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--carrara-pearl);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    max-width: 600px;
}

/* Premium Buttons */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-speed) var(--ease-classic);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--imperial-red);
    color: var(--pure-white);
    border: 1px solid var(--golden-brass);
    box-shadow: 0 4px 15px rgba(153, 27, 27, 0.4);
}

.btn-primary:hover {
    background-color: var(--golden-brass);
    color: var(--shadow-charcoal);
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--golden-brass);
    border: 1px solid var(--golden-brass);
}

.btn-secondary:hover {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--golden-brass-light);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 8rem 0;
}

.section-bg-dark {
    background-color: var(--shadow-charcoal);
}

.section-bg-pearl {
    background-color: var(--carrara-pearl);
    color: var(--shadow-charcoal);
}

.section-bg-pearl h2,
.section-bg-pearl h3,
.section-bg-pearl h4 {
    color: var(--shadow-charcoal);
}

.section-bg-pearl p {
    color: var(--shadow-charcoal-light);
}

.section-bg-red {
    background-color: var(--imperial-red);
    background-image: linear-gradient(135deg, var(--imperial-red) 0%, #7F1D1D 100%);
    border-top: 3px double var(--golden-brass);
    border-bottom: 3px double var(--golden-brass);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1.5rem;
}

/* Double lines / Classical divide */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    border-top: 1px solid var(--golden-brass);
    border-bottom: 1px solid var(--golden-brass);
}

.section-header p {
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 1rem;
}

/* Roman Arches Showcase / Grid */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.arch-card {
    background: var(--shadow-charcoal-light);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 160px 160px 0 0; /* Imperial Arch shape */
    overflow: hidden;
    transition: all var(--transition-speed) var(--ease-classic);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.arch-card:hover {
    transform: translateY(-8px);
    border-color: var(--golden-brass);
    box-shadow: 0 15px 40px rgba(217, 119, 6, 0.2);
}

.arch-img-wrapper {
    position: relative;
    padding-top: 130%; /* Portrait/Arch ratio */
    overflow: hidden;
    border-bottom: 2px solid var(--golden-brass);
}

.arch-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) var(--ease-classic);
}

.arch-card:hover .arch-img {
    transform: scale(1.06);
}

.arch-card-content {
    padding: 2rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.arch-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.arch-card-content p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Features/Heritage block */
.heritage-block {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.heritage-text {
    flex: 1;
}

.heritage-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--golden-brass);
    padding-left: 1rem;
}

.heritage-text p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.heritage-visual {
    flex: 1;
    position: relative;
}

.heritage-arch-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 220px 220px 0 0;
    border: 3px solid var(--golden-brass);
    padding: 10px;
    background: var(--shadow-charcoal);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    display: block;
    margin: 0 auto;
}

/* Testimonials Slider/List */
.testimonials-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.testimonial-card {
    background: rgba(17, 24, 39, 0.4);
    border: 1px solid rgba(217, 119, 6, 0.2);
    padding: 3rem 2rem;
    position: relative;
    text-align: center;
    backdrop-filter: blur(5px);
}

.testimonial-card::before {
    content: '“';
    position: absolute;
    top: 1rem;
    left: 2rem;
    font-size: 5rem;
    color: var(--golden-brass);
    font-family: var(--font-heading);
    opacity: 0.3;
    line-height: 1;
}

.testimonial-text {
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--carrara-pearl);
}

.testimonial-author {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--golden-brass);
    text-transform: uppercase;
}

.testimonial-location {
    font-size: 0.8rem;
    color: var(--carrara-pearl-dark);
    margin-top: 0.2rem;
}

/* GDPR Cookie Consent Modal/Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 400px;
    max-width: calc(100vw - 4rem);
    background: rgba(17, 24, 39, 0.98);
    border: 2px solid var(--golden-brass);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    padding: 2rem;
    z-index: 10000;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--golden-brass);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-text {
    font-size: 0.85rem;
    color: var(--carrara-pearl-dark);
    margin-bottom: 1.5rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-speed) var(--ease-classic);
    text-align: center;
}

.cookie-accept {
    background-color: var(--imperial-red);
    color: var(--pure-white);
    border: 1px solid var(--golden-brass);
}

.cookie-accept:hover {
    background-color: var(--golden-brass);
    color: var(--shadow-charcoal);
}

.cookie-decline {
    background-color: transparent;
    color: var(--carrara-pearl);
    border: 1px solid var(--carrara-pearl-dark);
}

.cookie-decline:hover {
    background-color: rgba(243, 244, 246, 0.1);
}

/* Category Filter System (Products page) */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--golden-brass);
    color: var(--carrara-pearl);
    padding: 0.75rem 2rem;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-speed) var(--ease-classic);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--golden-brass);
    color: var(--shadow-charcoal);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.product-card {
    background: var(--shadow-charcoal-light);
    border: 1px solid rgba(217, 119, 6, 0.15);
    overflow: hidden;
    transition: all var(--transition-speed) var(--ease-classic);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--golden-brass);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%; /* Square ratio */
    overflow: hidden;
    background: #000;
}

.product-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) var(--ease-classic);
}

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

.product-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--imperial-red);
    color: var(--pure-white);
    padding: 0.25rem 0.75rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--golden-brass);
}

.product-info {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--pure-white);
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--golden-brass);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Form Styles with Floating Labels */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form-wrapper {
    background-color: var(--shadow-charcoal-light);
    border: 1px solid rgba(217, 119, 6, 0.2);
    padding: 3.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--carrara-pearl-dark);
    color: var(--pure-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-speed) var(--ease-classic);
}

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

.form-label {
    position: absolute;
    left: 0;
    top: 0.75rem;
    color: var(--carrara-pearl-dark);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    pointer-events: none;
    transition: transform var(--transition-speed) var(--ease-classic), color var(--transition-speed) var(--ease-classic);
}

/* Floating Label Logic */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    transform: translateY(-1.5rem) scale(0.8);
    transform-origin: top left;
    color: var(--golden-brass);
}

/* Custom Imperial Compass Map CSS Section */
.compass-map-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(217, 119, 6, 0.2);
    padding: 3rem;
    background: radial-gradient(circle, rgba(153, 27, 27, 0.1) 0%, rgba(17, 24, 39, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.compass-map-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.4) 70%);
    pointer-events: none;
}

.compass-svg {
    width: 220px;
    height: 220px;
    fill: none;
    stroke: var(--golden-brass);
    stroke-width: 1.5;
    margin-bottom: 2rem;
    animation: rotateCompass 60s linear infinite;
}

@keyframes rotateCompass {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.location-info {
    text-align: center;
    z-index: 10;
}

.location-info h4 {
    font-size: 1.5rem;
    color: var(--golden-brass);
    margin-bottom: 0.75rem;
}

.location-info p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Legal Pages */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: var(--shadow-charcoal-light);
    border: 1px solid rgba(217, 119, 6, 0.2);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.legal-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--golden-brass);
    padding-bottom: 1.5rem;
}

.legal-content h3 {
    font-size: 1.3rem;
    color: var(--golden-brass);
    margin: 2.5rem 0 1rem 0;
}

.legal-content p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.7;
}

.legal-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: #0b0f19;
    border-top: 2px solid var(--golden-brass);
    padding: 5rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: var(--golden-brass);
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links li a {
    font-size: 0.9rem;
    color: var(--carrara-pearl-dark);
}

.footer-links li a:hover {
    color: var(--golden-brass);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
}

.newsletter-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-right: none;
    padding: 0.75rem 1rem;
    color: var(--pure-white);
    font-family: var(--font-body);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-btn {
    background-color: var(--golden-brass);
    color: var(--shadow-charcoal);
    border: 1px solid var(--golden-brass);
    padding: 0.75rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) var(--ease-classic);
}

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

.footer-bottom {
    border-top: 1px solid rgba(243, 244, 246, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--carrara-pearl-dark);
}

.footer-legal-links {
    display: flex;
    gap: 2rem;
}

.footer-legal-links a {
    font-size: 0.85rem;
    color: var(--carrara-pearl-dark);
}

/* Animations / Scroll reveal base states */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .arch-grid, .products-grid, .testimonials-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .header-container {
        padding: 1rem;
    }
    nav ul {
        display: none; /* Hide for mobile toggle, or let script handle */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--shadow-charcoal);
        border-bottom: 2px solid var(--golden-brass);
        padding: 2rem;
        gap: 1.5rem;
    }
    nav ul.show {
        display: flex;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-arch-frame {
        padding: 3rem 1.5rem 2rem 1.5rem;
    }
    .heritage-block {
        flex-direction: column-reverse;
        gap: 2rem;
    }
    .arch-grid, .products-grid, .testimonials-container {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-legal-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}
