/* Home-only City composition. Semantic product colors remain in styles.tw.css;
   coral and sky are decorative fields, never product status colors. */

.home-city-decoration {
  display: none;
}

:root[data-style="city"] .home-page {
  --city-home-coral: #ef765f;
  --city-home-sky: #62bce8;
  --city-home-accent-ink: #20263a;
  --city-home-leaf-field: color-mix(in srgb, var(--color-secondary) 18%, var(--color-surface));
}

:root[data-style="city"] .home-page .home-section {
  isolation: isolate;
  overflow: clip;
  position: relative;
}

:root[data-style="city"] .home-page .home-section-content {
  position: relative;
  z-index: 2;
}

:root[data-style="city"] .home-page .home-city-decoration {
  display: block;
  pointer-events: none;
  position: absolute;
  user-select: none;
  z-index: 1;
}

:root[data-style="city"] .home-budget {
  background: var(--color-surface);
}

:root[data-style="city"] .home-city-budget-route {
  display: none;
}

:root[data-style="city"] .home-budget-grid,
:root[data-style="city"] .home-popular-grid,
:root[data-style="city"] .home-curator-grid {
  position: relative;
  z-index: 2;
}

:root[data-style="city"] .home-budget-card {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: var(--fp-card-radius);
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--fp-ink) 20%, transparent);
  box-sizing: border-box;
  padding-top: 30px;
  position: relative;
  rotate: none;
  transition: box-shadow 180ms ease, transform 180ms ease;
  translate: none;
  z-index: 1;
}

:root[data-style="city"] .home-budget-grid {
  --home-budget-progress: 0px;
}

:root[data-style="city"] .home-budget-grid::before {
  background: var(--city-home-coral);
  border-block: var(--fp-outline-width) solid var(--fp-ink);
  box-sizing: border-box;
  content: "";
  height: 8px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 12px;
  transition: opacity 140ms ease, width 180ms ease;
  width: var(--home-budget-progress);
  z-index: 0;
}

:root[data-style="city"] .home-budget-grid:has(.home-budget-card:is(:hover, :focus))::before {
  opacity: 1;
}

:root[data-style="city"] .home-budget-grid:has(.home-budget-card:nth-child(2):is(:hover, :focus)) {
  --home-budget-progress: calc(16.6667% + 2px);
}

:root[data-style="city"] .home-budget-grid:has(.home-budget-card:nth-child(3):is(:hover, :focus)) {
  --home-budget-progress: calc(33.3333% + 4px);
}

:root[data-style="city"] .home-budget-grid:has(.home-budget-card:nth-child(4):is(:hover, :focus)) {
  --home-budget-progress: calc(50% + 6px);
}

:root[data-style="city"] .home-budget-grid:has(.home-budget-card:nth-child(5):is(:hover, :focus)) {
  --home-budget-progress: calc(66.6667% + 8px);
}

:root[data-style="city"] .home-budget-grid:has(.home-budget-card:nth-child(6):is(:hover, :focus)) {
  --home-budget-progress: calc(83.3333% + 10px);
}

:root[data-style="city"] .home-budget-card::before {
  background: var(--color-tertiary);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 999px;
  box-sizing: border-box;
  content: "";
  height: 12px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 10px;
  transition: background-color 180ms ease, transform 180ms ease;
  width: 12px;
  z-index: 2;
}

:root[data-style="city"] .home-budget-card > * {
  position: relative;
  z-index: 1;
}

:root[data-style="city"] .home-budget-card:is(:hover, :focus),
:root[data-style="city"] .home-budget-card:has(~ .home-budget-card:is(:hover, :focus)) {
  --home-budget-stop-color: var(--city-home-coral);
}

:root[data-style="city"] .home-budget-card:is(:hover, :focus)::before,
:root[data-style="city"] .home-budget-card:has(~ .home-budget-card:is(:hover, :focus))::before {
  background: var(--home-budget-stop-color);
  transform: scale(1.15);
}

@media (hover: hover) and (pointer: fine) {
  :root[data-style="city"] .home-budget-card:hover,
  :root[data-style="city"] .home-budget-card:focus {
    box-shadow: 5px 6px 0 color-mix(in srgb, var(--fp-ink) 24%, transparent);
    transform: translateY(-3px);
  }
}

:root[data-style="city"] .home-popular {
  background: var(--color-surface-container-low);
  border-block: var(--fp-outline-width) solid var(--fp-ink);
}

:root[data-style="city"] .home-popular-card {
  background: var(--color-surface-container-lowest);
}

:root[data-style="city"] .home-curator {
  background: var(--city-home-coral);
  color: var(--city-home-accent-ink);
}

:root[data-style="city"] .home-curator-header h2,
:root[data-style="city"] .home-curator-header p,
:root[data-style="city"] .home-curator-header .home-nudge {
  color: var(--city-home-accent-ink);
}

:root[data-style="city"] .home-curator-card {
  background: var(--color-surface-container-lowest);
  color: var(--color-on-surface);
}

:root[data-style="city"] .home-values {
  background: var(--color-surface);
}

:root[data-style="city"] .home-value-grid {
  border: var(--fp-outline-width) solid var(--fp-ink);
  gap: 0;
}

