/* Fraunces, self-hosted from @fontsource-variable/fraunces (SIL Open Font License).
   Variable weight and optical size: the browser picks the display cut for big headlines
   and the text cut for body copy. latin-ext carries č, ć, đ, š and ž. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Olive green in three depths is the one accent; limestone and ink are the neutrals.
   Two weights only: 400 and 600. */
:root {
  --olive: #233021;
  --olive-deep: #1a2418;
  --olive-ink: #2f4a2b;
  --leaf: #b5cf8a;
  --stone: #efeee8;
  --stone-deep: #e3e2da;
  --ink: #1d241b;
  --muted: #5a6356;
  --on-dark: #ebe8df;
  --on-dark-muted: #c3c8b8;
  --line: #d2d3c8;
  --line-dark: rgba(235, 232, 223, 0.22);
  --white: #ffffff;
  --font: "Fraunces", Georgia, "Times New Roman", serif;
  --wrap: 76rem;
  --gutter: 1rem;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2.5rem;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--stone);
  color: var(--ink);
  font: 400 1.1875rem/1.6 var(--font);
}

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

a {
  color: var(--olive-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
}

h1,
h2 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  z-index: 10;
  top: -3rem;
  left: var(--gutter);
  padding: 0.5rem 0.75rem;
  background: var(--stone);
  color: var(--ink);
}

.skip:focus {
  top: 0.5rem;
}

/* Language links show a two-letter code; screen readers hear the language's own name instead. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header: olive on inner pages, laid over the photo on the home page. */

.site-header {
  position: relative;
  z-index: 3;
  background: var(--olive);
  color: var(--on-dark);
  font-size: 1.0625rem;
}

