/* ==========================================================================
   Schreinerei Kemptner — Shared components
   Used on every page. Requires css/base.css (tokens) to be loaded first.
   Source: Figma file "SK", page "final" (desktop frames at 1725px).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Content column — 1220px in Figma, fluid gutters below that
   -------------------------------------------------------------------------- */
.sk-container {
  width: 100%;
  max-width: calc(var(--sk-content-max) + 2 * var(--sk-gutter));
  margin-inline: auto;
  padding-inline: var(--sk-gutter);
}

.sk-section {
  padding-block: var(--sk-section-py);
}

.sk-section--sage {
  background-color: var(--sk-nebel);
}

.sk-section__title {
  font-size: var(--sk-fs-h2);
  line-height: 1.1;
  max-width: 838px; /* Prozess title box width in Figma */
}

.sk-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sk-stack-gap);
}

/* --------------------------------------------------------------------------
   Page header for sub-pages (Figma "projekte-header" 377:481)
   Sage band, 400px tall including the top bar, tree lines from the very
   top, big title with lime dot at the bottom-left. Pulled up underneath
   the transparent top bar (--sk-topbar-h is measured by js/main.js).
   -------------------------------------------------------------------------- */
.sk-page-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(16rem, 23.2vw, 25rem);
  margin-top: calc(-1 * var(--sk-topbar-h, 91px));
  padding-top: var(--sk-topbar-h, 91px);
  padding-bottom: clamp(2.5rem, 4.64vw, 5rem);
  background-color: var(--sk-nebel);
}

.sk-page-header__pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-width: 1100px;
  height: auto;
  max-width: none;
  pointer-events: none;
}

.sk-page-header__title {
  position: relative;
  font-size: clamp(3.5rem, 6.38vw, 6.875rem); /* 110px */
  line-height: 1;
  color: var(--sk-moos);
}

.sk-page-header__dot {
  color: var(--sk-neongelb);
}

/* --------------------------------------------------------------------------
   Arrow link — lime circle + label ("Los geht's", "Unser Team", …)
   Figma: 50px icon, 12px gap, 30px Blauer Nue Regular, #495952
   -------------------------------------------------------------------------- */
.sk-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--sk-moos);
  font-family: var(--sk-font-body);
  font-size: var(--sk-fs-xl);
  line-height: 1.2;
}

.sk-arrow-link__icon {
  flex: none;
  width: clamp(2.5rem, 2.9vw, 3.125rem);
  height: clamp(2.5rem, 2.9vw, 3.125rem);
  transition: transform var(--sk-transition-fast);
}

.sk-arrow-link__icon img {
  width: 100%;
  height: 100%;
}

/* "Los geht's" points down (the same asset rotated 90°, as in Figma) */
.sk-arrow-link--down .sk-arrow-link__icon {
  transform: rotate(90deg);
}

.sk-arrow-link:hover .sk-arrow-link__icon,
.sk-arrow-link:focus-visible .sk-arrow-link__icon {
  transform: translateX(4px);
}

.sk-arrow-link--down:hover .sk-arrow-link__icon,
.sk-arrow-link--down:focus-visible .sk-arrow-link__icon {
  transform: rotate(90deg) translateX(4px);
}

/* Icon-only variant (the "Projekte" card in the hero) */
.sk-arrow-link--icon-only {
  gap: 0;
}

/* --------------------------------------------------------------------------
   Project cards (home "Werkschau" 377:13732, projekte grid 377:549)
   -------------------------------------------------------------------------- */
.sk-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  width: 100%;
}

.sk-project-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--sk-schwarz);
}

.sk-project-card__media {
  overflow: hidden;
  aspect-ratio: 360 / 510;
}

.sk-project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--sk-transition-base);
}

.sk-project-card:hover .sk-project-card__media img,
.sk-project-card:focus-visible .sk-project-card__media img {
  transform: scale(1.03);
}

