/*
 * Front page surface (index.php). Builds on tokens.css and components.css:
 * .ui-btn, .ui-chip, .ui-tile, .ui-name and the shared header and search
 * form. Only the page layout, the photo hero, the activities rail, the
 * business band, the recent list, the map and the motion live here.
 * Motion runs once per element, follows the scroll where it says so, and
 * is switched off with prefers-reduced-motion.
 */

.page-home {
  margin: 0;
  background: var(--color-canvas);
  overflow-x: clip;
  interpolate-size: allow-keywords;
}

.home {
  --gutter: max(clamp(20px, 5vw, 64px), calc((100vw - var(--container)) / 2));
  --frame: 12px;
  display: block;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
}

.home-wrap {
  padding-inline: var(--gutter);
}

.home-sec {
  padding-top: var(--section-gap);
}

.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: 28px;
}

.home-title {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(36px, 3.4vw + 10px, 72px);
  font-weight: var(--weight-bold);
  line-height: 1.02;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.home-title--light {
  color: var(--on-photo);
}

.home-lede {
  margin: 14px 0 0;
  max-width: 44ch;
  color: var(--color-muted);
  font-size: clamp(16px, 0.4vw + 14px, 19px);
  line-height: 1.5;
  text-wrap: pretty;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 22px;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: var(--text-control);
  font-weight: var(--weight-ui-medium);
  text-decoration: none;
}

.home-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-link .ui-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--ease-spring);
}

.home-link:hover .ui-icon {
  transform: translateX(3px);
}

.home-round {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: var(--shadow-control);
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), box-shadow var(--duration) ease, opacity var(--duration) ease;
}

.home-round:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.home-round:active {
  transform: scale(0.92);
}

.home-round:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.home-round__back {
  transform: rotate(180deg);
}

/* ==========================================================================
   Hero: framed photo that changes with the service, the one search form
   ========================================================================== */
.home-hero {
  position: relative;
  z-index: 2;
  height: min(100svh, 940px);
  min-height: 640px;
  padding: var(--frame);
  box-sizing: border-box;
}

.home-hero__frame {
  position: relative;
  height: 100%;
  border-radius: var(--radius-xl);
  background: var(--photo-bg);
  isolation: isolate;
}

/* Only the photos are clipped: the search suggestions may leave the frame */
.home-hero__photos {
  position: absolute;
  inset: 0;
  overflow: clip;
  border-radius: inherit;
}

.home-hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--photo-scrim-top), var(--photo-scrim-side), var(--photo-scrim-bottom);
  pointer-events: none;
}

.home-hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  clip-path: inset(100% 0 0 0);
}

.home-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.16) translateY(4%);
  transition: transform 1.6s var(--ease-io);
}

.home-hero__photo.is-on {
  z-index: 1;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.25s var(--ease-io);
}

.home-hero__photo.is-was {
  z-index: 0;
  clip-path: inset(0 0 0 0);
}

.home-hero__photo.is-on img {
  transform: scale(1) translateY(0);
  animation: home-drift 9s 1.6s var(--ease-out-expo) forwards;
}

.home-hero__photo.is-was img {
  transform: scale(1.03);
}

@keyframes home-drift {
  to { transform: scale(1.045) translateY(-1%); }
}

/* First photo: no clip, it settles from a slight zoom as the page opens */
.home-hero__photo.is-first {
  clip-path: inset(0 0 0 0);
}

.home-hero__photo.is-first img {
  transform: scale(1.12);
}

.home-hero.is-ready .home-hero__photo.is-first img {
  transform: scale(1);
  transition: transform 2.2s var(--ease-out-expo);
}

.home-hero__copy {
  position: absolute;
  z-index: 4;
  left: calc(var(--gutter) - var(--frame));
  right: calc(var(--gutter) - var(--frame));
  bottom: clamp(92px, 12vh, 132px);
  max-width: 1040px;
  color: var(--on-photo);
}

.home-hero__title {
  margin: 0;
  color: var(--on-photo);
  font-family: var(--font-display);
  font-size: clamp(42px, 4.6vw + 8px, 88px);
  font-weight: var(--weight-bold);
  line-height: 0.98;
  letter-spacing: var(--tracking-display);
}

/* Each line rises out of its own mask when the page opens. The hidden
   start states apply only once home.js runs (.home.is-js). */