.site-header.over-photo {
  position: absolute;
  inset: 0 0 auto;
  background: none;
  color: var(--white);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2.5rem;
  padding-block: 1.25rem;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo {
  width: auto;
  height: 3.75rem;
}

@media (min-width: 48rem) {
  .logo {
    height: 5rem;
  }
}

.site-nav {
  margin-inline-start: auto;
}

.site-nav ul,
.lang-switch ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.lang-switch ul {
  gap: 0.25rem 0.85rem;
  font-size: 0.9375rem;
}

.lang-switch a {
  opacity: 0.7;
}

.lang-switch a:hover,
.lang-switch a[aria-current] {
  opacity: 1;
}

.lang-switch a[aria-current] {
  font-weight: 600;
}

/* Buttons */

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button-light {
  background: var(--on-dark);
  color: var(--olive);
}

.button-outline {
  border-color: rgba(255, 255, 255, 0.75);
  color: var(--white);
}

.button-dark {
  background: var(--olive);
  color: var(--on-dark);
}

.button:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Home: the hero photos fill the screen behind the headline and fade from one to the next. */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  /* The photo fills the whole screen; svh leaves out a phone browser's toolbars. */
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 8rem;
  overflow: hidden;
  background: var(--olive);
  color: var(--white);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-photo.is-shown {
  opacity: 1;
}

/* Dark at the top for the menu and at the bottom for the headline; clear in between. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(26, 36, 24, 0.6) 0%, rgba(26, 36, 24, 0) 22%),
    linear-gradient(to top, rgba(26, 36, 24, 0.94) 0%, rgba(26, 36, 24, 0.6) 40%, rgba(26, 36, 24, 0) 72%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.hero h1 {
  max-width: 15ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.75rem, 1.4rem + 5.2vw, 5.25rem);
  line-height: 0.98;
  overflow-wrap: break-word;
}

.hero-lead {
  max-width: 34em;
  margin-bottom: 2rem;
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.3125rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0;
}

.photo-pending {
  position: absolute;
  top: 8rem;
  left: var(--gutter);
  right: var(--gutter);
  padding: 1rem;
  border: 2px dashed var(--line-dark);
  color: var(--on-dark-muted);
}

/* Sections */

.section {
  padding-block: clamp(4rem, 3rem + 4vw, 7rem);
}

.band {
  background: var(--olive);
  color: var(--on-dark);
}

.band a:not(.button) {
  color: var(--on-dark);
}

.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.section-note {
  max-width: 32em;
  color: var(--muted);
}

.band .section-note {
  color: var(--on-dark-muted);
}

h3 {
  margin: 0 0 0.4em;
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Experience: a large figure beside the heading and a short paragraph. */

.experience-figure {
  margin: 0;
  color: var(--olive-ink);
  font-size: 1.3125rem;
  font-weight: 600;
}

.experience-number {
  display: block;
  font-size: clamp(5.5rem, 3.5rem + 8vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.experience-text {
  max-width: 34em;
  margin: 0;
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.3125rem);
}

/* The services follow on the same stone, so a rule marks where they start. */
.experience + .section {
  border-top: 1px solid var(--line);
}

/* Service cards: an icon, the service and its one-line description. */

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

/* The whole card is a link to the service's description on the services page:
   the link's ::after covers the card, and the arrow hints that it leads somewhere. */
.service-cards li {
  position: relative;
  padding: 1.5rem 2.75rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.service-cards li::after {
  content: "→";
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--muted);
}

.service-cards a {
  color: inherit;
  text-decoration: none;
}

.service-cards a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.service-cards a:focus-visible {
  outline: none;
}

.service-cards li:hover,
.service-cards li:has(a:focus-visible) {
  border-color: var(--olive-ink);
  background: var(--stone-deep);
}

.service-cards li:has(a:focus-visible) {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
}

.service-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.service-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  fill: none;
  stroke: var(--olive-ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* How we work: three numbered steps on a slightly darker stone. */

.steps-band {
  background: var(--stone-deep);
}

.steps {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--olive-ink);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* Before and after: drag across the photo to move the dividing line.
   The frame matches the pair's landscape 4:3 photos; change it with the pair. */

.before-after {
  position: relative;
  max-width: 34rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--olive-deep);
  touch-action: pan-y;
}

.before-after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before-after .after {
  clip-path: inset(0 0 0 var(--pos, 50%));
}

.before-after input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.before-after .divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 3px;
  background: var(--white);
  transform: translateX(-50%);
  pointer-events: none;
}

.before-after:has(input:focus-visible) {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
}

.before-after .tag {
  position: absolute;
  bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(26, 36, 24, 0.82);
  color: var(--white);
  font-size: 0.9375rem;
  pointer-events: none;
}

.before-after .tag-before {
  left: 1rem;
}

.before-after .tag-after {
  right: 1rem;
}

/* Call band: one big line and one button that opens the phone's dialler. */

.call-band {
  background: var(--olive-deep);
}

.call-heading {
  max-width: 20ch;
  margin-bottom: 2rem;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
}

.call-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin: 0;
}

.button-large {
  padding: 1.1rem 2.25rem;
  font-size: 1.3125rem;
}

/* Inner pages: an olive title block continues the header. */

.page-head {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(2.5rem, 2rem + 2vw, 3.5rem);
  border-top: 1px solid var(--line-dark);
  background: var(--olive);
  color: var(--on-dark);
}

.page-head h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 1.8rem + 3vw, 3.75rem);
}

.page-head p {
  max-width: 36em;
  margin: 0;
  color: var(--on-dark-muted);
  font-size: 1.3125rem;
}

.page-body {
  padding-block: clamp(3rem, 2rem + 3vw, 5rem);
}

.placeholder {
  padding: 2rem var(--gutter);
  border: 2px dashed var(--line);
  background: var(--stone-deep);
  color: var(--muted);
}

/* Services page: a photo beside each service's description and what it includes, the photo
   switching sides from one service to the next. A card on the home page links to one by its id;
   the browser scrolls to it and the block is shaded so it stands out. */

.service {
  display: grid;
  gap: 1.5rem;
  margin-inline: -1rem;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--line);
  border-radius: 6px;
  scroll-margin-top: 1.5rem;
  transition: background-color 0.6s ease;
}

.service:first-child {
  border-top: 0;
  padding-top: 0;
}

.service-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 6px;
}

.service h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
}

.service p {
  max-width: 36em;
  margin: 0 0 1.5rem;
}

