/*
 * Colors, Archivo and Public Sans come from the app (service-manager-frontend's theme.ts).
 * The extra colors come from the work itself: lawn green and street grey for the block map,
 * a yellow "you are here" for your house, and one tint per service group.
 */
:root {
  --sky: #E7EEFB;
  --paper: #F5F7FA;
  --card: #FFFFFF;
  --ink: #0E2240;
  --ink-soft: #4E5D72;
  --band: #0E2240;
  --band-raised: #17305A;
  --band-text: #FFFFFF;
  --band-soft: #B7C3D6;
  --brand: #1D5BD8;
  --brand-deep: #1549B4;
  --highlight: #8DB8FF;
  --tint: #E4ECFB;
  --line: #D9DEE4;
  --line-strong: #B9C1CB;
  --lawn: #D3E6C8;
  --lawn-ink: #2D5F35;
  --road: #C7D0DC;
  --sun: #FFC53D;
  --sun-deep: #B07A00;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Public Sans', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --section: clamp(72px, 9vw, 120px);
}

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

html {
  background: var(--band);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--card);
  color: var(--ink);
}

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

/* Type: sentence case, normal width, set tight. */
h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}

h1 {
  max-width: 17ch;
  font-weight: 750;
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

h2 {
  max-width: 20ch;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.lede {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1.1875rem;
  line-height: 1.55;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 750 1.125rem/1 var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.mark {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--brand);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 500;
  font-size: 0.95rem;
}

.top-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.top-nav a:hover {
  color: var(--ink);
}

.top-nav .pill {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--brand);
  color: var(--band-text);
  font-weight: 600;
}

.top-nav .pill:hover {
  background: var(--brand-deep);
  color: var(--band-text);
}

.top-nav .pill.is-soon {
  display: none;
}

/* Buttons */
.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--band-text);
  text-decoration: none;
  font: 600 1.0625rem/1 var(--body);
  box-shadow: 0 1px 0 rgba(14, 34, 64, 0.2);
}

.cta:hover {
  background: var(--brand-deep);
}

.cta-light {
  background: var(--band-text);
  color: var(--band);
}

.cta-light:hover {
  background: var(--tint);
}

.cta.is-soon {
  display: none;
}

/* Store buttons are dark, like the official black badges. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 18px 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--band-text);
  text-decoration: none;
  font: 600 1.0625rem/1.1 var(--body);
}

.store svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.store small {
  display: block;
  font: 500 0.7rem/1.2 var(--body);
  color: var(--band-soft);
}

.store:hover {
  background: var(--band-raised);
}

/* Not in the store yet: an outline, so it never reads as a broken button. */
.store.is-soon {
  cursor: default;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.store.is-soon small {
  font-size: 0;
  color: var(--ink-soft);
}

.store.is-soon small::before {
  content: 'Coming soon to';
  font-size: 0.7rem;
}

/* The 404 page's "back" button. */
.store-web {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.store-web small {
  color: var(--ink-soft);
}

.store-web:hover {
  background: var(--tint);
}

/* Hero: the pitch on the left, what the app shows you on the right. */
.hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px);
  background: var(--sky);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
}

.hero .lede {
  margin-top: 22px;
}

/* The web button on its own line, the store buttons paired under it. */
.hero .get {
  display: grid;
  grid-template-columns: repeat(2, max-content);
}

.hero .cta {
  grid-column: 1 / -1;
  justify-self: start;
}

/* The street card: your block from above, with what crews did there this week. */
.street {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(14, 34, 64, 0.08), 0 28px 56px -30px rgba(14, 34, 64, 0.4);
}

.street-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.street-head strong {
  font: 700 1.125rem/1.2 var(--display);
}

.street-head span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.street-map svg {
  width: 100%;
  height: auto;
}

.street-lawns rect {
  fill: var(--lawn);
}

.street-road {
  fill: var(--road);
}

.street-name {
  font: italic 600 14px var(--body);
  fill: var(--ink-soft);
}

.street-drives rect {
  fill: #E8ECF0;
}

.street-trees circle {
  fill: #A3C890;
}

/* Houses are gable roofs seen from above: a sunny half and a shaded half. */
.street-house .roof-sun {
  fill: #FFFFFF;
}