.home-hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.home-hero__line > span {
  display: inline-block;
  transition: transform 1.1s var(--ease-out-expo);
}

.home.is-js .home-hero:not(.is-ready) .home-hero__line > span {
  transform: translateY(105%);
}

.home-hero__line--2 > span {
  transition-delay: 0.09s;
}

/* The service word: letters leave upwards and arrive from below */
.home-hero__word {
  display: inline-grid;
  vertical-align: top;
  overflow: hidden;
  padding-bottom: 0.28em;
  margin-bottom: -0.28em;
  white-space: nowrap;
}

.home-hero__word > span {
  grid-area: 1 / 1;
  display: inline-block;
  white-space: nowrap;
}

.home-hero__ch {
  display: inline-block;
  transform: translateY(0);
  transition: transform 0.8s var(--ease-out-expo);
}

.home-hero__ch.is-below {
  transform: translateY(130%);
  transition: none;
}

.home-hero__word > .is-leaving .home-hero__ch,
.home-hero__word > .is-leaving > .home-hero__ch {
  transform: translateY(-130%);
  transition: transform 0.45s var(--ease-in);
}

.home-hero__lead {
  margin: 18px 0 0;
  color: var(--on-photo-muted);
  font-size: clamp(17px, 0.5vw + 14px, 20px);
  line-height: 1.5;
}

.home-hero__lead b {
  color: var(--on-photo);
  font-weight: var(--weight-ui-bold);
}

.home-hero__copy .site-search.site-search--hero:not(.is-sheet) {
  margin-top: 20px;
}

.home-hero__biz {
  margin: 16px 0 0;
  color: var(--on-photo-muted);
  font-size: var(--text-control);
}

.home-hero__biz a {
  border-radius: var(--radius-sm);
  color: var(--on-photo);
  font-weight: var(--weight-ui-bold);
  text-decoration: underline;
  text-decoration-color: var(--on-photo-line);
  text-underline-offset: 4px;
}

.home-hero__biz a:hover {
  text-decoration-color: var(--on-photo);
}

.home-hero__copy > :not(h1),
.home-hero__copy .site-search--hero,
.home-hero__tabs {
  transition: opacity 0.9s var(--ease-out-expo), transform 1.1s var(--ease-out-expo);
}

.home.is-js .home-hero:not(.is-ready) .home-hero__copy > :not(h1),
.home.is-js .home-hero:not(.is-ready) .home-hero__copy .site-search--hero,
.home.is-js .home-hero:not(.is-ready) .home-hero__tabs {
  opacity: 0;
  transform: translateY(18px);
}

.home-hero__lead { transition-delay: 0.25s; }
.home-hero__copy .site-search--hero { transition-delay: 0.35s; }
.home-hero__biz { transition-delay: 0.45s; }
.home-hero__tabs { transition-delay: 0.55s; }

/* Service tabs: plain text with a progress line under the current one */
.home-hero__tabs {
  position: absolute;
  z-index: 3;
  left: calc(var(--gutter) - var(--frame));
  right: calc(var(--gutter) - var(--frame));
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-hero__tabs::-webkit-scrollbar {
  display: none;
}

.home-hero__tab {
  position: relative;
  flex: none;
  height: 44px;
  margin: 0;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--on-photo-soft);
  font-family: var(--font-sans);
  font-size: var(--text-control);
  font-weight: var(--weight-ui-medium);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--duration-slow) ease;
}

.home-hero__tab::after,
.home-hero__tab i {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  border-radius: 1px;
}

.home-hero__tab::after {
  background: var(--on-photo-line);
}

.home-hero__tab i {
  z-index: 1;
  background: var(--on-photo);
  transform-origin: left;
  transform: scaleX(0);
}

.home-hero__tab:hover,
.home-hero__tab[aria-pressed="true"] {
  color: var(--on-photo);
}

.home-hero__tab[aria-pressed="true"] i {
  animation: home-progress 6.5s linear forwards;
}

.home-hero.is-held .home-hero__tab[aria-pressed="true"] i {
  animation-play-state: paused;
}

.home-hero.is-chosen .home-hero__tab[aria-pressed="true"] i {
  animation: none;
  transform: none;
}

@keyframes home-progress {
  to { transform: scaleX(1); }
}

.home-hero :focus-visible {
  outline-color: var(--on-photo);
}

.home-hero .site-search :focus-visible {
  outline-color: var(--color-primary);
}

