/* Marco Kälin portfolio: shared tokens, layouts, components and page styles. */
/* Reset und globale Grundelemente */

:root {
  --ink: #202b27;
  --green: #315b4b;
  --mint: #dfe9d9;
  --paper: #f6f6f2;
  --line: #d9ddd8;
  --muted: #56645c;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .76);
  --glass-line: rgba(255, 255, 255, .78);
  --glass-shadow: 0 12px 32px rgba(35, 61, 50, .08);
  --glass-shadow-hover: 0 18px 40px rgba(35, 61, 50, .14);
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-hero: clamp(2.5rem, 4.5vw, 3.75rem);
  --font-section: clamp(2rem, 3.4vw, 2.75rem);
  --font-card: 1.375rem;
  --section-space: 80px;
  --hero-space: 88px;
  --card-space: 28px;
  --grid-gap: 20px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 8% 8%, rgba(174, 205, 187, .48), transparent 30rem), radial-gradient(circle at 92% 24%, rgba(223, 233, 217, .82), transparent 34rem), radial-gradient(circle at 48% 88%, rgba(189, 210, 197, .38), transparent 38rem), var(--paper);
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

/* Keep enlarged text inside columns instead of clipping or hiding overflow. */
main :where(section, article, div, form, figure, aside),
.footer :where(div, nav), .nav > * {
  min-width: 0;
}

input, select, textarea {
  min-width: 0;
  max-width: 100%;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.footer :focus-visible {
  outline-color: white;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid currentColor;
  border-radius: 8px;
  transform: translateY(calc(-100% - 24px));
}

.skip-link:focus {
  transform: none;
}

#main-content, #kontaktformular {
  scroll-margin-top: 100px;
}

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin: auto;
}

/* Navigation */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 12px;
  z-index: 30;
  min-height: 64px;
  margin-top: 12px;
  padding: 10px 18px;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: rgba(246, 246, 242, .7);
  box-shadow: 0 12px 36px rgba(31, 52, 43, .1);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  backdrop-filter: blur(20px) saturate(135%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font: 600 1rem var(--font-body);
}

.brand > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.nav nav a, .nav-cta {
  color: inherit;
  text-decoration: none;
  font-size: 0.8125rem;
}

.nav nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-cta {
  min-width: 138px;
  justify-content: space-between;
  padding: 9px 13px;
  border: 1px solid var(--green);
}

.nav-cta span, .button span, .text-link span {
  margin-left: 14px;
}

.menu {
  display: none;
  border: 0;
  background: none;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: inherit;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

/* JS transfers focus before hiding controls at a breakpoint. Keep the CSS-only
 * fallback separate so a hidden focused link cannot lose focus before the event. */
.nav.navigation-ready nav {
  display: flex;
}

.nav.navigation-ready .menu,
.nav.navigation-ready .nav-cta {
  display: block;
}

.nav.navigation-ready [hidden] {
  display: none;
}

.eyebrow, .kicker {
  text-transform: uppercase;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--green);
  line-height: 1.5;
}

.kicker {
  display: block;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5f8a76;
}

h1, h2 {
  font-family: var(--font-body);
  margin: 0 0 24px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.12;
}

h1 {
  font-size: var(--font-hero);
}

h2 {
  font-size: var(--font-section);
}

h1 em, h2 em {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  color: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 14px 18px;
  box-shadow: 0 10px 24px rgba(38, 66, 54, .12);
}

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

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 12px 48px;
  align-items: start;
  margin-bottom: 36px;
}

.section-head .kicker {
  grid-column: 1 / -1;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.services,
.price-grid,
.business-grid,
.engagement-grid,
.credential-grid {
  display: grid;
}

h3 {
  font: 600 var(--font-card) / 1.3 var(--font-body);
  margin: 24px 0 16px;
}

.text-link {
  display: inline-block;
  margin-top: 25px;
  text-decoration: none;
  color: var(--green);
  border-bottom: 1px solid #9eb0a7;
  padding-bottom: 7px;
}

.fact-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 25px 5px;
  border-bottom: 1px solid #cdd5d0;
}

.fact-row b {
  font: 600 1.5625rem ui-sans-serif, system-ui;
  color: var(--green);
}

.fact-row span {
  line-height: 1.4;
}

.footer {
  color: white;
  background: #27332e;
  padding: 30px 0;
}

.footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  font-size: 0.6875rem;
  color: #9ba9a3;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.footer .brand > span {
  color: var(--ink);
}

/* Responsive Layout */
@media (max-width: 800px) {
  :root {
    --section-space: 56px;
    --hero-space: 56px;
    --card-space: 24px;
    --grid-gap: 16px;
  }
  .nav.navigation-ready {
    flex-wrap: nowrap;
  }
  .nav nav, .nav-cta {
    display: none;
  }
  .menu {
    display: block;
  }
  .nav.open nav {
    display: flex;
    position: absolute;
    z-index: 20;
    padding: 25px;
    flex-direction: column;
    flex-wrap: nowrap;
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
  }
  .nav.open nav a {
    flex-shrink: 0;
  }
  /* Navigation remains usable if JavaScript is unavailable. */
  .nav:not(.navigation-ready) {
    height: auto;
    flex-wrap: wrap;
    gap: 16px;
    padding-block: 16px;
  }
  .nav:not(.navigation-ready) nav {
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    gap: 16px;
  }
  .nav:not(.navigation-ready) .menu {
    display: none;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .footer .wrap {
    flex-direction: column;
    gap: 10px;
  }
}