.street-house .roof-shade {
  fill: #DCE2E8;
}

.street-done .roof-sun {
  fill: #3B74E6;
}

.street-done .roof-shade {
  fill: var(--brand-deep);
}

.street-you .roof-sun {
  fill: var(--sun);
}

.street-you .roof-shade {
  fill: #E8A81C;
}

.street-done .tag {
  fill: var(--card);
}

.street-done text,
.street-you text {
  font: 600 13px var(--body);
  fill: var(--ink);
}

.street-you .tag {
  fill: var(--ink);
}

.street-you text {
  font-weight: 700;
  fill: var(--band-text);
}

.street-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.street-foot p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
}

.street-foot strong {
  display: block;
  color: var(--ink);
}

.street-btn {
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--band-text);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Shared section header: heading on the left, a line of explanation beside it. */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px clamp(32px, 6vw, 96px);
  align-items: end;
}

.section-head .lede {
  margin: 0;
}

/* Services: one tint per group, so the list reads at a glance. */
.services {
  padding: var(--section) 0;
  background: var(--card);
}

.service-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
}

.svc {
  padding: 24px;
  border-radius: 12px;
  background: var(--svc-bg);
}

.svc svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 10px;
  background: var(--svc-ink);
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svc h3 {
  margin-top: 18px;
  color: var(--svc-ink);
}

.svc p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.svc-snow { --svc-bg: #E3EEFB; --svc-ink: #2563A8; }
.svc-lawn { --svc-bg: #E2F1DA; --svc-ink: #2F7A3E; }
.svc-trees { --svc-bg: #E9EEDD; --svc-ink: #4D6A27; }
.svc-gutters { --svc-bg: #E9ECF2; --svc-ink: #47546A; }
.svc-pools { --svc-bg: #DCF1F2; --svc-ink: #12707A; }
.svc-hauling { --svc-bg: #FBEBD3; --svc-ink: #98570F; }

/* Homeowners */
.homeowners {
  padding: var(--section) 0;
}

.homeowners-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: center;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 18px;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--brand);
  font: 700 1.125rem/1 var(--display);
}

.steps h3 {
  padding-top: 8px;
}

.steps p {
  max-width: 42ch;
  margin: 4px 0 0;
  color: var(--ink-soft);
}

/* What "see what crews near you charge" looks like in the app. */
.quotes {
  margin: 0;
  padding: 22px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(14, 34, 64, 0.08), 0 24px 48px -28px rgba(14, 34, 64, 0.35);
}

.quotes figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 2px 2px 16px;
}

.quotes-service {
  font: 700 1.125rem/1.2 var(--display);
}

.quotes-count {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.quotes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quotes li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
}

.quotes li.is-picked {
  border-color: var(--brand);
  background: var(--tint);
}

.quote-name {
  font-weight: 600;
}

.quote-price {
  grid-row: span 2;
  align-self: center;
  font: 700 1.5rem/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.quote-meta {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.quotes-send {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--band-text);
  font-weight: 600;
  text-align: center;
}

/* Crews */
.crews {
  padding: var(--section) 0;
  background: var(--band);
  color: var(--band-text);
}

.crews-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: center;
}

.crews .lede {
  color: var(--band-soft);
}

.crews .cta {
  margin-top: 32px;
}

.crews :focus-visible {
  outline-color: var(--highlight);
}

/* The request a crew gets: the other side of the homeowner's price list. */
.request {
  margin: 0;
  padding: 22px;
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.request-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.request-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--brand);
}

.request-new::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(255, 197, 61, 0.3);
}

.request-dist {
  color: var(--ink-soft);
}

.request-title {
  margin: 14px 0 0;
  font: 700 1.5rem/1.15 var(--display);
}

.request-meta {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.request-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-soft);
}

.request-price strong {
  color: var(--ink);
  font: 700 1.75rem/1 var(--display);
}

.request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  font-weight: 600;
  text-align: center;
}

.request-actions span {
  padding: 13px 10px;
  border-radius: 10px;
}

.request-take {
  background: var(--brand);
  color: var(--band-text);
}