/* ==========================================================================
   Activities: a rail of photo cards, dragged or scrolled
   ========================================================================== */
.home-acts__arrows {
  display: flex;
  gap: var(--space-2);
}

.home-acts__rail {
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-2) var(--gutter) 28px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
}

.home-acts__rail::-webkit-scrollbar {
  display: none;
}

.home-acts__rail.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
}

.home-acts__rail.is-dragging a {
  pointer-events: none;
}

.home-act {
  position: relative;
  flex: none;
  width: clamp(250px, 22vw, 340px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-xl);
  scroll-snap-align: start;
  box-shadow: var(--shadow-card);
  clip-path: inset(0 0 0 0 round var(--radius-xl));
  transition: clip-path 1.2s var(--ease-io), opacity 0.6s var(--ease-out-expo);
}

.home.is-js .home-acts__rail:not(.is-in) .home-act {
  clip-path: inset(14% 0 0 0 round var(--radius-xl));
  opacity: 0;
}

.home-act__link {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--on-photo);
  text-decoration: none;
  isolation: isolate;
}

.home-act__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--photo-scrim-card);
}

.home-act__link img {
  position: absolute;
  inset: 0 -8%;
  z-index: -2;
  width: 116%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transform: translateX(var(--shift, 0%)) scale(var(--zoom, 1));
  transition: transform 1.8s var(--ease-out-expo);
}

.home.is-js .home-acts__rail:not(.is-in) .home-act__link img {
  --zoom: 1.18;
}

.home-act__link:hover img {
  --zoom: 1.05;
}

.home-act__text {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
}

.home-act__name {
  display: flex;
  align-items: flex-end;
  min-height: 2.16em;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 1vw + 16px, 30px);
  font-weight: var(--weight-bold);
  line-height: 1.08;
  letter-spacing: var(--tracking-display);
}

.home-act__count {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  color: var(--on-photo-muted);
  font-size: var(--text-base);
}

.home-act__go {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--on-photo-line);
  transition: transform 0.45s var(--ease-spring), background-color var(--duration-slow) ease, color var(--duration-slow) ease;
}

.home-act__go .ui-icon {
  width: 14px;
  height: 14px;
}

.home-act__link:hover .home-act__go {
  transform: translateX(4px);
  background: var(--on-photo);
  color: var(--color-ink);
}

.home-act--more {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  box-sizing: border-box;
  background: var(--color-ink);
  color: var(--on-photo);
}

.home-act__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-act__list a {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 9px 0;
  border-bottom: 1px solid var(--on-photo-line);
  color: var(--on-photo-muted);
  font-size: var(--text-control);
  text-decoration: none;
}

.home-act__list a:hover {
  color: var(--on-photo);
}

.home-act__list span {
  color: var(--on-photo-soft);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Business band: a photo frame that opens as it scrolls into view
   ========================================================================== */
.home-biz {
  margin-top: var(--section-gap);
  padding: var(--frame);
}

.home-biz__frame {
  --open: 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(92svh, 820px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--photo-bg);
  isolation: isolate;
  clip-path: inset(calc(var(--open) * 7%) calc(var(--open) * 9%) round var(--radius-xl));
}

.home-biz__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--photo-scrim-side), var(--photo-scrim-bottom);
}

.home-biz__photo {
  position: absolute;
  inset: -6% 0;
  z-index: -2;
  width: 100%;
  height: 112%;
  max-width: none;
  object-fit: cover;
  object-position: 60% 12%;
  will-change: transform;
}

.home-biz__copy {
  position: relative;
  max-width: 760px;
  padding: clamp(28px, 5vw, 72px) calc(var(--gutter) - var(--frame));
  color: var(--on-photo);
}

.home-biz__copy .home-title {
  font-size: clamp(40px, 4.4vw + 8px, 96px);
}

.home-biz__copy .home-lede {
  max-width: 40ch;
  color: var(--on-photo-muted);
}

.home-biz__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.home-biz__perks li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-control);
  font-weight: var(--weight-ui-medium);
}

.home-biz__perks .ui-icon {
  width: 20px;
  height: 20px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--on-photo);
  stroke-width: 2.25;
}

.home-biz__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}

.home-biz__ghost,
.home-biz__ghost:focus {
  color: var(--on-photo);
}

