/* ==========================================================================
   Allgemeinmedizin Dr. Illmer – Prototyp
   ========================================================================== */

@font-face {
  font-family: "GT Standard";
  src: url("../fonts/GT-Standard-L-Standard-Regular.woff2") format("woff2"),
       url("../fonts/GT-Standard-L-Standard-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-bg: #eae8e4;
  --c-white: #ffffff;
  --c-grey: #d9d8d4;
  --c-red: #c1121c;
  --c-black: #000000;

  --radius-lg: 18px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --container: 1104px;
  --gutter: clamp(16px, 4vw, 40px);
  --edge: 18px; /* Abstand der randnahen Elemente (Kacheln, Bild) */

  --fs-hero: clamp(2.5rem, 1.4rem + 3.6vw, 4rem);      /* 40 → 64 */
  --fs-h2: clamp(2.25rem, 1.7rem + 1.6vw, 3rem);       /* 36 → 48 */
  --fs-h3: clamp(1.5rem, 1.25rem + 0.7vw, 1.75rem);    /* 24 → 28 */
  --fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);   /* 16 → 18 */
  --fs-small: 0.9375rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --header-h: 92px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-black);
  font-family: "GT Standard", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.45;
  letter-spacing: -0.005em;
  /* ss07: alternatives "l" (unten geschwungen). ss07 tauscht auch "I" und "0" -
     diese werden per JS (.ss-off) wieder auf die Standardform gesetzt. */
  font-feature-settings: "ss07" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--c-black);
  color: var(--c-white);
  border-radius: 999px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-black);
  --btn-hover-bg: var(--c-black);
  --btn-hover-fg: var(--c-white);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-body);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: color .45s var(--ease-out), border-color .45s var(--ease-out);
}
/* Füll-Effekt von unten – angelehnt an die Tether-Buttons */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-hover-bg);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .5s var(--ease-out);
}
.btn:hover,
.btn:focus-visible { color: var(--btn-hover-fg); }
.btn:hover::before,
.btn:focus-visible::before { transform: translateY(0); }

.btn--outline { border-color: currentColor; }
.btn--outline:hover { border-color: var(--btn-hover-bg); }

.btn--white { --btn-bg: var(--c-white); }

.btn--black {
  --btn-bg: var(--c-black);
  --btn-fg: var(--c-white);
  --btn-hover-bg: #3a3a3a;
}