.request-counter {
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px clamp(24px, 3vw, 40px);
  margin: clamp(56px, 7vw, 88px) 0 0;
}

.facts div {
  padding-top: 18px;
  border-top: 2px solid var(--highlight);
}

.facts dt {
  font: 700 1.125rem/1.3 var(--display);
}

.facts dd {
  margin: 6px 0 0;
  color: var(--band-soft);
}

/* Trust */
.trust {
  padding: var(--section) 0;
  background: var(--card);
}

.trust-grid {
  display: grid;
  gap: 48px;
}

.trust-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px clamp(28px, 4vw, 48px);
  margin: 0;
  padding: 0;
}

.trust-list li {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.trust-list svg {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  padding: 8px;
  border-radius: 10px;
  background: var(--tint);
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-list h3 {
  font-size: 1.0625rem;
}

.trust-list p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

/* Closing: the brand blue, one last ask. */
.closing {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--brand);
  color: var(--band-text);
}

.closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px 48px;
}

/* The heading takes what's left, so the buttons sit beside it on wide screens. */
.closing-inner > div:first-child {
  flex: 1 1 360px;
}

.closing h2 {
  max-width: 15ch;
}

.closing .lede {
  color: #DCE6FA;
}

.closing .get {
  margin: 0;
}

.closing .store.is-soon {
  color: var(--band-text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.closing .store.is-soon small {
  color: #DCE6FA;
}

.closing :focus-visible {
  outline-color: var(--band-text);
}

/* The 404 page is a plain screen, not the blue band. */
.closing-page {
  min-height: 100vh;
  display: grid;
  align-content: center;
  background: var(--sky);
  color: var(--ink);
}

.closing-page .closing-inner {
  display: block;
  width: 100%;
}

.closing-page .lede {
  color: var(--ink-soft);
}

.closing-page .get {
  margin-top: 32px;
}

.closing-page :focus-visible {
  outline-color: var(--brand);
}

/* Footer */
.foot {
  padding: 40px 0;
  background: var(--band);
  color: var(--band-soft);
  font-size: 0.9rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.foot .wordmark {
  color: var(--band-text);
  font-size: 1rem;
}

.foot .mark {
  width: 22px;
  height: 22px;
  color: var(--highlight);
}

.foot p {
  margin: 0;
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--band-text);
  text-decoration: underline;
}

.foot :focus-visible {
  outline-color: var(--highlight);
}

/* Motion: one moment. The crew works its way down the block, then your house shows up. */
@media (prefers-reduced-motion: no-preference) {
  .street-done,
  .street-you {
    animation: arrive 0.5s ease-out both;
  }

  .street-done:nth-child(1) { animation-delay: 0.3s; }
  .street-done:nth-child(2) { animation-delay: 0.55s; }
  .street-done:nth-child(3) { animation-delay: 0.8s; }
  .street-done:nth-child(4) { animation-delay: 1.05s; }
  .street-done:nth-child(5) { animation-delay: 1.3s; }
  .street-you { animation-delay: 1.75s; }

  @keyframes arrive {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  html {
    scroll-behavior: smooth;
  }
}

/* Small screens */
@media (max-width: 960px) {
  .hero-grid,
  .section-head,
  .homeowners-grid,
  .crews-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-list,
  .facts,
  .trust-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request {
    max-width: 440px;
  }
}

@media (max-width: 760px) {
  .top-nav a:not(.pill) {
    display: none;
  }
}

@media (max-width: 640px) {
  .wordmark span {
    font-size: 1rem;
  }

  .top-nav .pill {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* Crop the map to your house and its neighbors instead of shrinking the labels away. */
  .street-map svg {
    height: 260px;
  }

  .street-btn {
    flex: 1 1 100%;
    text-align: center;
  }

  .service-list,
  .facts,
  .trust-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .svc {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 16px;
    padding: 18px;
  }

  .svc svg {
    grid-row: span 2;
  }

  .svc h3 {
    margin-top: 0;
  }

  .hero .get {
    display: flex;
  }

  .cta,
  .store {
    flex: 1 1 160px;
    justify-content: center;
  }

  .cta {
    flex-basis: 100%;
  }

  .quotes,
  .request {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .pill-extra {
    display: none;
  }
}