.home-biz__ghost:hover {
  background: var(--on-photo-line);
  color: var(--on-photo);
}

/* ==========================================================================
   Recently updated companies: editorial rows, the rule lines draw in
   ========================================================================== */
.home-recent__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.home-recent__head {
  position: sticky;
  top: 120px;
}

.home-recent__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-line);
}

.home-row {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 8px;
  border-radius: var(--radius-lg);
  transition: background-color var(--duration-slow) ease, opacity 0.8s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.home-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--color-line);
  transform-origin: left;
  transition: transform 1.1s var(--ease-io), opacity var(--duration) ease;
}

.home-row:hover {
  background: var(--color-surface);
}

.home-row:hover .home-row__text {
  transform: translateX(8px);
}

.home-row:hover::after {
  opacity: 0;
}

.home-row:focus-within {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.home-row .ui-tile {
  transition: transform 0.9s var(--ease-out-expo);
}

.home-row__text {
  min-width: 0;
  font-size: clamp(17px, 0.35vw + 15px, 20px);
  transition: transform 0.45s var(--ease-spring-soft);
}

.home-row__name {
  margin: 0;
  font-size: 1em;
  color: var(--color-ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The whole row opens the company page */
.home-row__name a {
  color: inherit;
  text-decoration: none;
  outline: none;
}

.home-row__name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.home-row__sub {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: var(--text-base);
}

.home-row__time {
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: opacity var(--duration) ease;
}

.home-row__go {
  position: absolute;
  top: 50%;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--duration) ease, transform 0.45s var(--ease-spring);
}

.home-row__go .ui-icon {
  width: 16px;
  height: 16px;
}

.home-row:hover .home-row__go {
  opacity: 1;
  transform: none;
}

.home-row:hover .home-row__time {
  opacity: 0;
}

.home.is-js .home-recent__list:not(.is-in) .home-row {
  opacity: 0;
  transform: translateY(16px);
}

.home.is-js .home-recent__list:not(.is-in) .home-row::after {
  transform: scaleX(0);
}

.home.is-js .home-recent__list:not(.is-in) .ui-tile {
  transform: scale(0.82);
}

/* ==========================================================================
   Map of Slovenia: pins light up in a wave from Ljubljana
   ========================================================================== */
.home-map {
  margin-top: var(--section-gap);
  padding: clamp(40px, 4vw, 72px) 0;
  background: linear-gradient(180deg, var(--color-canvas), var(--sky-top) 50%, var(--color-canvas));
}

.home-map__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  grid-template-areas: "head scene" "controls scene";
  grid-template-rows: auto 1fr;
  column-gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.home-map__head { grid-area: head; align-self: end; }
.home-map__controls { grid-area: controls; }
.home-map__scene { grid-area: scene; align-self: center; }

.home-map__towns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 28px;
}

.home-map__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin-top: 20px;
}

.home-map__more {
  margin-top: 16px;
}

.home-map__near {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui-medium);
}

.home-map__empty {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  color: var(--color-muted);
  font-size: var(--text-base);
}

.home-co {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  color: var(--color-ink);
  text-decoration: none;
  transition: transform 0.45s var(--ease-spring-soft), box-shadow var(--duration-slow) ease;
}

.home-map__list .home-co {
  animation: home-in 0.5s var(--ease-spring-soft) both;
}

.home-map__list .home-co:nth-child(2) { animation-delay: 0.05s; }
.home-map__list .home-co:nth-child(3) { animation-delay: 0.1s; }

@keyframes home-in {
  from { opacity: 0; transform: translateY(8px); }
}

.home-co:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.home-co__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: var(--text-control);
}