.sk-project-card__title {
  font-weight: var(--sk-fw-regular);
  font-size: var(--sk-fs-body);
  text-align: center;
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .sk-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .sk-projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.32vw, 2.5rem);
  }
}

/* --------------------------------------------------------------------------
   Fullscreen image slider / lightbox (Figma "full-screen-slider" 377:13899)
   Sage backdrop, image max 1276x835 centred with 4px radius, lime close
   badge top-right (60px inset), lime arrow buttons at the sides.
   Opened by js/main.js from any [data-lightbox] gallery.
   -------------------------------------------------------------------------- */
.sk-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--sk-z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 7vw, 7.5rem) clamp(1rem, 10.4vw, 11.25rem);
  background-color: var(--sk-nebel);
}

.sk-lightbox__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1276px;
  max-height: 835px;
}

.sk-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
}

.sk-lightbox__close {
  position: absolute;
  top: clamp(1.25rem, 3.48vw, 3.75rem);
  right: clamp(1.25rem, 3.48vw, 3.75rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.5rem, 2.9vw, 3.125rem);
  height: clamp(2.5rem, 2.9vw, 3.125rem);
  border-radius: var(--sk-radius-pill);
  background-color: var(--sk-neongelb);
  transition: transform var(--sk-transition-fast);
}

.sk-lightbox__close img {
  width: 48%;
  height: 48%;
}

.sk-lightbox__nav {
  position: absolute;
  top: 50%;
  width: clamp(2.5rem, 2.9vw, 3.125rem);
  height: clamp(2.5rem, 2.9vw, 3.125rem);
  transform: translateY(-50%);
  transition: transform var(--sk-transition-fast);
}

.sk-lightbox__nav img {
  width: 100%;
  height: 100%;
}

.sk-lightbox__nav--prev {
  left: clamp(0.5rem, 7.3vw, 7.875rem); /* 126px */
}

/* Same arrow asset, mirrored — as in Figma */
.sk-lightbox__nav--prev img {
  transform: scaleX(-1);
}

.sk-lightbox__nav--next {
  right: clamp(0.5rem, 7.3vw, 7.875rem);
}

.sk-lightbox__close:hover,
.sk-lightbox__close:focus-visible {
  transform: scale(0.92);
}

.sk-lightbox__nav:hover,
.sk-lightbox__nav:focus-visible {
  transform: translateY(-50%) scale(0.92);
}

.sk-lightbox__counter {
  position: absolute;
  bottom: clamp(1.25rem, 3.48vw, 3.75rem);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--sk-fs-body);
  color: var(--sk-moos);
}

/* On phones the arrows sit below the image instead of over it */
@media (max-width: 575.98px) {
  .sk-lightbox__nav {
    top: auto;
    bottom: 1.25rem;
    transform: none;
  }

  .sk-lightbox__nav:hover,
  .sk-lightbox__nav:focus-visible {
    transform: scale(0.92);
  }
}

/* --------------------------------------------------------------------------
   Text slider (Figma "Text Slider" 377:13748)
   Endless marquee; words alternate filled / outlined, each followed by a
   larger lime dot. The list is rendered twice so translateX(-50%) loops
   seamlessly; the second copy is aria-hidden.
   -------------------------------------------------------------------------- */
.sk-marquee {
  overflow: hidden;
  padding-block: clamp(0.5rem, 0.8vw, 0.875rem);
}

.sk-marquee__track {
  display: flex;
  width: max-content;
  animation: sk-marquee 125s linear infinite; /* 26 words per loop half, ~20% faster than the original pace (10 words / 60s) */
}

.sk-marquee__list {
  display: flex;
  flex: none;
}

.sk-marquee__item {
  display: flex;
  align-items: baseline;
  padding-inline-end: 0.25em;
  font-family: var(--sk-font-display);
  font-weight: var(--sk-fw-semibold);
  font-size: var(--sk-fs-marquee);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--sk-schwarz);
}

