/* 09 bauhaus-poster — the family split into four flat fields: deep #092C5F,
   mid #0050C8, pale steel and a neutral grey standing in for the fourth
   primary. Circles and thick bars, headline pinned right, the photograph
   cropped into a disc so it is one of the shapes rather than an inset. */
@layer tokens, base, layout, components;

@layer tokens {
  :root {
    color-scheme: light dark;

    --paper: light-dark(#eff1f4, #0c1017);
    --ink:   light-dark(#101418, #eef1f5);
    --muted: light-dark(#4a5361, #a6b0bd);
    --deep:  light-dark(#092C5F, #2f5d9e);
    --mid:   light-dark(#0050C8, #3f83e0);
    --pale:  light-dark(#9dbde0, #17324f);
    --grey:  light-dark(#A4A4A4, #4b5562);
    --on-deep: #ffffff;
    --line:  light-dark(#101418, #eef1f5);
    /* multiply turns the overlaps to black mush on a dark ground; screen is
       correct there. The one place a blend mode has to be scheme-aware. */
    --blend: light-dark(multiply, screen);

    --radius: 0;
    --sans: "Archivo", "Helvetica Neue", "Arial Narrow", Arial, system-ui, sans-serif;
  }
  :root:has(#light:target) { color-scheme: light; }
  :root:has(#dark:target)  { color-scheme: dark; }
}

@layer base {
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 0.9375rem/1.6 var(--sans);
  }
  h1, h2, h3 { margin: 0; font-weight: 800; }
  p { margin: 0; }
  ol { margin: 0; padding: 0; list-style: none; }
  dl, dd { margin: 0; }
  figure { margin: 0; }
  img { display: block; max-inline-size: 100%; block-size: auto; }
  a { color: var(--ink); }
  a:focus-visible { outline: 3px solid var(--mid); outline-offset: 3px; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
  }
}

@layer layout {
  main, .masthead, .colophon {
    max-inline-size: 1300px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
  }
}

@layer components {
  .masthead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding-block: 1.25rem;
    border-block-end: 6px solid var(--line);
  }
  .brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
  .brand img { inline-size: 2.5rem; }
  .name { font-size: 1rem; font-weight: 800; text-transform: uppercase;
          letter-spacing: 0.04em; }
  .nav { display: flex; flex-wrap: wrap; gap: 0 1.125rem; margin-inline: auto;
         font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; }
  .nav a { color: var(--muted); text-decoration: none; }
  .nav a:hover { color: var(--mid); }
  .schemes { display: flex; gap: 0.375rem; font-size: 0.75rem;
             text-transform: uppercase; letter-spacing: 0.1em; }
  .schemes a { text-decoration: none; padding: 0.25rem 0.6rem;
               border: 2px solid var(--line); }
  .schemes a:hover { background: var(--mid); border-color: var(--mid); color: #fff; }

  /* A real grid the shapes occupy by placement, so the composition survives
     reflowing to one column. Everything stops at column 6, where the
     right-aligned headline begins. */
  .poster {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 clamp(0.5rem, 2vw, 1.5rem);
    padding-block: clamp(2rem, 5vw, 3.5rem);
    isolation: isolate;
    overflow: clip;
  }
  .disc {
    grid-area: 1 / 1 / 4 / 6;
    align-self: start;
    inline-size: min(100%, 27rem);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
  }
  .disc img { inline-size: 100%; block-size: 100%; object-fit: cover;
              object-position: 50% 58%; }
  .shape { display: block; mix-blend-mode: var(--blend); pointer-events: none; }
  .bar-deep {
    grid-area: 2 / 1 / 4 / 6;
    block-size: clamp(2.5rem, 5vw, 4.5rem);
    background: var(--deep);
    align-self: center;
  }
  .half-pale {
    grid-area: 4 / 2 / 6 / 5;
    aspect-ratio: 2 / 1;
    background: var(--pale);
    border-start-start-radius: 100% 200%;
    border-start-end-radius: 100% 200%;
    align-self: end;
  }
  .eyebrow {
    grid-area: 1 / 6 / 2 / 13;
    z-index: 1;
    text-align: end;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-block-end: 0.75rem;
  }
  .poster h1 {
    grid-area: 2 / 6 / 3 / 13;
    z-index: 1;
    text-align: end;
    display: grid;
    text-transform: uppercase;
    font-size: clamp(2rem, 6vw, 4.75rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
  }
  .poster h1 .l1 { color: var(--mid); }
  .poster h1 .l2 { color: var(--deep); }
  .poster h1 .l3 { color: var(--ink); }
  .poster .lede {
    grid-area: 3 / 7 / 4 / 13;
    z-index: 1;
    text-align: end;
    margin-block-start: 1.25rem;
    font-size: 1rem;
    color: var(--muted);
  }
  .poster .actions {
    grid-area: 4 / 6 / 5 / 13;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 0.75rem;
    margin-block-start: 1.5rem;
    align-self: start;
  }
  @media (max-width: 820px) {
    .poster { grid-template-columns: 1fr; }
    .poster > .shape { display: none; }
    .disc, .eyebrow, .poster h1, .poster .lede, .poster .actions {
      grid-area: auto; text-align: start; justify-content: start;
    }
    .disc { margin-block-end: 1.5rem; }
  }

  .btn {
    display: inline-block;
    padding: 0.7rem 1.375rem;
    border: 3px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
  }
  .btn:hover { background: var(--pale); }
  .btn-primary { background: var(--mid); border-color: var(--mid); color: var(--on-deep); }
  .btn-primary:hover { background: var(--deep); border-color: var(--deep); color: #fff; }

  .angebot, .kontakt { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
  h2 { font-size: clamp(1.25rem, 3vw, 1.875rem); text-transform: uppercase;
       margin-block-end: 1.5rem; padding-block-end: 0.5rem;
       border-block-end: 3px solid var(--line); }

  .items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
           border-block: 3px solid var(--line); }
  .items li { padding: 1.25rem 1.25rem 1.75rem;
              border-inline-end: 3px solid var(--line);
              border-block-end: 3px solid var(--line); }
  .items li:nth-child(3n) { border-inline-end: 0; }
  .items li:nth-last-child(-n+3) { border-block-end: 0; }
  .mark { display: block; inline-size: 2.25rem; block-size: 2.25rem;
          margin-block-end: 0.875rem; }
  .m-deep { background: var(--deep); border-radius: 50%; }
  .m-mid  { background: var(--mid); }
  .m-pale { background: var(--pale); border-start-start-radius: 100%;
            border-start-end-radius: 100%; }
  .m-grey { background: var(--grey); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
  .items h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em;
              margin-block-end: 0.5rem; }
  .items p { color: var(--muted); }
  @media (max-width: 880px) {
    .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .items li:nth-child(3n) { border-inline-end: 3px solid var(--line); }
    .items li:nth-child(2n) { border-inline-end: 0; }
  }
  @media (max-width: 560px) {
    .items { grid-template-columns: 1fr; }
    .items li { border-inline-end: 0 !important; }
  }

  /* A hard band of four square photographs — flat fields, like the shapes. */
  .strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
           margin-block-start: 2rem; }
  .strip img { inline-size: 100%; aspect-ratio: 1; object-fit: cover; }
  @media (max-width: 640px) { .strip { grid-template-columns: repeat(2, 1fr); } }

  .contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact > div { padding: 1.5rem 1.25rem; }
  .c-deep { background: var(--deep); color: var(--on-deep); }
  .c-mid  { background: var(--mid); color: #ffffff; }
  .c-pale { background: var(--pale); color: light-dark(#101418, #eef1f5); }
  .contact dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
                margin-block-end: 0.5rem; opacity: 0.9; }
  .contact dd { line-height: 1.8; }
  .contact a { color: inherit; }
  @media (max-width: 640px) { .contact { grid-template-columns: 1fr; } }

  .colophon {
    margin-block-start: clamp(3rem, 7vw, 5rem);
    padding-block: 1.75rem 3rem;
    border-block-start: 6px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    font-size: 0.875rem;
  }
  .sections { display: flex; flex-wrap: wrap; gap: 0.4rem 1.125rem; }
  .sections a { text-decoration: none; color: var(--muted); }
  .sections a:hover { color: var(--mid); }
  .up { margin-inline-start: auto; }
}
