/* Main Stylesheet 
   Governance: implementation.md, designguide.md
*/

:root {
    --primary-color: #E31B23;
    --primary-accent: #C4161C;
    --text-color: #1A1A1A;
    --text-muted: #4A4A4A;
    --bg-color: #FFFFFF;
    --bg-alt: #F9F9F9;
    --bg-dark: #0A1128;
    --font-family-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --spacing-unit: 8px;
    --font-size-base: 16px;
    --border-radius: 4px;
    /* Stitch uses 4-6px */
    --container-width: 1200px;
}

/* Base Settings */
body {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: var(--container-width);
    z-index: 1000;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1A1A1A;
}

.logo-icon {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 20px;
    height: 20px;
}

.logo-icon div {
    background: var(--primary-color);
}

header nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li a {
    text-decoration: none;
    color: #1A1A1A;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

header nav ul li a:hover {
    color: var(--primary-color);
}

.btn-quote {
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.btn-quote:hover {
    background: var(--primary-accent);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
}

/* Components */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    min-width: 44px;
    min-height: 44px;
    transition: all 0.2s ease-in-out;
    text-align: center;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--primary-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 27, 35, 0.2);
}

.badge-red {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    font-weight: 800;
    text-align: center;
    display: inline-block;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.project-card .label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 3);
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto calc(var(--spacing-unit) * 6);
}

.grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 4);
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: white;
    padding: calc(var(--spacing-unit) * 4);
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

footer {
    background: var(--bg-dark);
    color: white;
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 4);
}

footer .footer-links {
    margin-bottom: var(--spacing-unit);
}

footer .footer-links a {
    margin: 0 10px;
    color: var(--text-color);
}