/* Design System Variables */
:root {
    --ink-dark: #1a1d29;
    --ink-medium: #2d3142;
    --ink-light: #4f5d75;
    --paper: #fafbfc;
    --paper-warm: #f5f3f0;
    --accent-rust: #c85a3e;
    --accent-copper: #d4915d;
    --accent-slate: #627d98;
    --accent-teal: #4a8b8b;
    --neutral-100: #e8eaed;
    --neutral-200: #d1d5db;

    --shadow-sm: 0 1px 3px rgba(26, 29, 41, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 29, 41, 0.08);
    --shadow-lg: 0 8px 24px rgba(26, 29, 41, 0.12);

    --serif: 'Merriweather', Georgia, serif;
    --sans: 'DM Sans', system-ui, sans-serif;
}

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

body {
    font-family: var(--sans);
    line-height: 1.7;
    color: var(--ink-dark);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.1;
    color: var(--ink-dark);
    font-optical-sizing: auto;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: clamp(0.75rem, 2vw, 1rem); margin-bottom: 0.5rem; }

p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--ink-medium);
    margin-bottom: 1.25rem;
}

a {
    color: #00e;
    text-decoration: none;
}

/* Navigation - Editorial Style */
header {
    background: var(--paper);
    border-bottom: 1px solid var(--neutral-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(250, 251, 252, 0.95);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ink-dark);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-rust);
    margin-top: 0.25rem;
}

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

nav > ul > li {
    position: relative;
}

nav a {
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink-medium);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    display: block;
}

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

nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-rust);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav > ul > li > a:hover::after {
    width: 100%;
}

/* Dropdown submenu styles */
nav ul ul {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 3px;
    min-width: 250px;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

/* Create invisible bridge between menu item and dropdown */
nav > ul > li::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
    display: none;
}

nav > ul > li:hover::after {
    display: block;
}

nav ul li:hover > ul {
    display: block;
}

nav ul ul li {
    width: 100%;
    border-bottom: 1px solid var(--neutral-100);
}

nav ul ul li:last-child {
    border-bottom: none;
}

nav ul ul a {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

nav ul ul a:hover {
    background: var(--paper-warm);
    color: var(--accent-rust);
    padding-left: 2rem;
}

nav ul ul a::after {
    display: none;
}

/* Hero - Editorial Layout */
.hero {
    background: var(--ink-dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(200, 90, 62, 0.05) 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 3rem;
    position: relative;
}

.hero-kicker {
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-copper);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero h1 {
    color: var(--paper);
    max-width: 900px;
    font-weight: 500;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--neutral-100);
    max-width: 700px;
    margin: 2rem 0 3rem 0;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-rust);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.btn:hover {
    background: var(--ink-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Content Sections - Asymmetric Editorial */
main {
    min-height: calc(100vh - 200px);
}

.content-section {
    padding: 6rem 3rem;
    position: relative;
}

.content-section:nth-child(even) {
    background: var(--paper-warm);
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2%;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--neutral-200) 20%,
        var(--neutral-200) 80%,
        transparent 100%);
    opacity: 0.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    max-width: 800px;
    margin-bottom: 4rem;
}

.section-header ul, .section-header ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--ink-medium);
}

.section-header li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.section-kicker {
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-rust);
    margin-bottom: 1rem;
}

/* Card Grid - Sophisticated Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.card {
    background: white;
    padding: 2.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent-rust);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--neutral-100);
}

.card:hover::before {
    height: 100%;
}

.card h3 {
    font-size: 1.5rem;
    color: var(--ink-dark);
    margin-bottom: 1rem;
}

.card p {
    font-size: 1rem;
    color: var(--ink-light);
    line-height: 1.7;
}

/* Blog Posts - Magazine Style */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 900px;
}

.post-card {
    background: white;
    padding: 2.5rem;
    border-left: 2px solid var(--accent-rust);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.post-card::after {
    content: '→';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent-rust);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    padding-left: 3rem;
    background: var(--paper-warm);
}

.post-card:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
}

.post-meta {
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 0.75rem;
}

.post-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--ink-dark);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--accent-rust);
}

.post-excerpt {
    font-size: 1rem;
    color: var(--ink-medium);
    line-height: 1.7;
}

/* Footer - Clean & Refined */
footer {
    background: var(--ink-dark);
    color: var(--paper);
    padding: 3rem;
    border-top: 1px solid var(--ink-medium);
}

footer .container {
    text-align: center;
}

footer p {
    color: var(--neutral-100);
    font-size: 0.9375rem;
    opacity: 0.8;
}

/* Content Typography */
.content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content ul, .content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--ink-medium);
}

.content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.content a, .section-header a {
    color: var(--accent-rust);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-rust);
    transition: all 0.2s ease;
}

.content a:hover {
    color: var(--ink-dark);
    border-bottom-color: var(--ink-dark);
}

/* Contact Form Styles */
.contact-form {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--neutral-200);
}

.contact-form .hidden {
    display: none;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink-dark);
    margin-bottom: 0.5rem;
}

.form-group .optional {
    font-weight: 400;
    color: var(--ink-light);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink-dark);
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-rust);
    box-shadow: 0 0 0 3px rgba(200, 90, 62, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--neutral-200);
}

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

.contact-form .btn {
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.contact-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        padding: 1.25rem 2rem;
    }

    .hero-content {
        padding: 5rem 2rem;
    }

    .content-section {
        padding: 4rem 2rem;
    }

    .content-section::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-content {
        padding: 4rem 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .content-section {
        padding: 3rem 1.5rem;
    }
}