.service h3 {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
}

.service-includes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-includes li {
  position: relative;
  margin-bottom: 0.35rem;
  padding-left: 1.4rem;
}

.service-includes li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--olive-ink);
}

.service:target {
  border-top-color: transparent;
  background: var(--stone-deep);
}

@media (min-width: 48rem) {
  .service {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    padding-block: 3.5rem;
  }

  .service:nth-child(even) .service-photo {
    order: 2;
  }
}

/* Gallery */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  object-fit: cover;
}

.photo-caption {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.photo-grid a {
  display: block;
  cursor: zoom-in;
}

/* Photo viewer opened from a gallery grid by src/js/lightbox.js. */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(17, 24, 16, 0.97);
  color: var(--on-dark-muted);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(17, 24, 16, 0.97);
}

html:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox-figure {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 4.5rem 1rem 1.5rem;
}

.lightbox-image {
  width: auto;
  max-width: min(100%, 80rem);
  height: auto;
  max-height: calc(100dvh - 9rem);
  border-radius: 4px;
  object-fit: contain;
}

.lightbox-caption {
  display: flex;
  gap: 1rem;
  font-size: 1rem;
}

.lightbox-button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(235, 232, 223, 0.14);
  color: var(--white);
  cursor: pointer;
}

.lightbox-button:hover {
  background: rgba(235, 232, 223, 0.3);
}

.lightbox-button svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

/* Contact */

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 3rem;
  font-size: 1.3125rem;
}

.follow-label {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

/* From tablet width up, "Follow us" and its icons sit on the right, in the footer and on the contact page. */
@media (min-width: 48rem) {
  .follow {
    text-align: right;
  }

  .follow .social-links {
    justify-content: flex-end;
    margin: 0 -0.5rem 0 0;
  }
}

/* Social icons scale with the text around them; the padding makes a bigger tap area,
   and the negative margin lines the first icon up with the text above. */

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 1em -0.5rem;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: flex;
  padding: 0.5rem;
  text-decoration: none;
}

.social-links svg {
  width: 1.5em;
  height: 1.5em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-links circle:last-child {
  fill: currentColor;
}

/* Footer */

.site-footer {
  background: var(--olive-deep);
  color: var(--on-dark-muted);
  font-size: 1rem;
}

.site-footer a {
  color: var(--on-dark);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 4rem;
  border-top: 1px solid var(--line-dark);
}

.site-footer h2 {
  margin-bottom: 1rem;
  color: var(--on-dark);
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
}

/* Days in one column, times in the next, a fixed gap apart: the times stay close to their
   days instead of drifting towards the next footer column. */
.hours {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  column-gap: 2rem;
  margin: 0;
}

.hours div {
  display: contents;
}

.hours dt,
.hours dd {
  margin: 0;
  padding-block: 0.3rem;
}

/* Phones get a call button fixed to the bottom of the screen. */

.call-bar {
  position: fixed;
  z-index: 5;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  background: var(--on-dark);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--olive);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 47.99rem) {
  /* Room for the fixed call bar, on the pages that have one. */
  body:has(.call-bar) {
    padding-bottom: 4.75rem;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
  }

  .lang-switch {
    margin-inline-start: auto;
  }

  .hero {
    /* On a phone the photo ends where the fixed call bar begins (body padding-bottom). */
    min-height: calc(100vh - 4.75rem);
    min-height: calc(100svh - 4.75rem);
    padding-top: 12.5rem;
  }

  /* On a phone the icon sits beside the service name, so eight cards take less scrolling. */
  .service-cards li {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    column-gap: 1rem;
    padding: 1.25rem 2.5rem 1.25rem 1.25rem;
  }

  .service-cards .service-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  /* Long German words such as "Landschaftspflege" are wider than a phone at headline size. */
  .hero h1,
  .page-head h1 {
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 10 4 4;
  }
}

@media (min-width: 48rem) {
  .call-bar {
    display: none;
  }

  .split {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }

  .split-reverse {
    grid-template-columns: 7fr 5fr;
  }

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

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}