/* Outline words: transparent fill, 1px sage stroke (sampled from Figma) */
.sk-marquee__item--outline {
  color: transparent;
  -webkit-text-stroke: 1px var(--sk-salbei);
}

.sk-marquee__dot {
  color: var(--sk-neongelb);
  font-size: 1.2308em; /* 160px / 130px */
  line-height: 1;
  -webkit-text-stroke: 0;
}

@keyframes sk-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .sk-marquee__track {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Footer (Figma "Footer" 377:13810)
   -------------------------------------------------------------------------- */
.sk-footer {
  background-color: var(--sk-weiss);
  padding-top: var(--sk-section-py);
}

.sk-footer__top {
  display: flex;
  flex-direction: column;
  gap: var(--sk-space-6);
  padding-bottom: clamp(2.5rem, 4.64vw, 5rem);
}

.sk-footer__brand {
  display: inline-block;
  position: relative;
  flex: none;
  width: clamp(11.45rem, 17.7vw, 19.08rem); /* 183px -> 305px */
  aspect-ratio: 305.272 / 75;
}

/* Same logo + tagline assets and ratios as the top bar (navbar.css) */
.sk-footer__logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sk-footer__tagline-img {
  position: absolute;
  left: 30.68%;
  top: 79.2%;
  width: 64.86%;
  height: 20.73%;
}

.sk-footer__claim {
  font-size: var(--sk-fs-h2);
  line-height: 1.2;
}

/* Contact row is wider than the content column in Figma (180px sides) */
.sk-footer__contact {
  --sk-content-max: 1365px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sk-space-6);
  padding-bottom: var(--sk-section-py);
  font-size: var(--sk-fs-body);
}

.sk-footer__label {
  color: var(--sk-moos);
  margin-bottom: 12px;
}

.sk-footer__value {
  color: var(--sk-dunkelgrau);
}

.sk-footer__value a:hover,
.sk-footer__value a:focus-visible {
  color: var(--sk-schwarz);
}

.sk-footer__value--mail a,
.sk-footer__value a[href^="tel:"] {
  text-decoration: underline;
  text-decoration-color: var(--sk-neongelb);
  text-underline-offset: 0.2em;
}

/* --------------------------------------------------------------------------
   Location map in the footer (not in Figma — built from the style guide:
   sage ground, wood tree lines, muted cities, lime workshop pin).
   Markup: partials/footer-map.snippet.html
   -------------------------------------------------------------------------- */
.sk-footer__location {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sk-space-6);
  padding-bottom: var(--sk-section-py);
}

.sk-footer__location-title {
  font-family: var(--sk-font-display);
  font-weight: var(--sk-fw-semibold);
  font-size: var(--sk-fs-h2);
  line-height: 1.2;
  color: var(--sk-schwarz);
}

.sk-footer__location-lead {
  margin-top: 16px;
  max-width: 28ch;
  font-size: var(--sk-fs-xl);
  line-height: 1.3;
  color: var(--sk-moos);
}

.sk-footer__location-map {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.sk-map {
  width: 100%;
}

.sk-map__svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--sk-font-display);
}

.sk-map__bg {
  fill: var(--sk-nebel);
}

.sk-map__lines path {
  fill: none;
  stroke: var(--sk-salbei);
  stroke-width: 1.5;
  opacity: 0.55;
}

