/* Freunde SEK Nordbayern e.V.
   Direction: contemporary Nordic, cool mist and deep fjord blue with a single amber accent.
   Motif: arches (a nod to doorways and bridges: places where people meet). */

:root {
  --mist: #e8eff1;
  --paper: #f7fafb;
  --ink: #10202b;
  --fjord: #0e4a5a;
  --sea: #3f8c9b;
  --amber: #e9b04b;
  --line: #c4d3d8;
  --muted: #4b5f6b;
  --head: "Familjen Grotesk", "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1280px;
  --radius: 4px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--fjord); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 1rem; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1rem; }

.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .7rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--head); font-weight: 600; font-size: 1rem;
  padding: .95rem 1.6rem; border-radius: var(--radius); border: 2px solid var(--fjord);
  background: var(--fjord); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--fjord); }
.btn-ghost:hover { background: var(--fjord); border-color: var(--fjord); }
.btn-light { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn-light:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn-small { padding: .6rem 1.1rem; font-size: .95rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(247, 250, 251, .96); border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 28px; height: 34px; background: var(--fjord);
  border-radius: 14px 14px 0 0; position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; left: 7px; bottom: 0; width: 14px; height: 18px;
  background: var(--amber); border-radius: 7px 7px 0 0;
}
.brand-name { font-family: var(--head); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: .85rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  font-family: var(--head); font-weight: 500; text-decoration: none; color: var(--ink);
  padding: .3rem 0; background: linear-gradient(var(--amber), var(--amber)) 0 100% / 0 3px no-repeat;
  transition: background-size .25s;
}
.nav a:not(.btn):hover { background-size: 100% 3px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform .25s, top .25s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Hero */
.hero { background: var(--mist); padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3.5rem, 6vw, 5.5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; position: relative; }
.kicker { font-family: var(--head); font-weight: 600; color: var(--fjord); margin-bottom: 1.2rem; display: flex; align-items: center; gap: .8rem; }
.kicker::before { content: ""; width: 2.5rem; height: 3px; background: var(--amber); }
.lead { font-size: 1.3rem; max-width: 36rem; color: #24384a; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-art { position: relative; height: clamp(360px, 44vw, 540px); background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.arch { position: absolute; bottom: 0; border-radius: 999px 999px 0 0; transform-origin: bottom; }
.a1 { left: 8%; width: 52%; height: 82%; background: var(--sea); }
.a2 { left: 52%; width: 38%; height: 58%; background: var(--amber); }
.a3 { left: 27%; width: 26%; height: 44%; background: var(--fjord); border: 3px solid var(--paper); border-bottom: 0; }
.sun { position: absolute; top: 9%; right: 9%; width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--paper); }

.hero-panel {
  position: absolute; left: calc(55% - 1rem); bottom: -1.75rem; width: min(300px, 40%);
  background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--amber);
  padding: 1.2rem 1.4rem; border-radius: var(--radius); font-size: 1rem; line-height: 1.55;
  box-shadow: 0 14px 30px -18px rgba(16, 32, 43, .45);
}
.hero-panel h2 { font-size: 1.05rem; margin-bottom: .5rem; letter-spacing: 0; }
.hero-panel address { font-style: normal; margin-bottom: .5rem; }
.hero-panel a { font-family: var(--head); font-weight: 600; }

/* The one orchestrated moment: page load */
@media (prefers-reduced-motion: no-preference) {
  .arch { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
  .a2 { animation-delay: .12s; }
  .a3 { animation-delay: .24s; }
  .hero-copy > * { animation: fadeup .7s ease both; }
  .hero-copy > :nth-child(2) { animation-delay: .1s; }
  .hero-copy > :nth-child(3) { animation-delay: .2s; }
  .hero-copy > :nth-child(4) { animation-delay: .3s; }
  .hero-panel { animation: fadeup .7s .5s ease both; }
}
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Fact strip */
.strip { background: var(--fjord); color: #fff; padding-top: 1.75rem; }
.strip-list { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-list li { padding: 1.4rem 1.5rem 1.6rem; border-left: 1px solid rgba(255, 255, 255, .22); font-size: 1rem; line-height: 1.45; }
.strip-list li:first-child { border-left: 0; padding-left: 0; }
.strip-list strong { display: block; font-family: var(--head); font-size: 1.15rem; margin-bottom: .2rem; }
.strip-list span { color: #cfe3e8; }

/* Sections */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 34rem; }

/* About */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 5rem; align-items: start; }
.about-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.photo { position: relative; aspect-ratio: 4 / 3; background: #cfe2e7; overflow: hidden; border-radius: var(--radius); margin-top: 2rem; }
.photo-hill { position: absolute; bottom: -35%; border-radius: 50%; }
.photo-hill.h1 { left: -15%; width: 80%; height: 75%; background: var(--sea); }
.photo-hill.h2 { right: -20%; width: 85%; height: 65%; background: var(--fjord); }
.photo-house { position: absolute; left: 44%; bottom: 22%; width: 60px; height: 44px; background: var(--amber); clip-path: polygon(0 36%, 50% 0, 100% 36%, 100% 100%, 0 100%); }
.photo p { position: absolute; left: .8rem; right: .8rem; bottom: .8rem; margin: 0; background: var(--paper); padding: .45rem .7rem; font-size: .85rem; line-height: 1.4; border-radius: var(--radius); }
.about-body .big { font-size: 1.55rem; line-height: 1.45; font-family: var(--head); font-weight: 500; letter-spacing: -0.01em; margin-bottom: 1.6rem; }
.facts { margin: 2.5rem 0 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--head); font-weight: 700; }
.facts dd { margin: 0; color: var(--muted); }

/* Services */
.services { background: var(--mist); }
.acc { border-bottom: 1px solid var(--ink); }
.acc details { border-top: 1px solid var(--ink); }
.acc summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1.1fr 1fr 40px; gap: 2rem;
  align-items: center; padding: 1.6rem 0; transition: padding .2s, background .2s;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { padding-left: 1rem; background: rgba(255, 255, 255, .5); }
.acc .t { font-family: var(--head); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.9rem); letter-spacing: -0.01em; line-height: 1.2; }
.acc .s { color: var(--muted); }
.acc summary::after {
  content: "+"; font-family: var(--head); font-size: 1.6rem; line-height: 1; width: 40px; height: 40px;
  display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; transition: transform .25s, background .25s, color .25s;
}
.acc details[open] summary::after { content: "\2212"; background: var(--ink); color: #fff; }
.panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; padding: 0 0 2.2rem; animation: fadeup .35s ease both; }
.panel p { margin: 0 0 1rem; max-width: 36rem; }
.panel p:first-child { grid-column: 1; }
.panel p:nth-child(2) { grid-column: 1; color: var(--muted); }
.tags { grid-column: 2; grid-row: 1 / span 2; align-self: start; display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.tags li { font-family: var(--head); font-size: .95rem; font-weight: 500; padding: .35rem .9rem; border: 1.5px solid var(--fjord); border-radius: 999px; color: var(--fjord); background: var(--paper); }

/* Benefits */
.benefits { background: var(--ink); color: #e6eef1; }
.benefits-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; align-items: start; }
.benefits-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.benefits-head h2 { color: #fff; }
.benefits-head p { color: #b6c8cf; margin-bottom: 1.8rem; }
.benefit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }
.benefit-list li { padding: 1.8rem 0 2rem; border-top: 1px solid rgba(255, 255, 255, .25); }
.benefit-list li:last-child { grid-column: 1 / -1; }
.benefit-list h3 { color: #fff; display: flex; align-items: center; gap: .7rem; }
.benefit-list h3::before { content: ""; width: 12px; height: 16px; background: var(--amber); border-radius: 6px 6px 0 0; flex: none; }
.benefit-list p { margin: 0; color: #b6c8cf; transition: color .2s; }
.benefit-list li:hover p { color: #fff; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 5rem; align-items: start; }
.lead-s { font-size: 1.2rem; color: var(--muted); }
.details { margin: 2rem 0 0; border-top: 2px solid var(--ink); }
.details div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: 1rem; }
.details dt { font-family: var(--head); font-weight: 700; }
.details dd { margin: 0; }
.form { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--fjord); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); }
.field { margin-bottom: 1.3rem; display: flex; flex-direction: column; gap: .4rem; }
.field label { font-family: var(--head); font-weight: 600; font-size: 1rem; }
.field input:not([type="checkbox"]), .field select, .field textarea {
  font: inherit; font-size: 1.05rem; padding: .8rem .9rem; border: 1.5px solid #9fb3bb; border-radius: var(--radius);
  background: var(--paper); color: var(--ink); width: 100%; transition: border-color .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fjord); background: #fff; box-shadow: 0 0 0 3px rgba(233, 176, 75, .55); }
.field.invalid input:not([type="checkbox"]), .field.invalid select, .field.invalid textarea { border-color: #b3261e; }
.err { color: #b3261e; font-size: .95rem; font-family: var(--head); min-height: 0; }
.field.check { display: grid; grid-template-columns: 22px 1fr; gap: .2rem .8rem; align-items: start; }
.field.check input { width: 20px; height: 20px; margin-top: .3rem; accent-color: var(--fjord); }
.field.check label { font-family: var(--body); font-weight: 400; font-size: 1rem; line-height: 1.5; }
.field.check .err { grid-column: 2; }
.status { margin: 1.2rem 0 0; font-family: var(--head); font-weight: 500; }
.status.ok { color: var(--fjord); }
.status.bad { color: #b3261e; }

/* Footer */
.site-footer { background: var(--mist); border-top: 1px solid var(--line); padding-top: 3.5rem; font-size: 1rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding-bottom: 2.5rem; }
.foot-brand { font-family: var(--head); font-weight: 700; font-size: 1.3rem; margin-bottom: .6rem; }
.foot-title { font-family: var(--head); font-weight: 700; margin-bottom: .6rem; }
.foot-grid a { display: block; margin-bottom: .35rem; }
.foot-base { border-top: 1px solid var(--line); padding: 1.3rem 0 1.6rem; color: var(--muted); font-size: .95rem; }
.foot-base p { margin: 0; }

/* Scroll reveal (applied by script.js) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1020px) {
  .hero-grid, .about-grid, .benefits-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-panel { left: 1.2rem; bottom: -1.5rem; width: min(320px, 80%); }
  .hero-art { height: 400px; }
  .about-head, .benefits-head { position: static; }
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
  .strip-list { grid-template-columns: 1fr 1fr; }
  .strip-list li:nth-child(3) { border-left: 0; padding-left: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--line); display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: .9rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; }
}
@media (max-width: 680px) {
  body { font-size: 1.05rem; }
  .wrap { width: calc(100% - 2rem); }
  .hero-art { height: 320px; }
  .hero-panel { position: static; width: auto; margin-top: -2.2rem; margin-inline: 1rem; }
  .hero-grid { gap: 2rem; }
  .strip-list { grid-template-columns: 1fr; }
  .strip-list li { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255, 255, 255, .22); }
  .strip-list li:first-child { border-top: 0; }
  .facts div, .details div { grid-template-columns: 1fr; gap: .2rem; }
  .acc summary { grid-template-columns: 1fr 40px; gap: 1rem; }
  .acc .s { display: none; }
  .panel { grid-template-columns: 1fr; }
  .tags { grid-column: 1; grid-row: auto; }
  .benefit-list { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
