/* ============================================================
   Tambourkorps Hengsbeck — main stylesheet

   The full logo SVG (with its embedded resize script) is loaded
   via <object> as a fixed full-viewport frame. The actual page
   content sits on top, padded to clear the J-frame edges.

   Brand colors (already in the SVG itself):
     #006633  HENGSBECK text (green)
     #666666  TAMBOURKORPS text + emblem
     #808080  "seit 1925" script
     #000000  J-frame banner
   ============================================================ */

:root {
    --green:        #006633;
    --green-dark:   #004d26;
    --green-light:  #e8f2ec;
    --grey:         #666666;
    --grey-light:   #f5f5f5;
    --text:         #222222;
    --white:        #ffffff;

    --font-serif:   Georgia, 'Times New Roman', Times, serif;
    --font-sans:    system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

    --max-content:  900px;

    /* Padding to keep page content clear of the J-frame edges.
       The SVG's logical frame area (in its 438×509 viewBox at the
       native size) reserves the top 48px for the bar+offset and the
       right 48px for the vertical, with a 214px bottom-right curve.
       Since the SVG scales to viewport, these padding values are
       approximate — they keep content visually clear. */
    /* Overall logo zoom — change this to scale the WHOLE pennant
       (frame + text + emblem + seit 1925) uniformly. */
    --logo-zoom: 0.55;

    --frame-top:    50px;
    --frame-right:  180px;   /* room for the emblem+text on the right (after zoom) */
    --frame-bottom: 70px;
    --frame-left:   24px;
}

/* ── Reset ───────────────────────────────────────────────── */

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

html { font-size: 16px; height: 100%; }

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    min-height: 100%;
    position: relative;
}

/* ── Page frame (the logo SVG) ───────────────────────────── */

/* The logo SVG, applied as a fixed full-viewport frame.
   Demo pattern: container is sized larger than viewport, then scaled
   down via CSS transform. This shrinks the WHOLE logo (frame + content
   + seit 1925) uniformly. */
.page-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100vw / var(--logo-zoom));
    height: calc(100vh / var(--logo-zoom));
    transform: scale(var(--logo-zoom));
    transform-origin: top left;
    pointer-events: none;
    z-index: 0;
}

/* The <object> element has no intrinsic block formatting; the SVG
   inside fills it. */

/* ── Page content layer ──────────────────────────────────── */

.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: var(--frame-top) var(--frame-right) var(--frame-bottom) var(--frame-left);
    display: flex;
    flex-direction: column;
}

/* ── Typography ──────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    line-height: 1.25;
    color: var(--text);
}

h1 { font-size: 2rem;    color: var(--green); margin-bottom: 1rem; }
h2 { font-size: 1.5rem;  margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p  { margin-bottom: 1rem; }

a  { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--green-dark); }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.25rem; }

/* ── Header & navigation ─────────────────────────────────── */

.site-header {
    padding: 1rem 0 2rem;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.main-nav a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--green);
    background: var(--green-light);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* ── Main content ────────────────────────────────────────── */

.site-main {
    flex: 1;
    padding: 1rem 0;
}

.main-inner {
    max-width: var(--max-content);
    margin: 0 auto;
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
    padding: 1.5rem 0 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--grey);
    border-top: 1px solid var(--grey-light);
}

.footer-name {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--green);
}

.footer-copy { margin-left: auto; }

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet / kleinere Desktops */
@media (max-width: 1024px) {
    :root {
        --logo-zoom:    0.45;
        --frame-top:    45px;
        --frame-right:  140px;
        --frame-bottom: 65px;
        --frame-left:   20px;
    }
}

/* Smartphone */
@media (max-width: 700px) {
    :root {
        --logo-zoom:    0.32;
        --frame-top:    36px;
        --frame-right:  90px;
        --frame-bottom: 55px;
        --frame-left:   16px;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Sehr schmale Smartphones (< 380px) */
@media (max-width: 380px) {
    :root {
        --logo-zoom:    0.26;
        --frame-right:  70px;
    }
}