/* Motorways: muted lines; shields in muted with white type */
.sk-map__roads path {
  fill: none;
  stroke: var(--sk-moos);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sk-map__shields rect {
  fill: var(--sk-moos);
  stroke: var(--sk-nebel);
  stroke-width: 4;
}

/* positioned via --x/--y in the markup; --s enlarges them on phones */
.sk-map__shields g {
  transform: translate(var(--x), var(--y)) scale(var(--s, 1));
}

.sk-map__shields text {
  font-size: 24px;
  font-weight: var(--sk-fw-semibold);
  fill: var(--sk-weiss);
}

.sk-map__cities circle {
  fill: var(--sk-moos);
}

/* Labels get a sage halo so rivers and lines never cut through the text */
.sk-map__labels text,
.sk-map__pin text {
  paint-order: stroke;
  stroke: var(--sk-nebel);
  stroke-width: 8px;
  stroke-linejoin: round;
}

.sk-map__labels text {
  font-size: 30px;
  font-weight: var(--sk-fw-regular);
  fill: var(--sk-moos);
}

.sk-map__dot {
  fill: var(--sk-neongelb);
  stroke: var(--sk-schwarz);
  stroke-width: 3;
}

.sk-map__pulse {
  fill: var(--sk-neongelb);
  opacity: 0.45;
  transform-box: fill-box;
  transform-origin: center;
  animation: sk-map-pulse 2.4s ease-out infinite;
}

@keyframes sk-map-pulse {
  from { transform: scale(1); opacity: 0.55; }
  to   { transform: scale(2.8); opacity: 0; }
}

.sk-map__pin-name {
  font-size: 40px;
  font-weight: var(--sk-fw-semibold);
  fill: var(--sk-schwarz);
}

.sk-map__pin-accent {
  fill: var(--sk-neongelb);
}

.sk-map__pin-place {
  font-size: 26px;
  fill: var(--sk-moos);
}

@media (prefers-reduced-motion: reduce) {
  .sk-map__pulse {
    animation: none;
  }
}

/* Phones: the SVG shrinks to ~30% — enlarge labels and dots (in SVG
   units) so they stay readable at roughly 13-16px on screen. */
@media (max-width: 575.98px) {
  .sk-map__labels text {
    font-size: 44px;
  }

  .sk-map__pin-name {
    font-size: 54px;
  }

  .sk-map__pin-place {
    font-size: 36px;
  }

  .sk-map__shields g {
    --s: 1.4;
  }

  .sk-map__cities circle {
    r: 11px;
  }

  .sk-map__labels text,
  .sk-map__pin text {
    stroke-width: 10px;
  }
}

/* Desktop: text centred on the map itself (not on map + link); the route
   link sits in its own row under the map. */
@media (min-width: 992px) {
  .sk-footer__location {
    grid-template-columns: 5fr 7fr;
    grid-template-areas:
      "text map"
      ".    route";
    align-items: center;
    column-gap: clamp(3rem, 6vw, 6.25rem);
    row-gap: 24px;
  }

  .sk-footer__location-text {
    grid-area: text;
  }

  .sk-footer__location-map {
    display: contents;
  }

  .sk-map {
    grid-area: map;
  }

  .sk-footer__route {
    grid-area: route;
    justify-self: start;
  }
}

.sk-footer__bar {
  background-color: var(--sk-moos);
  color: var(--sk-hellgrau);
  font-size: var(--sk-fs-body);
  padding-block: 32px;
}

.sk-footer__bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sk-space-4) var(--sk-space-7);
}

.sk-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sk-space-4) 48px;
}

.sk-footer__legal a:hover,
.sk-footer__legal a:focus-visible {
  color: var(--sk-weiss);
}

@media (min-width: 576px) {
  .sk-footer__contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .sk-footer__top {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(4rem, 15vw, 16.125rem); /* 258px */
  }

  .sk-footer__contact {
    display: flex;
    justify-content: space-between;
    gap: var(--sk-space-6);
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   Footer layout v2 (all pages, class "sk-footer--v2"):
   no claim row and no logo; "Daheim in Fensterbach." + lead text next to
   the map, the contact details below as one row across the content width.
   -------------------------------------------------------------------------- */
.sk-footer--v2 .sk-footer__contact {
  --sk-content-max: 1220px; /* back to the normal content width (base.css) */
}

.sk-footer--v2 .sk-footer__location {
  padding-bottom: clamp(2.5rem, 4.64vw, 5rem);
}

@media (min-width: 992px) {
  .sk-footer--v2 .sk-footer__location {
    align-items: start;
  }
}