.home-co__name {
  overflow: hidden;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-co__sub {
  overflow: hidden;
  color: var(--color-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-map__scene {
  position: relative;
  aspect-ratio: 1000 / 680;
  perspective: 2200px;
  perspective-origin: 50% 0%;
}

.home-map__slab {
  --tilt-x: 0;
  --tilt-y: 0;
  position: absolute;
  inset: 6% 2% 2%;
  transform-style: preserve-3d;
  transform: rotateX(calc(10deg + var(--tilt-y) * 1deg)) rotateY(calc(var(--tilt-x) * 1deg));
}

.home-map__slab::before {
  content: "";
  position: absolute;
  inset: 72% 10% -4%;
  border-radius: 50%;
  background: var(--color-primary-soft);
  filter: blur(28px);
  transform: translateZ(-40px);
}

.home-map__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.home-map__side {
  fill: color-mix(in oklab, var(--color-brand) 24%, var(--sky-top));
}

.home-map__side--0 { transform: translateY(14px); opacity: 0.4; }
.home-map__side--1 { transform: translateY(12px); opacity: 0.48; }
.home-map__side--2 { transform: translateY(10px); opacity: 0.56; }
.home-map__side--3 { transform: translateY(8px); opacity: 0.64; }
.home-map__side--4 { transform: translateY(6px); opacity: 0.72; }
.home-map__side--5 { transform: translateY(4px); opacity: 0.8; }
.home-map__side--6 { transform: translateY(2px); opacity: 0.88; }

.home-map__land {
  fill: url(#home-map-land);
  stroke: color-mix(in oklab, var(--color-primary) 28%, transparent);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.home-map__land-top {
  stop-color: var(--color-surface);
}

.home-map__land-bottom {
  stop-color: var(--color-hover);
}

.home-map__pins circle {
  fill: var(--color-primary);
  opacity: 0.75;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity var(--duration-slow) ease, fill var(--duration-slow) ease, transform 0.7s var(--ease-spring);
}

.home.is-js .home-map__scene:not(.is-lit) .home-map__pins circle {
  opacity: 0;
  transform: scale(0);
}

.home-map__scene.is-lit:not(.is-ready) .home-map__pins circle {
  transition-delay: var(--d, 0ms);
}

.home-map__scene.is-focus .home-map__pins circle {
  opacity: 0.14;
}

.home-map__scene.is-focus .home-map__pins circle.is-near {
  opacity: 1;
  fill: var(--color-brand);
}

.home-map__wave {
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.home-map__wave.is-on {
  animation: home-wave 1.6s var(--ease-out-expo) forwards;
}

@keyframes home-wave {
  0% { opacity: 0.7; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(1); }
}

.home-map__ring {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 2px solid var(--color-brand);
  border-radius: var(--radius-pill);
  box-shadow: var(--glow-brand);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) ease;
}

.home-map__lens {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: max-content;
  max-width: 340px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 22px)) scale(0.92);
  transition: opacity var(--duration) ease, transform 0.3s var(--ease-spring);
}

.home-map__scene.is-lens .home-map__ring {
  opacity: 1;
}

.home-map__scene.is-lens .home-map__lens {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 22px));
}

.home-map__lens .home-co {
  position: relative;
  box-shadow: none;
  filter: drop-shadow(0 8px 24px color-mix(in oklab, var(--color-ink) 16%, transparent));
}

.home-map__lens .home-co::after {
  content: "";
  position: absolute;
  left: var(--tip-x, 50%);
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: var(--color-surface);
  transform: rotate(45deg);
}

.home-map__lens .home-co__sub {
  white-space: normal;
}

/* ==========================================================================
   FAQ and the closing search
   ========================================================================== */
.home-faq {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}

.home-faq__item {
  border-bottom: 1px solid var(--color-line);
}

.home-faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: 24px 0;
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(17px, 0.4vw + 15px, 20px);
  font-weight: var(--weight-bold);
  line-height: 1.35;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

.home-faq__item summary::-webkit-details-marker {
  display: none;
}

.home-faq__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
  transition: transform 0.5s var(--ease-spring), background-color var(--duration-slow) ease, color var(--duration-slow) ease;
}

.home-faq__item[open] .home-faq__icon {
  transform: rotate(45deg);
  background: var(--color-ink);
  color: var(--color-on-primary);
}

.home-faq__item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.55s var(--ease-out-expo), content-visibility 0.55s allow-discrete;
}

.home-faq__item[open]::details-content {
  block-size: auto;
}

.home-faq__item p {
  max-width: 58ch;
  margin: 0;
  padding: 0 0 24px;
  font-size: var(--text-md);
}

.home-fin {
  padding-bottom: var(--section-gap);
  text-align: center;
}

.home-fin__title {
  font-size: clamp(34px, 2.4vw + 14px, 56px);
  line-height: 1.05;
}

.home-fin__launch {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 820px;
  height: 72px;
  margin: 32px auto 0;
  padding: 8px 8px 8px 24px;
  box-sizing: border-box;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
  color: var(--color-placeholder);
  text-align: left;
  text-decoration: none;
  transition: box-shadow var(--duration-slow) ease, transform 0.45s var(--ease-spring-soft);
}

