/* =========================================================================
   Kanzlei Falke – Stylesheet
   Hand-written rewrite (no Nicepage framework).
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  --color-dark: #1a2329;        /* primary dark (header, footer, dark sections) */
  --color-dark-active: #172025; /* hover/active variant of the dark colour    */
  --color-grey: #a1a1a1;        /* muted grey (blog read-more, lines)          */
  --color-light: #ffffff;
  --color-ink: #111111;         /* text colour on light backgrounds            */

  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Raleway", -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1140px;
  --header-height: 74px;
}

/* ---- Reset / base ----------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;            /* matches original root scale */
  line-height: 1.5;
  color: var(--color-light);
  background-color: var(--color-dark);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
}

p {
  margin: 0;
}

/* ---- Layout helpers --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 60px 0;
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-light);
}

.section--light {
  background-color: var(--color-light);
  color: var(--color-ink);
}

/* Centered section heading used across the site */
.section-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 4px;
  text-align: center;
  margin: 0 0 50px;
}

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--color-dark);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 5px 5px 20px 0 rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
}

.logo {
  display: block;
}

.logo img {
  height: 58px;
  width: auto;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + 40px) 15px 60px;
  background-color: var(--color-dark);
}

/* Animated "scroll down" arrow */
.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 42px;
  height: 42px;
  color: var(--color-light);
  animation: scroll-bounce 3s ease-in-out infinite;
}

.scroll-down svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 10px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-down { animation: none; transform: translateX(-50%); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: 75px;
  font-weight: 400;
  color: var(--color-light);
  margin: 0;
}

.hero__langs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;   /* both buttons share the wider label's width */
  gap: 24px 50px;
  margin-top: 44px;
}

/* Outline buttons (language switch) */
.btn-outline {
  display: inline-block;
  padding: 8px 45px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--color-light);
  background: transparent;
  border: 2px solid var(--color-light);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  background-color: var(--color-light);
  color: var(--color-dark);
}

/* =========================================================================
   Generic content layouts
   ========================================================================= */

/* Two equal text columns (Kanzlei / Preisgestaltung) */
.text-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  max-width: 880px;
  margin: 0 auto;
}

.body-text {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.6;
  text-align: justify;
}

/* Team portraits (Unsere Kanzlei) */
.section--kanzlei {
  padding-bottom: 90px;     /* extend the white section at the bottom */
}

.team {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 60px;
  margin-top: 70px;
}

.team-member {
  margin: 0;
  width: 260px;
  text-align: center;
}

.portrait {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center bottom;
  background-color: #e6e6e6;
}

.portrait--top {
  object-position: center top;
}

.team-member__name {
  display: block;
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.team-member__role {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 16px;
  color: #555555;
}

/* Leistungen text */
.leistungen__text {
  max-width: 940px;
  margin: 0 auto;
}

/* Formulare layout */
.formulare {
  display: grid;
  grid-template-columns: 1fr auto;   /* links take only what they need, text fills the rest */
  gap: 60px;
  max-width: 880px;                  /* match the other text sections (.text-columns) */
  margin: 0 auto;
  align-items: stretch;     /* right column matches the left text's height */
}

.form-list {
  display: flex;
  flex-direction: column;
  /* spread the 3 links across the column's full height; line-height: 2 on the
     items sets the natural (minimum) height when the left text is short */
  justify-content: space-between;
}

.form-list__item {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 2;
  text-decoration: underline;
}

/* =========================================================================
   Kontakt (map + form)
   ========================================================================= */
.kontakt-grid {
  display: grid;
  grid-template-columns: 502px 1fr;
  gap: 56px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

.map-embed {
  width: 100%;
  height: 470px;
  border: 0;
  background-color: var(--color-grey);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--color-light);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--color-light);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--color-light);
  padding: 10px 12px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--color-grey);
}

.btn-solid {
  align-self: flex-start;
  padding: 10px 30px;
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--color-ink);
  background-color: var(--color-light);
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-solid:hover {
  background-color: var(--color-grey);
}

.form-feedback {
  display: none;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 15px;
}

.form-feedback.is-visible {
  display: block;
}

/* =========================================================================
   Parallax bands
   ========================================================================= */
.parallax {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.parallax--njw {
  min-height: 491px;
  background-image: url("../images/njw.jpg");
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-light);
  padding: 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
  text-align: center;
}

.footer-grid p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}

.footer-grid strong {
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  color: var(--color-light);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Address column links out to Google Maps */
.footer-address {
  color: inherit;
  text-decoration: none;
}

.footer-address:hover {
  text-decoration: underline;
}

/* =========================================================================
   Impressum
   ========================================================================= */
.page-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 4px;
  text-align: center;
  color: var(--color-ink);
}

.divider {
  width: 140px;
  height: 0;
  margin: 20px auto;
  border-top: 3px solid var(--color-dark);
}

.impressum-block {
  text-align: center;
}

.impressum-block .section-title {
  margin-bottom: 30px;
}

.impressum-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.impressum-cols h2 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.impressum-cols p,
.impressum-block > .container > p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
}

/* spacing for the stacked impressum sections */
.impressum-section {
  padding: 30px 0;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 991px) {
  .hero__title { font-size: 56px; }

  .kontakt-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 540px;
  }
}

@media (max-width: 767px) {
  body { font-size: 18px; }

  .hero__title { font-size: 40px; }

  .text-columns,
  .formulare {
    grid-template-columns: 1fr;
    gap: 36px;
    max-width: 540px;
  }

  .impressum-cols { grid-template-columns: 1fr; }

  /* Keep the two portraits side by side (smaller) instead of stacking */
  .team {
    flex-wrap: nowrap;
    gap: 24px;
  }
  .team-member {
    width: calc(50% - 12px);   /* two across, shrink to fit the viewport */
    max-width: 260px;          /* never larger than the desktop size */
  }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-links { align-items: center; }

  .parallax--njw { min-height: 240px; }
}

@media (max-width: 575px) {
  .hero__langs { grid-auto-flow: row; gap: 18px; }
}

/* iOS doesn't support fixed background-attachment well; fall back to scroll */
@media (hover: none) {
  .parallax { background-attachment: scroll; }
}
