/* 
 * KGM Manufacturing LLC - Brand System and Layout
 * Design language based on the "现代工业、精酿感、专业制造"方案
 * Components: Global tokens, navigation, hero, section grids, cards, forms, sidebar, CTA, footer.
 */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Josefin+Sans:wght@400;500;600&family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
    /* Brand palette */
    --primary: #1A365D;        /* 深蓝 - 专业信任 */
    --amber: #D69E2E;          /* 琥珀色 - 酿造传统 */
    --copper: #B7791F;         /* 铜色 - 工艺质感 */
    --cream: #FFFBEB;          /* 奶油白 - 温暖背景 */
    --slate: #4A5568;          /* 次要文字 */
    --ink: #111827;            /* 主文字 */
    --muted: #E5E7EB;          /* 辅助线条 */
    --surface: #FFFFFF;        /* 卡片与背景 */
    --bg: #F7F9FC;             /* 页面背景 */

    /* Typography */
    --font-display: 'Bebas Neue', 'Josefin Sans', 'Open Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Josefin Sans', 'Open Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Open Sans', system-ui, -apple-system, sans-serif;

    /* Spacing scale */
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Radius & shadow */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --shadow-sm: 0 8px 20px rgba(17, 24, 39, 0.08);
    --shadow-md: 0 14px 30px rgba(17, 24, 39, 0.12);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.4);

    /* Layout */
    --max-width: 1200px;
    --nav-height: 78px;
}

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--bg);
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-4);
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.25;
    letter-spacing: 0.01em;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.75rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 var(--space-5);
    color: var(--slate);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--copper);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

ul, ol {
    padding-left: var(--space-5);
    color: var(--slate);
    margin: 0 0 var(--space-5);
}

strong { color: var(--ink); }

.container {
    width: min(92%, var(--max-width));
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.flex {
    display: flex;
    align-items: center;
}

.section {
    padding: var(--space-16) 0;
}

.section-tight {
    padding: var(--space-12) 0;
}

.section-muted {
    background: var(--cream);
}

.section-dark {
    background: var(--primary);
    color: var(--surface);
}

.section-dark p,
.section-dark h2,
.section-dark h3 {
    color: var(--surface);
}

.eyebrow {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(214, 158, 46, 0.12);
    color: var(--copper);
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: var(--space-3);
}

.lead {
    font-size: 1.05rem;
    color: var(--slate);
    max-width: 760px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary);
    color: var(--surface);
}

.btn-primary:hover {
    background: #12294a;
}

.btn-ghost {
    background: transparent;
    color: var(--surface);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
    border-color: var(--surface);
}

.btn-amber {
    background: var(--amber);
    color: #1f2937;
}

.btn-amber:hover {
    background: #c28516;
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(26, 54, 93, 0.08);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 16px;
    top: 12px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: var(--amber);
    color: #111;
    z-index: 1100;
    border-radius: var(--radius-sm);
}

/* Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-bar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--ink);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(26, 54, 93, 0.06);
}

.dropdown-menu,
.dropdown-menu-secondary {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 220px;
    background: var(--surface);
    padding: var(--space-3) 0;
    margin: 0;
    list-style: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
    display: none;
}

.dropdown-menu-secondary {
    top: 0;
    left: 100%;
}

.nav-item:hover > .dropdown-menu,
.dropdown-item:hover > .dropdown-menu-secondary {
    display: block;
}

.dropdown-item a {
    display: block;
    padding: 10px var(--space-4);
    color: var(--slate);
}

.dropdown-item a:hover {
    background: rgba(26, 54, 93, 0.08);
    color: var(--primary);
}

.nav-cta {
    display: none;
}

/* Mobile nav */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
}

@media (max-width: 960px) {
    .nav-bar {
        height: auto;
        padding: var(--space-4) 0;
        flex-wrap: wrap;
    }

    .nav-toggle-label {
        display: block;
        margin-left: auto;
    }

    .nav-menu {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        background: var(--surface);
        border: 1px solid var(--muted);
        border-radius: var(--radius-md);
        padding: var(--space-4);
        display: none;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 12px;
        border-radius: var(--radius-sm);
    }

    .dropdown-menu,
    .dropdown-menu-secondary {
        position: relative;
        top: auto;
        left: auto;
        box-shadow: none;
        border: none;
        padding-left: var(--space-4);
    }

    .nav-toggle:checked ~ nav .nav-menu {
        display: flex;
    }
}

