/* ===================================
   WEG INS LEBEN - TUFTE CSS VARIANT
   Minimalistisches Design nach Edward Tufte
   =================================== */

/* ===================================
   FONT-FACE DECLARATIONS
   =================================== */

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/AtkinsonHyperlegibleNext-Regular.woff2 -->') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/AtkinsonHyperlegibleNext-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===================================
   TUFTE CSS VARIABLES - OPEN COLOR
   =================================== */

:root {
    /* Open Color System - Gray Palette */
    --oc-gray-0: #f8f9fa;
    --oc-gray-1: #f1f3f5;
    --oc-gray-2: #e9ecef;
    --oc-gray-3: #dee2e6;
    --oc-gray-4: #ced4da;
    --oc-gray-5: #adb5bd;
    --oc-gray-6: #868e96;
    --oc-gray-7: #495057;
    --oc-gray-8: #343a40;
    --oc-gray-9: #212529;
    
    /* Open Color System - Orange Palette (Akzentfarbe) */
    --oc-orange-0: #fff4e6;
    --oc-orange-1: #ffe8cc;
    --oc-orange-2: #ffd8a8;
    --oc-orange-3: #ffc078;
    --oc-orange-4: #ffa94d;
    --oc-orange-5: #ff922b;
    --oc-orange-6: #fd7e14;
    --oc-orange-7: #f76707;
    --oc-orange-8: #e8590c;
    --oc-orange-9: #d9480f;
    
    /* Semantische Farben */
    --color-text: var(--oc-gray-9);
    --color-text-light: var(--oc-gray-6);
    --color-background: var(--oc-gray-0);
    --color-border: var(--oc-gray-3);
    --color-link: var(--oc-orange-7);
    --color-link-hover: var(--oc-orange-9);
    --color-accent: var(--oc-orange-6);
    --color-accent-light: var(--oc-orange-1);
    --color-surface: #ffffff;
    
    /* Typografie */
    --font-family: 'Atkinson Hyperlegible', 'Palatino Linotype', Palatino, Georgia, serif;
    --font-size-base: 1.4rem;
    --line-height: 2rem;
    
    /* Layout Breiten */
    --text-width: 55%;
    --margin-note-width: 25%;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

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

html {
    font-size: 15px;
}

body {
    width: 87.5%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12.5%;
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text);
    max-width: 1400px;
    counter-reset: sidenote-counter;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4 {
    font-weight: 600;
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    line-height: 1.2;
}

h1 {
    font-weight: 400;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-size: 3.2rem;
    line-height: 1;
}

h2 {
    font-style: italic;
    font-weight: 400;
    margin-top: 2.1rem;
    font-size: 2.2rem;
    line-height: 1;
}

h3 {
    font-size: 1.7rem;
    margin-top: 2rem;
}

h4 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
}

p, ol, ul {
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    width: var(--text-width);
    padding-right: 0;
    vertical-align: baseline;
}

/* Blockquotes */
blockquote {
    font-size: 1.4rem;
    line-height: 2rem;
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    margin-left: 2.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--oc-orange-4);
    font-style: italic;
    width: calc(var(--text-width) - 3.5rem);
}

blockquote p {
    width: 100%;
    margin: 0;
}

/* ===================================
   LINKS
   =================================== */

a {
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px solid var(--color-accent-light);
    transition: color 0.15s ease;
}

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

/* ===================================
   SIDENOTES & MARGIN NOTES
   =================================== */

.sidenote,
.marginnote {
    float: right;
    clear: right;
    margin-right: -60%;
    width: 50%;
    margin-top: 0.3rem;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    vertical-align: baseline;
    position: relative;
}

.sidenote-number {
    counter-increment: sidenote-counter;
    display: inline;
    cursor: pointer;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    /* Verhindert Zeilenumbrüche */
    white-space: nowrap;
}

/* Verstecke input-basierte sidenote triggers */
input.sidenote-number {
    display: none;
}

/* Sidenote-Nummer im Text */
label.sidenote-number {
    display: inline;
    margin: 0;
    padding: 0;
}

