/* ==========================================================================
   Mohm Steuerberatungsgesellschaft — Design tokens & base
   ========================================================================== */

:root {
  /* Color */
  --color-navy: #102241;
  --color-navy-dark: #0b172b;
  --color-ink: #1d1d1b;
  --color-paper: #eef1f2;
  --color-white: #ffffff;
  --color-steel: #3e5468;
  --color-teal: #2e7d74;
  --color-teal-dark: #245f58;
  --color-line: rgba(16, 34, 65, 0.14);
  --color-line-strong: rgba(16, 34, 65, 0.28);

  /* Graphic background (gradient hero/page backdrops, replaces photography) */
  --color-glow-teal: rgba(46, 125, 116, 0.28);
  --color-glow-steel: rgba(62, 84, 104, 0.35);
  --grain-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Type */
  --font-base: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container-width: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-height: 84px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset -------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

/* ---- Typography ----------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--font-base);
  font-weight: 300;
  color: var(--color-navy);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 200;
  color: var(--color-white);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 200;
  letter-spacing: 0.015em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 400;
}

p {
  margin: 0 0 1.1em;
  max-width: 62ch;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 200;
  line-height: 1.6;
  color: var(--color-navy);
}

/* ---- Layout helpers -------------------------------------------------------- */

.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  background: var(--color-white);
  color: var(--color-navy);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  z-index: 200;
  transform: translateY(-150%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---- Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn--primary {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn--primary:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

.btn--solid {
  background: var(--color-navy);
  color: var(--color-white);
}

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

.btn--outline {
  border: 1px solid var(--color-line-strong);
  color: var(--color-navy);
}

.btn--outline:hover {
  border-color: var(--color-navy);
  background: var(--color-navy);
  color: var(--color-white);
}

.btn--outline-light {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--color-white);
}

.btn--outline-light:hover {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-navy);
}

/* ---- Header / navigation ----------------------------------------------------- */

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-solid,
.site-header.is-scrolled {
  background: var(--color-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 22px;
  width: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  touch-action: manipulation;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.nav-links {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.nav-links a {
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 1px solid transparent;
  touch-action: manipulation;
  transition: border-color 0.18s var(--ease), opacity 0.18s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: var(--color-teal);
}

.nav-cta {
  min-height: 40px;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

/* ---- Hero --------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--color-white);
}

.page-graphic-bg {
  background-color: var(--color-navy-dark);
  background-image:
    radial-gradient(circle at 85% 8%, var(--color-glow-teal) 0%, rgba(46, 125, 116, 0) 42%),
    radial-gradient(circle at 8% 95%, var(--color-glow-steel) 0%, rgba(62, 84, 104, 0) 50%),
    linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 70%);
  isolation: isolate;
}

.hero-bg {
  background-color: var(--color-navy-dark);
  background-image:
    radial-gradient(circle at 50% 13%, var(--color-glow-teal) 0%, rgba(46, 125, 116, 0) 30%),
    linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 70%);
  isolation: isolate;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.78;
  mix-blend-mode: multiply;
  background-image: url("../assets/bg_startseite.jpg");
  background-size: cover;
  background-position: center;
}

.hero-bg::after,
.page-graphic-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: var(--grain-texture);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(2rem, 5vw, 3rem);
}

.hero-content .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content .lede {
  color: var(--color-white);
  opacity: 0.92;
  margin-top: 1.25rem;
  max-width: 46ch;
}

.hero-content h1 {
  max-width: 16ch;
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 700;
}

.hero-highlight {
  color: rgba(255, 255, 255, 0.6);
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Positioning section -------------------------------------------------------- */

.positioning {
  background: var(--color-white);
}

.positioning-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.positioning-body p:last-child {
  margin-bottom: 0;
}

/* ---- Leistungen ------------------------------------------------------------------- */

.services {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc(var(--header-height) + clamp(1.5rem, 4vw, 2.5rem));
  padding-bottom: clamp(2rem, 5vw, 3rem);
  background: var(--color-paper);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.services::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("../assets/bg_leistungen.jpg");
  background-size: cover;
  background-position: center;
}

.services > .container {
  position: relative;
  z-index: 1;
}

.services-header {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  text-align: center;
}

.services h2 {
  margin-bottom: 1rem;
}

.services-intro {
  max-width: 60ch;
  margin-inline: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.service {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.service h3 {
  font-weight: 300;
  margin-bottom: 0.85rem;
}

.service p {
  font-size: 0.98rem;
  font-weight: 300;
}

.service ul {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.service li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  font-weight: 300;
}

.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: #2f5f9e;
}

/* ---- Contact CTA strip -------------------------------------------------------------- */

.cta-strip {
  background: var(--color-navy);
  color: var(--color-white);
}

.cta-strip .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.75rem;
}

.cta-strip h2 {
  color: var(--color-white);
  max-width: 18ch;
}

.cta-strip-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.cta-strip-phone {
  text-decoration: none;
  font-family: var(--font-base);
  font-weight: 300;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  color: var(--color-white);
  border-bottom: 1px solid var(--color-line-strong);
  padding-bottom: 2px;
}

.cta-strip-phone:hover {
  border-color: var(--color-teal);
}

/* ---- Footer --------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-white);
  border-top: 1px solid var(--color-line);
  color: var(--color-ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
}

.footer-brand img {
  height: 20px;
  margin-bottom: 1.25rem;
}

.footer-brand p {
  color: var(--color-steel);
  font-size: 0.9rem;
  max-width: 34ch;
}

.footer-col h4 {
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-navy);
  margin: 0 0 0.9rem;
}

.footer-col address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-steel);
}

.footer-col a {
  color: var(--color-steel);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--color-teal-dark);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--color-steel);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  text-decoration: none;
}

.footer-bottom-links a:hover {
  color: var(--color-navy);
}

/* ---- Subpage header (no photo hero) ------------------------------------------------------- */

.page-hero {
  background: var(--color-navy);
  color: var(--color-white);
  padding-block: calc(var(--header-height) + clamp(3rem, 8vw, 4.5rem)) clamp(1.5rem, 3vw, 2rem);
}

.section:has(.legal) {
  padding-block-start: clamp(1.5rem, 3vw, 2.5rem);
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero .lede {
  color: var(--color-white);
  opacity: 0.88;
  margin-top: 1rem;
}

/* ---- Fixed page graphic background (Kontakt) ------------------------------------------------------ */

.page-graphic-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

body.page-graphic {
  background: transparent;
}

body.page-graphic #main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero--graphic {
  background: transparent;
  padding-block: calc(var(--header-height) + clamp(1.5rem, 4vw, 2.5rem)) clamp(0.75rem, 2vw, 1.25rem);
}

.page-hero--graphic h1,
.page-hero--graphic .lede {
  text-shadow: 0 2px 20px rgba(6, 11, 22, 0.55);
}

.section--graphic {
  background: transparent;
  padding-block-start: clamp(0.75rem, 2vw, 1.25rem);
}

.contact-card.contact-card--glass {
  background: rgba(11, 23, 43, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media (prefers-reduced-transparency: no-preference) {
    .contact-card.contact-card--glass {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(20px) saturate(140%);
      -webkit-backdrop-filter: blur(20px) saturate(140%);
    }
  }
}

.contact-card--glass h3 {
  color: var(--color-white);
}

.contact-card--glass .contact-list dt {
  color: rgba(255, 255, 255, 0.78);
}

.contact-card--glass .contact-list dd {
  color: var(--color-white);
}

.contact-card--glass .contact-list a {
  color: var(--color-white);
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

.contact-card--glass .contact-list a:hover {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
}

.contact-card--glass .lede {
  color: var(--color-white);
  opacity: 0.9;
}

.contact-card--glass .contact-note {
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Kontakt page ---------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-card {
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--color-white);
}

.contact-card h3 {
  margin-bottom: 1.25rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-list dt {
  font-size: 0.85rem;
  color: var(--color-steel);
  margin-bottom: 0.2rem;
}

.contact-list dd {
  margin: 0;
  font-size: 1.05rem;
}

.contact-list a {
  text-decoration: none;
  color: var(--color-navy);
  border-bottom: 1px solid var(--color-line-strong);
}

.contact-list a:hover {
  border-color: var(--color-teal);
  color: var(--color-teal-dark);
}

.contact-note {
  color: var(--color-steel);
  font-size: 0.95rem;
}

.contact-card > .btn {
  margin-top: 1.75rem;
}

/* ---- Contact form ---------------------------------------------------------------------------- */

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.contact-form > * {
  grid-column: 1 / -1;
}

.form-field--half {
  grid-column: span 1;
}

.contact-form .btn {
  justify-self: start;
}

.contact-form-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.form-field label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
}

.form-optional {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font: inherit;
  resize: vertical;
}

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

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
  border-color: var(--color-teal);
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.form-consent input {
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.form-consent a {
  color: var(--color-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.form-consent a:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

/* ---- Legal pages ---------------------------------------------------------------------------- */

.legal h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: normal;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p,
.legal li {
  color: var(--color-ink);
}

.legal ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1em;
}

.legal li {
  position: relative;
  padding-left: 1.1rem;
}

.legal li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 1px;
  background: var(--color-teal);
}

.placeholder {
  background: rgba(46, 125, 116, 0.12);
  color: var(--color-teal-dark);
  padding: 0.05em 0.4em;
  border-radius: 3px;
  font-size: 0.95em;
}

/* ---- Responsive -------------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .services-header {
    margin-bottom: 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .brand img {
    height: 16px;
  }

  .hero {
    align-items: flex-start;
  }

  .hero-content {
    padding-block: calc(var(--header-height) + clamp(1.5rem, 4vw, 2.5rem)) clamp(2rem, 5vw, 3rem);
  }

  .hero-content h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.75rem);
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-primary {
    position: fixed;
    inset-inline: 0;
    top: var(--header-height);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: var(--color-navy);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s;
  }

  .nav-primary.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0s;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
  }

  .nav-links a {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-cta {
    margin: 0.5rem var(--gutter) 1.5rem;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
