/* ========================================
   TYPOGRAPHY & FONT IMPORTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Merriweather:wght@300;400;700&display=swap');

/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */
:root {
    --color-primary: #F5F5F5;
    --color-secondary: #333333;
    --color-neutral-light: #EEEEEE;
    --color-neutral-medium: #CCCCCC;
    --color-neutral-gray: #666666;
    --color-accent-blue: #4A90E2;
    --color-accent-red: #D0021B;
    --color-accent-green: #7ED321;
    
    --font-sans: 'Open Sans', sans-serif;
    --font-serif: 'Merriweather', serif;
    
    --spacing-unit: 8px;
    --max-width-content: 1200px;
    --max-width-full: 1440px;
    
    --transition-smooth: all 0.3s ease-in-out;
    --transition-slow: all 0.5s ease-in-out;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    color: var(--color-secondary);
    background-color: var(--color-primary);
    line-height: 1.6;
    letter-spacing: 0.3px;
}

/* ========================================
   TYPOGRAPHY HIERARCHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.5px;
    margin-bottom: calc(var(--spacing-unit) * 3);
    text-rendering: optimizeLegibility;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

h4 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

p {
    margin-bottom: calc(var(--spacing-unit) * 2);
    line-height: 1.7;
}

a {
    color: var(--color-accent-blue);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

ul, ol {
    margin-left: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 2);
    line-height: 1.8;
}

li {
    margin-bottom: calc(var(--spacing-unit) * 1);
}

strong {
    font-weight: 700;
    color: var(--color-secondary);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.site-header {
    background-color: var(--color-primary);
    border-bottom: 1px solid var(--color-neutral-medium);
    padding: calc(var(--spacing-unit) * 3) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-name {
    font-size: 1.8rem;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

.brand-name a {
    color: var(--color-secondary);
    text-decoration: none;
}

.brand-name a:hover {
    color: var(--color-accent-blue);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: calc(var(--spacing-unit) * 4);
    margin: 0;
}

.nav-menu a {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-secondary);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-blue);
    transition: width 0.3s ease-in-out;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--color-accent-blue);
    font-weight: 600;
}

/* ========================================
   MAIN CONTENT & LAYOUT
   ======================================== */
.main-content {
    min-height: calc(100vh - 300px);
}

.content-wrapper {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

.full-width {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.section {
    padding: calc(var(--spacing-unit) * 10) 0;
    border-bottom: 1px solid var(--color-neutral-medium);
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-accent-blue);
}

/* ========================================
   GRID SYSTEM (12-Column)
   ======================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.grid-col-12 { grid-column: span 12; }
.grid-col-6 { grid-column: span 6; }
.grid-col-4 { grid-column: span 4; }
.grid-col-3 { grid-column: span 3; }
.grid-col-8 { grid-column: span 8; }
.grid-col-9 { grid-column: span 9; }

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(12, 1fr);
        gap: calc(var(--spacing-unit) * 2);
    }
    .grid-col-6,
    .grid-col-8,
    .grid-col-9,
    .grid-col-4,
    .grid-col-3 {
        grid-column: span 12;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-neutral-light) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 760"><rect fill="%23F5F5F5" width="1440" height="760"/><circle cx="72" cy="188" r="68" fill="%23EEEEEE" opacity="0.5"/><circle cx="1368" cy="630" r="100" fill="%23EEEEEE" opacity="0.3"/></svg>');
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
}

.hero h1 {
    color: var(--color-secondary);
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-rendering: optimizeLegibility;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--color-neutral-gray);
    font-family: var(--font-sans);
    font-weight: 300;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.hero-cta {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    background-color: var(--color-accent-blue);
    color: var(--color-primary);
    font-family: var(--font-sans);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--color-accent-blue);
    border-radius: 4px;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.hero-cta:hover {
    background-color: transparent;
    color: var(--color-accent-blue);
    text-decoration: none;
}

/* ========================================
   CARD COMPONENTS
   ======================================== */
.card {
    background-color: white;
    border: 1px solid var(--color-neutral-medium);
    border-radius: 4px;
    padding: calc(var(--spacing-unit) * 3);
    transition: var(--transition-smooth);
}

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

.card-title {
    font-size: 1.35rem;
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-secondary);
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-neutral-gray);
}

/* ========================================
   IMAGE CONTAINERS
   ======================================== */
.image-container {
    position: relative;
    width: 100%;
    margin-bottom: calc(var(--spacing-unit) * 3);
    overflow: hidden;
    border-radius: 4px;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.image-caption {
    margin-top: calc(var(--spacing-unit) * 1.5);
    font-size: 0.85rem;
    color: var(--color-neutral-gray);
    font-style: italic;
    line-height: 1.6;
}

/* ========================================
   BUTTONS & FORMS
   ======================================== */
button, .button {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background-color: #3a7bc8;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent-blue);
    border: 2px solid var(--color-accent-blue);
}

.btn-secondary:hover {
    background-color: var(--color-accent-blue);
    color: white;
}

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

.btn-accent-green:hover {
    background-color: #6bc010;
    color: white;
    text-decoration: none;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
form {
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

label {
    display: block;
    margin-bottom: calc(var(--spacing-unit) * 1);
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--color-secondary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: calc(var(--spacing-unit) * 2);
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 1px solid var(--color-neutral-medium);
    border-radius: 4px;
    background-color: white;
    color: var(--color-secondary);
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

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

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background-color: var(--color-secondary);
    color: white;
    padding: calc(var(--spacing-unit) * 8) 0 calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 10);
}

.footer-content {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.footer-section {
    line-height: 1.8;
}

.footer-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: white;
}

.footer-section p {
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
    margin-left: 0;
}

.footer-links li {
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-accent-blue);
    text-decoration: underline;
}

.footer-bottom {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: #aaaaaa;
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-neutral-gray);
}

.highlight {
    color: var(--color-accent-blue);
    font-weight: 600;
}

.alert {
    padding: calc(var(--spacing-unit) * 3);
    border-radius: 4px;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #0c5460;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid var(--color-accent-red);
    color: #721c24;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 calc(var(--spacing-unit) * 2);
    }
    
    .content-wrapper {
        padding: 0 calc(var(--spacing-unit) * 2);
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: calc(var(--spacing-unit) * 6) 0;
    }
    
    .nav-menu {
        gap: calc(var(--spacing-unit) * 2);
    }
    
    .hero {
        height: 50vh;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