.sidenote-number:after,
.sidenote:before {
    font-family: var(--font-family);
    position: relative;
    vertical-align: baseline;
}

.sidenote-number:after {
    content: counter(sidenote-counter);
    font-size: 0.9rem;
    vertical-align: super;
    line-height: 0;
    color: var(--color-link);
    padding: 0 0.1rem;
}

.sidenote:before {
    content: counter(sidenote-counter) " ";
    font-size: 1rem;
    top: -0.5rem;
}

/* Bilder in Marginnotes */
.marginnote img,
.sidenote img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
}

.marginnote em,
.sidenote em {
    display: block;
    font-size: 0.9rem;
    line-height: 1.3;
    font-style: italic;
    color: var(--oc-gray-6);
    margin-top: 0.3rem;
}

/* ===================================
   AKTUELLE TERMINE / ANKÜNDIGUNGEN
   =================================== */

.aktuelle-termine {
    background: var(--oc-orange-1);
    border-left: 4px solid var(--oc-orange-6);
    padding: 2rem;
    margin-bottom: 4rem;
    margin-left: -12.5%;
    padding-left: calc(12.5% + 2rem);
    padding-right: 12.5%;
    width: calc(100% + 12.5%);
}

.aktuelle-termine h2 {
    color: var(--oc-orange-9);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.aktuelle-termine p {
    width: var(--text-width);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.8;
}

.aktuelle-termine ul {
    width: var(--text-width);
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.aktuelle-termine li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--oc-orange-3);
}

.aktuelle-termine li:last-child {
    border-bottom: none;
}

.termin-datum {
    font-weight: 600;
    color: var(--oc-orange-9);
    display: inline-block;
    min-width: 120px;
}

.termin-titel {
    color: var(--oc-gray-9);
    font-weight: 600;
}

.termin-details {
    font-size: 1.1rem;
    color: var(--oc-gray-7);
    margin-top: 0.3rem;
}

.aktuelle-termine a {
    color: var(--oc-orange-9);
    font-weight: 600;
    border-bottom: 2px solid var(--oc-orange-6);
}

.aktuelle-termine a:hover {
    color: var(--oc-orange-7);
    border-bottom-color: var(--oc-orange-7);
}

/* Alternative: Kompakte Single-Termin Ankündigung */
.termin-ankuendigung-kompakt {
    background: var(--oc-orange-6);
    color: white;
    padding: 1.5rem;
    margin-bottom: 4rem;
    margin-left: -12.5%;
    padding-left: calc(12.5% + 1.5rem);
    padding-right: 12.5%;
    width: calc(100% + 12.5%);
    text-align: left;
}

.termin-ankuendigung-kompakt p {
    width: var(--text-width);
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.6;
}

.termin-ankuendigung-kompakt strong {
    font-size: 1.5rem;
}

.termin-ankuendigung-kompakt a {
    color: white;
    border-bottom: 2px solid white;
    font-weight: 600;
}