.home-fin__launch:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.home-fin__field {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding-right: 16px;
  font-size: var(--text-md);
}

.home-fin__field + .home-fin__field {
  padding-left: 20px;
  border-left: 1px solid var(--color-line);
}

.home-fin__field b {
  color: var(--color-ink);
  font-size: var(--text-xs);
  font-weight: var(--weight-ui-bold);
}

.home-fin__field span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Scroll reveals: headings rise word by word, text follows
   ========================================================================== */
.home [data-rise] {
  transition: opacity 0.9s var(--ease-out-expo) 0.12s, transform 1.1s var(--ease-out-expo) 0.12s;
}

.home.is-js [data-rise]:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
}

.home-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.home-word > span {
  display: inline-block;
  transition: transform 1s var(--ease-out-expo);
}

.home [data-words]:not(.is-in) .home-word > span {
  transform: translateY(108%);
}

/* ==========================================================================
   Tablet and phone
   ========================================================================== */
@media (min-width: 1024px) and (max-width: 1199px) {
  .home-map__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

@media (max-width: 1023px) {
  .home-recent__grid,
  .home-faq,
  .home-map__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-map__grid {
    grid-template-areas: "head" "scene" "controls";
    grid-template-rows: none;
  }

  .home-map__scene {
    margin-top: 16px;
  }

  .home-recent__head {
    position: static;
  }

  .home-faq {
    gap: var(--space-4);
  }
}

@media (max-width: 767px) {
  .home-hero {
    height: 92svh;
    min-height: 600px;
    padding: 8px;
  }

  .home-hero__frame {
    border-radius: var(--radius-lg);
  }

  .home-hero__frame::after {
    background: var(--photo-scrim-top), var(--photo-scrim-phone);
  }

  .home-hero__tabs {
    padding-inline-end: 48px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }

  .home {
    --frame: 8px;
  }

  .home-hero__copy {
    bottom: 76px;
  }

  .home-hero__title {
    font-size: 42px;
  }

  .home-hero__word {
    display: grid;
  }

  .home-hero__lead {
    font-size: var(--text-md);
  }

  .home-hero__tabs {
    bottom: 12px;
    gap: 16px;
  }

  .home-hero__tab {
    font-size: var(--text-base);
  }

  .home-head {
    align-items: flex-start;
  }

  .home-acts__arrows {
    display: none;
  }

  .home-act {
    width: 76vw;
    border-radius: var(--radius-lg);
  }

  .home-biz {
    padding: 8px;
  }

  .home-biz__frame {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    border-radius: var(--radius-lg);
    background: var(--color-ink);
    clip-path: none;
  }

  .home-biz__frame::after {
    display: none;
  }

  .home-biz__photo {
    position: relative;
    inset: auto;
    width: 100%;
    height: 360px;
    transform: none !important;
    -webkit-mask-image: linear-gradient(#000 70%, transparent);
    mask-image: linear-gradient(#000 70%, transparent);
  }

  .home-biz__copy {
    margin-top: -48px;
    padding-inline: 20px;
  }

  .home-biz__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-biz__ghost {
    box-shadow: inset 0 0 0 1px var(--on-photo-line);
  }

  .home-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0;
  }

  .home-row .ui-tile {
    width: 48px;
    height: 48px;
  }

  .home-row__time,
  .home-row__go {
    display: none;
  }

  .home-map__lens {
    width: 240px;
  }

  .home-fin__launch {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 0;
    padding: 12px;
    border-radius: var(--radius-lg);
  }

  .home-fin__field {
    padding: 10px 8px;
  }

  .home-fin__field + .home-fin__field {
    padding-left: 8px;
    border-top: 1px solid var(--color-line);
    border-left: 0;
  }

  .home-fin__launch .ui-btn {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home *,
  .home *::before,
  .home *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .home-act,
  .home [data-rise],
  .home-hero__copy > :not(h1),
  .home-hero__tabs,
  .home-recent__list .home-row {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }

  .home-hero__line > span,
  .home-word > span,
  .home-hero__photo img {
    transform: none !important;
  }

  .home-map__pins circle {
    opacity: 0.75 !important;
    transform: none !important;
  }

  .home-hero__tab[aria-pressed="true"] i {
    animation: none;
    transform: none;
  }
}