/* Hero sections */
.hero,
.page-hero {
    position: relative;
    color: var(--surface);
    overflow: hidden;
}

.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero::before,
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(26, 54, 93, 0.85), rgba(26, 54, 93, 0.55));
}

.hero-content,
.page-hero .hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content h1 {
    color: #fff;
    margin-bottom: var(--space-4);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-5);
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.trust-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow-inset);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--muted);
}

.stat-card h3 {
    margin: 0 0 var(--space-2);
    color: var(--amber);
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}

.stat-card p {
    margin: 0;
    color: var(--slate);
}

.capability-card,
.case-card,
.industry-card,
.cert-card,
.resource-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--muted);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.capability-card:hover,
.case-card:hover,
.industry-card:hover,
.cert-card:hover,
.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(26, 54, 93, 0.4);
}

.capability-card h3,
.case-card h3,
.industry-card h3,
.resource-card h3 {
    color: var(--primary);
}

.capability-card,
.case-card {
    display: flex;
    flex-direction: column;
}

.capability-card img,
.case-card img {
    width: 100%;
    height: clamp(180px, 24vw, 240px);
    object-fit: cover;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.capability-card .btn,
.case-card .btn {
    margin-top: auto;
}

.card-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(214, 158, 46, 0.15);
    color: var(--copper);
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5);
}

.benefit-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-3);
    align-items: start;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--muted);
}

.benefit-dot {
    width: 12px;
    height: 12px;
    background: var(--amber);
    border-radius: 50%;
    margin-top: 6px;
}

.industry-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: var(--space-4) 0;
}

.industry-pill {
    padding: 10px 16px;
    border: 2px solid var(--slate);
    border-radius: 999px;
    color: var(--slate);
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.industry-pill:hover,
.industry-pill.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.media-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    align-items: center;
}

.media-block img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.cta-panel {
    background: linear-gradient(135deg, var(--primary), #102545);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-12);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.cta-panel::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(214, 158, 46, 0.28) 0%, rgba(16, 36, 69, 0) 70%);
    right: -40px;
    bottom: -40px;
}

.cta-panel h2,
.cta-panel p {
    color: #fff;
    position: relative;
    z-index: 1;
}

.cta-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-5);
    position: relative;
    z-index: 1;
}

.page-locations {
    padding-bottom: var(--space-12);
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-6);
    align-items: start;
}

.locations-map {
    min-height: 360px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--muted);
    background: #fff;
}

.locations-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Sidebar navigation */
.side-layout {
    display: grid;
    gap: var(--space-8);
    grid-template-columns: 320px 1fr;
}

.side-nav {
    background: var(--surface);
    border: 1px solid var(--muted);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--nav-height) + var(--space-4));
}

.side-nav h3 {
    margin-bottom: var(--space-4);
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav li {
    margin-bottom: var(--space-3);
}

.side-nav a {
    color: var(--slate);
    font-weight: 600;
}

.side-nav a:hover {
    color: var(--primary);
}

.side-nav ul ul {
    margin-top: var(--space-2);
    margin-left: var(--space-4);
}

@media (max-width: 1100px) {
    .side-layout {
        grid-template-columns: 1fr;
    }

    .side-nav {
        position: static;
    }
}

/* Form styles */
form {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}

label {
    display: block;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-2);
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--muted);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.faq-item {
    border: 1px solid var(--muted);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.faq-item + .faq-item {
    margin-top: var(--space-4);
}

.faq-item h4 {
    margin-bottom: var(--space-3);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-6);
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--muted);
}

th {
    background: rgba(26, 54, 93, 0.05);
    color: var(--primary);
    font-weight: 700;
}

/* Footer */
.footer {
    background: #0f1e36;
    color: #e5e7eb;
    padding: var(--space-16) 0 var(--space-12);
    margin-top: var(--space-12);
}

.footer h3 {
    color: #fff;
}

.footer a {
    color: #e5e7eb;
}

.footer a:hover {
    color: var(--amber);
}

.footer .social {
    display: flex;
    gap: var(--space-3);
}

.footer .social a {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.footer-bottom {
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #cbd5e1;
}

/* Utility spacing */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-light { color: #fff; }

/* Responsive tweaks */
@media (max-width: 720px) {
    .hero, .page-hero {
        min-height: 320px;
        text-align: left;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-row,
    .trust-row {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}