.termin-ankuendigung-kompakt a:hover {
    color: var(--oc-orange-1);
    border-bottom-color: var(--oc-orange-1);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

header {
    margin-bottom: 4rem;
    /* Volle Breite: Kompensiere body padding */
    margin-left: -12.5%;
    padding-left: 12.5%;
    padding-right: 12.5%;
    padding-top: 1rem;
    padding-bottom: 1rem;
    width: calc(100% + 12.5%);
    /* Optional: Subtiler Hintergrund für visuelle Trennung */
    background-color: var(--color-background);
}

.site-title {
    font-weight: 400;
    font-size: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 0;
    line-height: 1.2;
    width: 100%;
}

nav {
    width: 100%;
}

.nav-container {
    padding: 0;
    max-width: none;
    width: 100%;
}

.nav-menu {
    list-style: none;
    margin-top: 1rem;
    padding: 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 0.7rem 0;
    width: 100%;
}

.nav-menu li {
    display: inline-block;
    margin-right: 1.5rem;
}

.nav-menu a {
    color: var(--color-text);
    border: none;
    font-size: 1.1rem;
    text-transform: lowercase;
}

.nav-menu a:hover {
    color: var(--color-link);
}

.nav-toggle {
    display: none;
}

/* ===================================
   SECTIONS & LAYOUT
   =================================== */

section {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

/* @group /*/*/*Untitled Group*/ */*/*/

/* @group Untitled Group */

.section-intro {
    font-size: 1.3rem;
    line-height: 1.8rem;
    margin-bottom: 2rem;
    font-style: italic;
    color: var(--color-text-light);
    width: var(--text-width);
}

/* @end */

/* @end */

/* ===================================
   CONTENT BLOCKS
   =================================== */

article {
    margin-bottom: 3rem;
}

.content-grid,
.phases-grid,
.offers-grid,
.termine-grid {
    width: 100%;
    margin-top: 2rem;
}

.content-block,
.phase-card,
.offer-card,
.termin-card {
    margin-bottom: 2.5rem;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.content-block h3,
.phase-card h3,
.offer-card h3,
.termin-card h3 {
    margin-top: 0;
    font-weight: 600;
    color: var(--oc-gray-9);
}

/* Subtle border for emphasis */
.highlight-box {
    border-left: 3px solid var(--oc-orange-6);
    padding-left: 1.5rem;
    background: none;
    width: var(--text-width);
}
    width: var(--text-width);
}

/* ===================================
   LISTS
   =================================== */

ul, ol {
    padding-left: 1.5rem;
    width: var(--text-width);
}

li {
    padding: 0.5rem 0;
}

/* ===================================
   PHASE DETAILS (SUMMARY/DETAILS)
   =================================== */

details {
    margin-top: 1rem;
    width: var(--text-width);
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-accent);
    list-style: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.2s;
}

details[open] summary::before {
    transform: rotate(90deg);
}

.phase-content {
    padding-top: 1rem;
    font-size: 1.2rem;
    line-height: 1.8rem;
}

.phase-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.phase-subtitle {
    font-style: italic;
    color: var(--oc-gray-6);
    font-size: 1.2rem;
}

/* ===================================
   TERMINE CARDS
   =================================== */

.termin-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.termin-kategorie {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
}

.termin-datum {
    font-style: italic;
    color: var(--oc-gray-6);
}

.termin-info {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    width: var(--text-width);
}

.termin-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.2s;
}

.termin-button:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* ===================================
   FORMS
   =================================== */

.contact-form {
    width: var(--text-width);
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.5rem;
    font-family: var(--font-family);
    font-size: 1.2rem;
    border: 1px solid var(--color-border);
    background: white;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
}

textarea {
    min-height: 150px;
}

.submit-button {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 0.7rem 2rem;
    font-family: var(--font-family);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-button:hover {
    background: var(--color-accent);
    color: white;
}

/* ===================================
   FOOTER
   =================================== */

footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section {
    /* Jede Spalte nimmt gleich viel Platz ein */
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
}

.footer-section p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    width: 100%;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.footer-section li {
    padding: 0.3rem 0;
}

.footer-section a {
    color: var(--color-text);
    border: none;
    font-size: 1rem;
}

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

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--oc-gray-6);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    width: 100%;
}
}

/* ===================================
   EPIGRAPH (TUFTE QUOTE STYLE)
   =================================== */

.epigraph {
    margin: 2rem 0;
    width: var(--text-width);
}

.epigraph blockquote {
    font-style: italic;
    border: none;
    margin-left: 0;
    padding-left: 0;
}

.epigraph blockquote footer {
    font-style: normal;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* ===================================
   SCROLL-UP BUTTON
   =================================== */

.scroll-up-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.2s, color 0.2s;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
}

.scroll-up-button.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-up-button:hover {
    background: var(--color-accent);
    color: white;
}

.scroll-up-button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.scroll-up-button::before {
    content: "↑";
}

