/* A short pencil stroke echoes the warm accent in the headline. */
.hero-title em {
  position: relative;
  justify-self: start;
  isolation: isolate;
}
.hero-title em::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: .04em;
  right: .12em;
  bottom: .23em;
  height: .115em;
  border-radius: 72% 32% 64% 24%;
  transform: rotate(-1deg);
  transform-origin: left center;
  background: #e9c9a8;
}

/* The numeric slide position still works on its own. */
.hero-slide-count {
  position: relative;
  padding-bottom: 4px;
}
.hero-slide-count::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  border-radius: 3px;
  background: #d0d8d1;
}
@supports selector(:has(*)) {
  .hero-slide-count::before {
    content: "";
    position: absolute;
    z-index: 1;
    bottom: 0;
    left: 0;
    width: calc(100% / 3);
    height: 3px;
    border-radius: 3px;
    background: var(--green);
    transform: translateX(var(--slide-offset, 0%));
  }
  .hero-carousel:has(.hero-slide:nth-child(2):not([hidden])) { --slide-offset: 100%; }
  .hero-carousel:has(.hero-slide:nth-child(3):not([hidden])) { --slide-offset: 200%; }
}

.site-header nav a {
  background: linear-gradient(var(--green), var(--green)) left bottom / 0 2px no-repeat;
}
.site-header nav a:focus-visible { background-size: 100% 2px; }
:where(.site-header, main, footer) :is(a, summary, button):focus-visible {
  outline: 3px solid #387456;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}
:is(.start-plan, .ongoing):target .plan-label {
  color: #24533e;
  background: #e4efe5;
  box-shadow: -.35em 0 #e4efe5, .35em 0 #e4efe5;
  width: fit-content;
  border-radius: 2px;
}
.faq-group[open] > summary > span:last-child { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) {
  .site-header nav a:hover { text-decoration: none; background-size: 100% 2px; }
  :is(.map-options a, .map-monthly):hover svg { color: #174d36; }
  :is(.button, .header-contact):hover { box-shadow: 0 4px 12px #183e2926; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-title em::after { animation: ai-pencil-stroke 680ms 120ms cubic-bezier(.22,.75,.25,1) backwards; }
  .hero-slide-count::before, .faq-group > summary > span:last-child { transition: transform 230ms ease; }
  .site-header nav a { transition: background-size 180ms ease-out; }
  :is(.button, .header-contact) { transition: background-color 180ms ease, box-shadow 180ms ease; }
  :is(.start-plan, .ongoing):target .plan-label { animation: ai-plan-selected 700ms ease-out; }
  .paper[open] > .a { animation: ai-answer-in 180ms ease-out; }
  @keyframes ai-pencil-stroke {
    from { transform: rotate(-1deg) scaleX(0); }
    to { transform: rotate(-1deg) scaleX(1); }
  }
  @keyframes ai-plan-selected {
    from { background-color: #bdd5bc; }
    to { background-color: #e4efe5; }
  }
  @keyframes ai-answer-in {
    from { opacity: .65; transform: translateY(-2px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