.btn--glass {
  --btn-bg: rgba(255, 255, 255, .55);
  --btn-hover-bg: var(--c-white);
  --btn-hover-fg: var(--c-black);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 31px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: header-in 1s var(--ease-out) both .1s;
}
.nav-pill {
  pointer-events: auto;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--c-white);
  border-radius: 999px;
  transition: box-shadow .35s, transform .5s var(--ease-out);
}
.nav-pill a {
  position: relative;
  padding: 14px 11px;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color .3s;
}
.nav-pill a:first-child { padding-left: 22px; }
.nav-pill a:last-child { padding-right: 22px; }
.nav-pill a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 10px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-pill a:first-child::after { left: 22px; }
.nav-pill a:last-child::after { right: 22px; }
.nav-pill a:hover::after,
.nav-pill a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.site-header.is-scrolled .nav-pill {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

@keyframes header-in {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(150px, 13vw, 180px) var(--gutter) clamp(56px, 7vw, 100px);
  text-align: center;
}
.hero__title {
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.hero__title .line { display: block; }
.hero__title .line:nth-child(-n+2) { color: var(--c-red); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

/* --------------------------------------------------------------------------
   Info-Kacheln
   -------------------------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-inline: var(--edge);
  /* 1440px für die Kacheln selbst, Rand-Padding kommt dazu */
  max-width: calc(1440px + 2 * var(--edge));
  margin-inline: auto;
}
.tile {
  position: relative;
  min-height: clamp(420px, 35vw, 478px);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.tile__title {
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.tile--white { background: var(--c-white); }
.tile__bottom { margin-top: auto; }
.tile__bottom .btn { margin-top: 30px; }

/* Hinweis aus dem Micro-CMS (Urlaub / Vertretung) */
.hours__notice {
  margin-bottom: 22px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(193, 18, 28, .08);
  color: var(--c-red);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.hours > div {
  display: grid;
  grid-template-columns: 132px 1fr;
}
.hours dt, .hours dd { line-height: 1.45; }

.tile--red {
  background: var(--c-red);
  padding: 30px;
}
.tile--red .tile__title { position: relative; z-index: 1; }
.tile__phone {
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: min(86%, 380px);
  transform: translateX(-50%);
  /* Bild hat schwarzen Hintergrund mit Alpha → nahtlos auf Rot */
}
.tile--red .btn {
  position: absolute;
  left: 30px;
  bottom: 40px;
  z-index: 2;
}


/* --------------------------------------------------------------------------
   Team – Sticky Stacking Cards
   -------------------------------------------------------------------------- */
.team {
  padding-top: clamp(100px, 14vw, 190px);
  padding-bottom: clamp(60px, 8vw, 100px);
}
.stack {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  display: grid;
  gap: 40px;
}
.stack-card {
  --stack-offset: 0px;
  position: sticky;
  top: 140px;
  display: grid;
  grid-template-columns: 1fr minmax(0, 527px);
  gap: 40px;
  min-height: 650px;
  padding: 25px;
  border-radius: var(--radius-lg);
  transform: translateY(var(--stack-offset)) scale(var(--stack-scale, 1));
  transform-origin: 50% 0;
  will-change: transform;
}
.stack-card--grey { background: var(--c-grey); }
.stack-card--white { background: var(--c-white); }

.stack-card__text {
  align-self: center;
  padding-left: clamp(16px, 6.5vw, 71px);
  padding-bottom: 60px;
}
.eyebrow {
  font-size: var(--fs-small);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.stack-card__title {
  font-size: clamp(2rem, 1.6rem + 1vw, 2.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stack-card__lead { margin-top: 18px; max-width: 20em; }
.stack-card .btn { margin-top: 40px; }

.stack-card__media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e4e5e3;
}
.stack-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.08);
  transition: transform 1.4s var(--ease-out);
}
.stack-card.is-in .stack-card__media img { transform: scale(1); }

/* --------------------------------------------------------------------------
   Section Titles
   -------------------------------------------------------------------------- */
.section-title {
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.section-title .line { display: block; }

/* --------------------------------------------------------------------------
   Leistungen – Accordion
   -------------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 768px);
  gap: 40px;
  align-items: start;
  padding-top: clamp(60px, 10vw, 150px);
}
.services__intro {
  position: sticky;
  top: 140px;
  padding-top: 20px;
}
.services__intro .btn { margin-top: 40px; }

.accordion {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: var(--c-grey);
  border-radius: var(--radius-lg);
}
.acc-item {
  background: var(--c-white);
  border-radius: var(--radius-sm);
}
.acc-item__head { font: inherit; }
.acc-item__head button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 88px;
  padding: 16px 22px 16px clamp(20px, 3.2vw, 41px);
  cursor: pointer;
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  border-radius: var(--radius-sm);
}
.acc-item__head button:focus-visible { outline: 2px solid var(--c-black); outline-offset: -4px; }

.acc-icon {
  position: relative;
  flex: none;
  width: 50px;
  height: 50px;
}
.acc-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}
.acc-icon circle {
  fill: none;
  stroke-width: 0.8;
}
.acc-icon__base { stroke: rgba(0, 0, 0, .22); }
.acc-icon__hover {
  stroke: var(--c-black);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset .8s var(--ease-io);
}
.acc-item__head button:hover .acc-icon__hover,
.acc-item.is-open .acc-icon__hover { stroke-dashoffset: 0; }

.acc-icon i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  margin: -0.75px 0 0 -8px;
  background: var(--c-black);
  transition: transform .5s var(--ease-out);
}
.acc-icon__v { transform: rotate(90deg); }
.acc-item.is-open .acc-icon__v { transform: rotate(180deg); }
.acc-item.is-open .acc-icon__h { transform: rotate(180deg); }

.acc-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease-out);
}
.acc-item__panel > div { overflow: hidden; }
.acc-item__panel p {
  padding: 0 clamp(20px, 7vw, 80px) 34px clamp(20px, 3.2vw, 41px);
  font-size: 1.0625rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s, transform .6s var(--ease-out);
}
.acc-item.is-open .acc-item__panel { grid-template-rows: 1fr; }
.acc-item.is-open .acc-item__panel p {
  opacity: 1;
  transform: none;
  transition-delay: .1s;
}

/* --------------------------------------------------------------------------
   Kontakt & Termine
   -------------------------------------------------------------------------- */
.contact { padding-top: clamp(100px, 14vw, 190px); }
.contact__grid {
  display: grid;
  grid-template-areas:
    "signal info info"
    "signal route route";
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-top: clamp(40px, 6vw, 80px);
}
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 35px;
}
.card__title {
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.card--red { background: var(--c-red); }
.card--white { background: var(--c-white); }
.card--grey { background: var(--c-grey); }

.contact__signal {
  grid-area: signal;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 586px;
}
.card__sub { margin-top: 18px; }
.card__sub a { text-decoration: none; }
.card__small {
  margin-top: auto;
  font-size: var(--fs-small);
  line-height: 1.3;
}
.card__small ul { margin: 1.2em 0; }
.card__small li::before { content: "• "; }
.contact__signal .btn { align-self: flex-start; }

.contact__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 50px;
  min-height: 290px;
}
.contact__cols {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
.contact__cols a { text-decoration: none; }
.contact__cols a.u,
.site-footer a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.contact__info { grid-area: info; }
.contact__route {
  grid-area: route;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 290px;
}
/* --------------------------------------------------------------------------
   Unterseite Impressum & Datenschutz
   -------------------------------------------------------------------------- */
.hero--sub { padding-bottom: clamp(48px, 7vw, 110px); }
.contact--sub { padding-top: 0; }
.contact--sub .contact__grid { margin-top: 0; }

.contact__legal {
  grid-area: signal;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.legal {
  display: grid;
  gap: 18px;
  font-size: var(--fs-small);
  line-height: 1.4;
}
.legal__label { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal a { text-decoration: none; }
.legal a.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.privacy { padding-top: clamp(100px, 13vw, 175px); }
.privacy__body {
  margin-top: clamp(40px, 6vw, 60px);
  line-height: 1.5;
}
.privacy__body p + p,
.privacy__body h3 + p { margin-top: 1em; }
.privacy__body h3 {
  margin-top: 2.2em;
  font-size: clamp(1.25rem, 1.1rem + 0.4vw, 1.5rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.privacy__body a.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.privacy__date { color: rgba(0, 0, 0, .6); margin-top: 2.2em !important; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: clamp(70px, 8vw, 100px) 0 clamp(60px, 8vw, 100px);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  gap: 40px;
}
.site-footer__name {
  font-size: clamp(1.625rem, 1.3rem + 0.9vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  padding-top: 6px;
}
.site-footer__links {
  display: flex;
  gap: clamp(40px, 6vw, 82px);
}
.site-footer a:hover { text-decoration-thickness: 2px; }
.site-footer__eu {
  width: 274px;
  height: auto;
}

/* --------------------------------------------------------------------------
   Stylistic Set 07 nur für "l": "I" und "0" behalten ihre Standardform
   -------------------------------------------------------------------------- */
.ss-off { font-feature-settings: normal; }

/* --------------------------------------------------------------------------
   Animationen
   -------------------------------------------------------------------------- */
/* Fade-in from bottom */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s var(--ease-out),
    transform 1.2s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Line/Word reveal – Wörter gleiten aus einer Maske */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}
.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.is-in .split-word > span { transform: none; }

[data-parallax] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .split-word > span { transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {

  .stack-card { grid-template-columns: 1fr 1fr; min-height: 560px; }
  .stack-card__text { padding-left: 16px; }

  .services { grid-template-columns: 1fr; }
  .services__intro { position: static; padding-top: 0; }
  .services__intro .btn { margin-top: 28px; }
  .section-title .line { display: inline; }
  .services__intro .section-title .line:first-child::after { content: " "; }

  .contact__grid {
    grid-template-areas:
      "signal info"
      "signal route";
    grid-template-columns: 1fr 1fr;
  }
  .contact__cols { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .hide-sm { display: none; }
}

@media (max-width: 760px) {
  :root { --edge: 12px; }
  html { scroll-padding-top: 90px; }

  .site-header { inset-block-start: 16px; }
  .nav-pill a { padding: 12px 9px; font-size: .9375rem; }
  .nav-pill a:first-child { padding-left: 18px; }
  .nav-pill a:last-child { padding-right: 18px; }
  .nav-pill a::after { bottom: 8px; left: 9px; right: 9px; }
  .nav-pill a:first-child::after { left: 18px; }
  .nav-pill a:last-child::after { right: 18px; }

  .hero { padding-top: 130px; }
  .hero__actions { margin-top: 26px; gap: 10px; }

  .tiles { grid-template-columns: 1fr; gap: 12px; }
  .tile { min-height: 0; padding: 24px; }
  .tile--white .tile__bottom { margin-top: 48px; }
  .tile--red { min-height: 460px; padding: 24px; }
  .tile--red .btn { left: 24px; bottom: 28px; }
  .hours > div { grid-template-columns: 110px 1fr; }

  .stack { gap: 24px; }
  .stack-card {
    position: relative;
    top: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding: 12px;
  }
  .stack-card__text { padding: 28px 14px 0; }
  .stack-card__media { order: -1; aspect-ratio: 4 / 4.2; }
  .stack-card__text { padding-bottom: 16px; }
  .stack-card .btn { margin-top: 28px; }

  .accordion { padding: 6px; gap: 6px; border-radius: 14px; }
  .acc-item__head button { min-height: 72px; padding-right: 14px; gap: 14px; }
  .acc-icon { width: 40px; height: 40px; }

  .contact__grid {
    grid-template-areas:
      "signal"
      "info"
      "route";
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card { padding: 24px; }
  .contact__signal { min-height: 0; }
  .contact__info, .contact__route { min-height: 220px; }
  .contact__cols { grid-template-columns: 1fr; gap: 16px; }
  .hide-sm { display: none; }

  .site-footer { flex-direction: column; gap: 48px; }
  .site-footer__brand { gap: 18px; }
  .site-footer__eu { width: min(274px, 100%); }
}

@media (max-width: 380px) {
  .btn { padding: 0 16px; font-size: .9375rem; }
  .nav-pill a { padding-inline: 7px; }
}
