/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette - Elegant Dark Blue Scheme */
    --ink-black: #1a1a1a;
    --charcoal: #2d2d2d;
    --deep-blue: #0d2840;
    --steel-blue: #1a4971;
    --parchment: #f5f7fa;
    --cream: #fafbfc;
    --warm-white: #ffffff;
    --accent-gold: #d4a574;
    --light-gray: #e3e8ef;
    --border-gray: #c5d0dd;

    /* Typography Scale */
    --font-body: Georgia, 'Times New Roman', serif;
    --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --border-radius: 2px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--charcoal);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--deep-blue);
    color: var(--warm-white);
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    z-index: 100;
    font-family: var(--font-heading);
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink-black);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

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

h4 {
    font-size: 1.25rem;
    margin-top: var(--space-lg);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--deep-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--steel-blue);
    border-bottom-color: var(--steel-blue);
}

a:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

ul, ol {
    margin-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

li {
    margin-bottom: var(--space-xs);
}

address {
    font-style: normal;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

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

/* Header and Navigation */
header {
    background: var(--deep-blue);
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--warm-white);
    letter-spacing: -0.01em;
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
}

.nav-menu a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--cream);
    border-bottom: 2px solid transparent;
    padding-bottom: 0.25rem;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--warm-white);
    border-bottom-color: var(--accent-gold);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0a1f33 0%, var(--deep-blue) 50%, var(--steel-blue) 100%);
    color: var(--warm-white);
    padding: var(--space-2xl) var(--space-md);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gold);
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--warm-white);
    margin-bottom: var(--space-md);
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    color: var(--parchment);
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.button-primary,
.button-secondary {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.button-primary {
    background: var(--accent-gold);
    color: var(--deep-blue);
    border-color: var(--accent-gold);
}

.button-primary:hover,
.button-primary:focus {
    background: transparent;
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.button-secondary {
    background: transparent;
    color: var(--warm-white);
    border-color: var(--warm-white);
}

.button-secondary:hover,
.button-secondary:focus {
    background: var(--warm-white);
    color: var(--deep-blue);
}

/* Leistungen Section */
.leistungen {
    background: var(--parchment);
}

.section-intro {
    max-width: var(--container-narrow);
    font-size: 1.25rem;
    margin: 0 auto var(--space-xl);
    text-align: center;
    color: var(--deep-blue);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.service-card {
    background: var(--warm-white);
    padding: var(--space-lg);
    border: 1px solid var(--border-gray);
    border-left: 3px solid var(--steel-blue);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 40, 64, 0.12);
    border-left-color: var(--accent-gold);
}

.service-image {
    margin: calc(var(--space-lg) * -1) calc(var(--space-lg) * -1) var(--space-md);
}

.service-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.service-card h3 {
    color: var(--deep-blue);
    margin-bottom: var(--space-sm);
    font-size: 1.375rem;
}

.service-card p {
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Anwälte Section */
.anwaelte {
    background: var(--warm-white);
}

.lawyers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

@media (min-width: 768px) {
    .lawyers-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.lawyer-card {
    background: var(--parchment);
    border: 1px solid var(--border-gray);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lawyer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 40, 64, 0.12);
}

.lawyer-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.lawyer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lawyer-info {
    padding: var(--space-lg);
}

.lawyer-info h3 {
    color: var(--deep-blue);
    margin-bottom: var(--space-sm);
    font-size: 1.5rem;
}

.lawyer-info p {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    line-height: 1.6;
}

.lawyer-info p:last-child {
    margin-bottom: 0;
}

.lawyer-role {
    color: var(--deep-blue);
    font-style: italic;
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs);
}

.lawyer-specialty {
    color: var(--charcoal);
    margin-bottom: var(--space-sm);
    font-size: 0.9375rem;
}

/* Über uns Section */
.ueber-uns {
    background: var(--parchment);
}

.about-text h2 {
    margin-bottom: var(--space-lg);
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.7;
}

.credentials {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--warm-white);
    border-left: 3px solid var(--steel-blue);
}

.credentials p {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.credentials p:last-child {
    margin-bottom: 0;
}

/* Kontakt Section */
.kontakt {
    background: var(--warm-white);
}

.contact-info {
    max-width: var(--container-narrow);
    margin: var(--space-xl) auto 0;
}

.contact-info h3 {
    color: var(--deep-blue);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.contact-info h3:first-child {
    margin-top: 0;
}

.contact-info address p {
    margin-bottom: var(--space-xs);
}

.contact-methods p {
    margin-bottom: var(--space-md);
}

.contact-methods strong {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--ink-black);
}

.hours {
    background: var(--parchment);
    padding: var(--space-lg);
    border: 1px solid var(--border-gray);
    border-left: 3px solid var(--steel-blue);
    margin-top: var(--space-lg);
}

.hours h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.hours p {
    margin-bottom: var(--space-sm);
}

.hours p:last-child {
    margin-bottom: 0;
}

.appointment-note {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--deep-blue);
    color: var(--warm-white);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

/* Footer */
footer {
    background: var(--deep-blue);
    color: var(--parchment);
    padding: var(--space-lg) 0;
    margin-top: var(--space-2xl);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-content p {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
}

.footer-links a {
    color: var(--parchment);
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    border-bottom: 1px solid transparent;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* Legal Sections */
.legal-section {
    padding: var(--space-2xl) 0;
    background: var(--warm-white);
    border-top: 1px solid var(--border-gray);
}

.legal-section .container {
    max-width: var(--container-narrow);
}

.legal-section h2 {
    color: var(--deep-blue);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--steel-blue);
}

.legal-section h3 {
    color: var(--deep-blue);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.legal-section h4 {
    color: var(--deep-blue);
    font-size: 1.125rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.legal-section p,
.legal-section li {
    font-size: 1rem;
    line-height: 1.7;
}

.legal-section ul {
    margin-left: var(--space-lg);
}

.legal-section address {
    margin: var(--space-md) 0;
}

.legal-update {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--light-gray);
    font-style: italic;
    color: var(--deep-blue);
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .nav-menu {
        gap: var(--space-md);
    }

    .nav-menu a {
        font-size: 0.9375rem;
    }

    .hero {
        min-height: 60vh;
        padding: var(--space-xl) var(--space-md);
    }

    .hero-cta {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
        max-width: 300px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-left {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .hero,
    header,
    footer,
    .skip-link {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

    .section {
        page-break-inside: avoid;
    }
}