/* ===================================
   ACCESSIBILITY
   =================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--oc-orange-6);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 100;
    border: none;
}

.skip-link:focus {
    top: 0;
}

*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet: 2 Spalten */
@media (max-width: 1000px) and (min-width: 761px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .footer-section:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    body {
        width: 84%;
        padding-left: 8%;
        padding-right: 8%;
    }
    
    /* Header über volle Breite auf Mobile */
    header {
        margin-left: -8%;
        padding-left: 8%;
        padding-right: 8%;
        width: calc(100% + 16%);
    }
    
    /* Aktuelle Termine Box auf Mobile */
    .aktuelle-termine {
        margin-left: -8%;
        padding-left: calc(8% + 1rem);
        padding-right: 8%;
        width: calc(100% + 16%);
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .aktuelle-termine p,
    .aktuelle-termine ul {
        width: 100%;
    }
    
    .termin-datum {
        display: block;
        min-width: auto;
        margin-bottom: 0.3rem;
    }
    
    /* Kompakte Termin-Ankündigung auf Mobile */
    .termin-ankuendigung-kompakt {
        margin-left: -8%;
        padding-left: calc(8% + 1rem);
        padding-right: 8%;
        width: calc(100% + 16%);
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
    }
    
    .termin-ankuendigung-kompakt p {
        width: 100%;
        font-size: 1.1rem;
    }
    
    .termin-ankuendigung-kompakt strong {
        font-size: 1.3rem;
    }
    
    p, ol, ul,
    .termin-info,
    .contact-form,
    details {
        width: 100%;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .sidenote,
    .marginnote {
        display: block;
        float: none;
        margin: 1rem 0;
        width: 100%;
        font-size: 1.2rem;
        border-left: 2px solid var(--color-accent-light);
        padding-left: 1rem;
    }
    
    .sidenote:before {
        display: none;
    }
    
    blockquote {
        margin-left: 1rem;
        width: calc(100% - 2rem);
    }
    
    /* Mobile Navigation */
    .nav-toggle {
        display: block;
        background: none;
        border: 1px solid var(--color-border);
        padding: 0.5rem;
        cursor: pointer;
        float: right;
        margin-top: 1rem;
    }
    
    .nav-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: var(--color-text);
        margin: 5px 0;
    }
    
    .nav-menu {
        display: none;
        border: none;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-menu li {
        display: block;
        margin: 0.5rem 0;
    }
    
    /* Footer auf Mobile: eine Spalte */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Scroll-Up Button auf Mobile */
    .scroll-up-button {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    body {
        width: 100%;
        padding: 0;
    }
    
    header nav,
    footer,
    .nav-toggle,
    .termin-button,
    .submit-button,
    .scroll-up-button {
        display: none;
    }
    
    p, ol, ul {
        width: 100%;
    }
    
    a {
        color: black;
    }
}

/* ===================================
   LEGAL PAGES
   =================================== */

.legal-page {
    padding: 2rem 0;
}

.legal-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}

.legal-header h1 {
    margin-top: 1rem;
}

.legal-date {
    font-style: italic;
    color: var(--oc-gray-6);
    font-size: 1.1rem;
}

.legal-content section {
    margin-bottom: 3rem;
}

.contact-details-legal {
    font-style: normal;
    background: transparent;
    padding: 1rem 0;
    border-left: 2px solid var(--color-accent);
    padding-left: 1rem;
    width: var(--text-width);
}

.info-box {
    background: transparent;
    border-left: 3px solid var(--color-accent-light);
    padding-left: 1.5rem;
    margin: 2rem 0;
    width: var(--text-width);
}

.info-important {
    border-left-color: var(--oc-orange-6);
}

/* Tables */
table {
    width: var(--text-width);
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1.1rem;
}

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

th {
    font-weight: 600;
    border-bottom: 2px solid var(--color-text);
}

/* ===================================
   SUBTLE EMPHASIS
   =================================== */

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

/* Remove all shadows and rounded corners for true Tufte style */
*, *::before, *::after {
    box-shadow: none !important;
    border-radius: 0 !important;
}