:root[data-style="city"] .home-value-card {
  background: var(--color-surface-container-lowest);
  border: var(--fp-outline-width) solid var(--fp-ink);
  border-radius: 0;
  position: relative;
}

:root[data-style="city"] .home-value-card::after {
  background: var(--city-home-sky);
  border: var(--fp-outline-width) solid var(--fp-ink);
  content: "";
  height: 12px;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 12px;
  rotate: 5deg;
  width: 12px;
}

:root[data-style="city"] .home-value-card:nth-child(2)::after {
  background: var(--color-tertiary);
}

:root[data-style="city"] .home-value-card:nth-child(3)::after {
  background: var(--city-home-coral);
}

:root[data-style="city"] .home-value-card:nth-child(4)::after {
  background: var(--color-secondary);
}

:root[data-style="city"] .home-warnings {
  background: var(--color-primary);
}

:root[data-style="city"] .home-warning-card {
  background: color-mix(in srgb, var(--color-on-primary) 7%, transparent);
  border: var(--fp-outline-width) solid var(--color-tertiary);
  border-radius: var(--fp-card-radius);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.32);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

:root[data-style="city"] .home-warning-card:hover,
:root[data-style="city"] .home-warning-card:focus {
  background: color-mix(in srgb, var(--color-on-primary) 10%, transparent);
  box-shadow: 6px 7px 0 rgba(0, 0, 0, 0.38);
  transform: translate(-1px, -2px);
}

:root[data-style="city"] .home-warning-card > div:first-child > div:first-child {
  border: var(--fp-outline-width) solid color-mix(in srgb, var(--color-tertiary) 68%, transparent);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.24);
}

:root[data-style="city"] .home-buying-safety {
  background: var(--color-tertiary);
}

:root[data-style="city"] .home-buying-header h2,
:root[data-style="city"] .home-buying-header p {
  color: var(--city-home-accent-ink);
}

:root[data-style="city"] .home-buying-warning {
  background: color-mix(in srgb, var(--color-error) 12%, var(--color-surface));
  border: var(--fp-outline-width) solid var(--color-error);
}

:root[data-style="city"] .home-cta {
  background: var(--city-home-leaf-field);
}

:root[data-style="city"] .home-cta-content {
  position: relative;
  z-index: 2;
}

:root[data-style="city"] .home-city-cta-scene {
  inset: 0;
  overflow: hidden;
}

:root[data-style="city"] .home-city-cta-route {
  background: transparent;
  border: 0;
  bottom: 0;
  box-sizing: border-box;
  height: 10px;
  left: -1%;
  overflow: visible;
  position: absolute;
  rotate: -1deg;
  width: 102%;
}

:root[data-style="city"] .home-city-cta-route::before {
  background: var(--city-home-coral);
  border-block: var(--fp-outline-width) solid var(--fp-ink);
  box-sizing: border-box;
  content: "";
  height: 8px;
  left: 0;
  position: absolute;
  top: 1px;
  width: 100%;
}

:root[data-style="city"] .home-city-cta-route::after {
  display: none;
}

:root[data-style="city"] .home-city-cta-arrow {
  border-bottom: 18px solid transparent;
  border-right: 18px solid var(--fp-ink);
  border-top: 18px solid transparent;
  height: 0;
  position: absolute;
  right: clamp(20px, 8vw, 120px);
  top: 28px;
  width: 0;
}

@media (max-width: 1023.98px) {
  :root[data-style="city"] .home-budget-grid::before {
    display: none;
  }

  :root[data-style="city"] .home-budget-card,
  :root[data-style="city"] .home-budget-card:hover,
  :root[data-style="city"] .home-budget-card:focus {
    transform: none;
    translate: none;
  }

  :root[data-style="city"] .home-city-cta-route {
    left: 0;
    rotate: none;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  :root[data-style="city"] .home-value-grid,
  :root[data-style="city"] .home-warning-grid,
  :root[data-style="city"] .home-buying-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  :root[data-style="city"] .home-city-budget-route,
  :root[data-style="city"] .home-value-card::after {
    rotate: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root[data-style="city"] .home-page {
    --city-home-coral: #ff8a78;
    --city-home-sky: #69c7ef;
    --city-home-accent-ink: #10182a;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-style="city"] .home-page .home-city-decoration,
  :root[data-style="city"] .home-budget-card,
  :root[data-style="city"] .home-budget-card::before,
  :root[data-style="city"] .home-budget-grid::before,
  :root[data-style="city"] .home-warning-card {
    animation: none;
    transition: none;
  }

  :root[data-style="city"] .home-budget-card,
  :root[data-style="city"] .home-budget-card:hover,
  :root[data-style="city"] .home-budget-card:focus,
  :root[data-style="city"] .home-warning-card,
  :root[data-style="city"] .home-warning-card:hover,
  :root[data-style="city"] .home-warning-card:focus,
  :root[data-style="city"] .home-city-budget-route,
  :root[data-style="city"] .home-city-cta-route,
  :root[data-style="city"] .home-value-card::after {
    rotate: none;
    translate: none;
  }
}
