/* ==========================================================================
   1. CSS Variables & Reset
   ========================================================================== */
:root {
    /* Deep Apple-style dark mode */
    --bg-dark: #050505;
    --text-main: #f5f5f7;
    --text-muted: #86868b;
    
    /* Warm wood-inspired accent for buttons and highlights */
    --accent-glow: #d8a05e; 
    --accent-hover: #e8b67b;

    /* Glassmorphism variables */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.logo-container img {
    height: 100px; /* Adjust this to your liking */
    width: auto;
    display: block;
    transition: height 0.3s ease; /* Smooths out the resize */
}
/* ==========================================================================
   2. Typography & Core Elements
   ========================================================================== */
/* 1. Base Heading Styles */
h1, h2, h3 {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-weight: 600; /* Dropped from 700 to 600 for a more 'refined' weight */
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #f5f5f7;
}

/* 2. Refined Scaling (The 'Premium' Scale) */
h1 {
    /* Max size is now 2.5rem (approx 40px), much more elegant */
    font-size: clamp(1.25rem, 4vw, 2.5rem); 
}

h2 {
    /* Always smaller than H1, maintains perfect hierarchy */
    font-size: clamp(1.15rem, 3vw, 2rem);     
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.5rem);   
}

/* 3. Accent */
h1 .accent {
    color: #e8c067;
}

p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-glow);
}

/* ==========================================================================
   3. Glassmorphism Navigation
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

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

nav ul a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

nav ul a:hover {
    color: var(--text-main);
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Changed from 'center' to push it left */
    text-align: left; /* Left-align the text for a modern editorial look */
    padding: 6rem 5% 2rem; /* Changed padding to give it a nice left margin */
    position: relative;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%),
                url('../images/hero-image.webp');
    background-size: cover;
    background-position: cente center;
    background-attachment: scroll; 
}

/* Subtle background glow behind the hero text */
#hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(216, 160, 94, 0.05) 0%, rgba(5, 5, 5, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    border-radius: 50%;
}

#hero p {
    margin: 0 auto 3rem auto;
}

/* ==========================================================================
   5. AEO Services Section (Glass Cards)
   ========================================================================== */
/* ==========================================================================
   5. AEO Services Section (Glass Cards)
   ========================================================================== */
#services {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

#services p {
    max-width: 800px;
}

dl {
    display: grid;
    /* Bumping this to 400px forces a strict 2-column maximum on desktop */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* The Glassmorphism Magic is now applied to the wrapper */
.service-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

dt {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
}

dd {
    color: var(--text-muted);
    margin-left: 0;
    line-height: 1.7;
}

dt:hover, dt:hover + dd {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}


/* ==========================================================================
   6. Product Portfolio (Masonry Grid)
   ========================================================================== */
#portfolio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header p {
    margin: 0 auto;
}

/* The CSS Columns trick for pure CSS masonry */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.grid-item {
    break-inside: avoid; /* Prevents an image from being split across columns */
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive columns for smaller screens */
@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* ==========================================================================
   7. Manufacturing Standards (Focus Boxes)
   ========================================================================== */
#standards {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
}

.standards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
/* Snap perfectly to a 2x2 grid on tablets/smaller screens */
@media (max-width: 950px) {
    .standards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .standards-grid {
        grid-template-columns: 1fr;
    }
}

.standard-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.standard-box:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Color the SVGs using our warm wood accent variable */
.standard-box svg {
    width: 45px;
    height: 45px;
    fill: var(--accent-glow);
    margin-bottom: 1.2rem;
}

.standard-box h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.8rem;
}

.standard-box p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}
/* ==========================================================================
   8. Forms & Buttons
   ========================================================================== */
#contact {
    max-width: 600px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input, textarea {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease;
    outline: none;
}

input:focus, textarea:focus {
    border-color: var(--accent-glow);
    background: rgba(255, 255, 255, 0.06);
}

button, .btn-primary {
    display: inline-block;
    background: var(--text-main);
    color: var(--bg-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: clamp(0.875rem, 2vw, 1rem);
    text-align: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
@media (max-width: 600px) {
    .btn-primary, .btn-secondary {
        padding: 0.6rem 1.2rem; /* Reduced padding for mobile */
        width: 100%; /* Makes buttons full-width for easy thumb tapping */
        margin-bottom: 0.5rem; /* Adds space if you have two buttons stacked */
    }
}

button:hover, .btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}
.nav-logo {
    max-height: 40px;
    width: auto;
    display: block;
}
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}
#hero h1, 
#hero h2 {
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}
/* Create a frosted glass container just for the text */
#hero article {
    background: rgba(5, 5, 5, 0.4); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 700px; 
    margin: 0; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
}





/* Update the paragraph margin so it aligns left properly */
#hero p {
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    margin: 0 0 3rem 0; 
}
.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* Keeps images from stretching */
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s;
}

.gallery-img:hover {
    transform: scale(1.02);
}

/* The Lightbox (Hidden by default) */
.lightbox {
    display: none; 
    position: fixed;
    z-index: 1000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    border: 3px solid white;
    border-radius: 4px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}
.contact-cta {
    text-align: center;
    padding: 2rem;
}

.call-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1); /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 50px; /* Fully rounded "pill" shape */
    color: #f5f5f7;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.call-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* On mobile, ensure the button is wide enough to tap */
@media (max-width: 600px) {
    .call-btn {
        width: 100%;
        justify-content: center;
    }
}
.feedback-success {
    background-color: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

.feedback-error {
    background-color: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
    border: 1px solid #d32f2f;
}
.site-footer {
    padding: 2rem;
    margin-top: 4rem;
    background: rgba(255, 255, 255, 0.05); /* Very subtle glass */
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #a0a0a0;
    font-size: 0.9rem;
}

.footer-content nav {
    margin-top: 10px;
}

.footer-content a {
    color: #e8c067; /* Matches your accent color */
    text-decoration: none;
    margin: 0 10px;
}

.footer-content a:hover {
    text-decoration: underline;
}
.page-wrapper {
    padding: 4rem 1rem;
    min-height: 80vh;
    display: flex;
    justify-content: center;
}

.glass-card {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
}

.glass-card h1 { color: #e8c067; margin-bottom: 0.5rem; }
.glass-card h2 { margin-top: 2rem; margin-bottom: 1rem; color: #f5f5f7; }
.glass-card p { color: #d1d5db; margin-bottom: 1rem; }
.last-updated { font-style: italic; font-size: 0.9rem; color: #9ca3af; margin-bottom: 2rem; }

#result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}