/* ===== Task 040: visual redesign layer =====
   Loaded AFTER style.css (templates/base.html). Brings the Family Park
   corporate site's (familypark.uz) visual language - large type, wide
   container, big rounded cards, pill buttons, split hero - to this site
   in the FPS brand colors. CSS only: no text, page, CTA or data changes.
   The owner's "no large dark blocks, including the footer" rule (Task 032,
   tests/test_no_dark_blocks.py) still holds - the footer stays light. */

:root {
  --ink: #02140d;                 /* = --rich-green, headings */
  --text: #2c3a35;                /* body copy */
  --muted: #5d6d67;               /* captions, labels */
  --ground: #f3f6f4;              /* page background */
  --line: #dfe7e3;                /* hairlines, card borders */
  --tint: #e6f5ee;                /* green-tinted panels */
  --tint-strong: #cdeede;

  --container: 1280px;
  --gutter: clamp(16px, 5.5vw, 80px);
  --section-y: clamp(64px, 8vw, 112px);

  --fs-h1: clamp(40px, 5.3vw, 76px);
  --fs-h1-inner: clamp(36px, 4.4vw, 64px);
  --fs-h2: clamp(30px, 3.4vw, 50px);
  --fs-h3: clamp(20px, 1.6vw, 24px);
  --fs-lead: clamp(17px, 1.4vw, 20px);

  --r-card: 28px;
  --r-media: 22px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
  background-color: var(--ground);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

main {
  overflow-x: clip;
}

h1, h2, h3 {
  color: var(--ink);
}

/* ---------- Layout: one wide container for every section ---------- */
main section,
.homepage-page section,
.breadcrumbs {
  max-width: calc(var(--container) + 2 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main section,
.homepage-page section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.breadcrumbs {
  padding-top: 28px;
}

.breadcrumbs-list {
  font-size: 14px;
}

.breadcrumbs-list a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs-list a:hover {
  color: var(--ink);
}

/* Full-bleed colored band behind a still-contained section - no markup
   change needed. */
.band-white,
.homepage-page .what-we-do,
.homepage-page .houses-team-block,
.homepage-page .homepage-contact {
  background-color: var(--white);
  box-shadow: 0 0 0 100vmax var(--white);
  clip-path: inset(0 -100vmax);
}

.homepage-page .find-house,
.homepage-page .mulkdorlarga-teaser,
.homepage-page .homepage-news-block {
  background: none;
  box-shadow: none;
}

/* ---------- Typography ---------- */
main h1 {
  font-size: var(--fs-h1-inner);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.025em;
  max-width: 18ch;
}

main section h2,
.homepage-page section h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: clamp(24px, 3vw, 44px);
  max-width: 22ch;
  text-align: left;
}

/* The kicker bar above every heading becomes a small brand dot. */
.homepage-page section h2::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 0 18px;
}

.homepage-page .find-house h2::before {
  margin-left: 0;
  margin-right: 0;
}

main h3,
.card h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
}

main section > p,
[class$="-lead"],
.hero-subheadline {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text);
  max-width: 62ch;
}

.card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}

/* Inner-page heroes: big heading, generous air, left aligned. */
main > section:first-of-type[class$="-hero"],
.services-hero,
.about-hero,
.career-hero,
.club-hero,
.contact-hero,
.news-hero,
.mulkdorlarga-hero,
.mening-uyim-hero {
  text-align: left;
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: clamp(32px, 4vw, 56px);
}

main [class$="-hero"] h1 {
  margin-bottom: 20px;
}

/* Headings used inside cards (e.g. /mulkdorlarga/ route cards use h2)
   stay card-sized, not section-sized. */
main .card h2 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  max-width: none;
  margin-bottom: 4px;
}

/* Everything reads from one left edge - the old centered "simple
   section" pages (appeal, houses, mening-uyim blocks) included. */
[class$="-lead"],
.appeal-subheadline,
.house-finder > p,
.find-house p,
.mening-uyim-block p,
.appeal-block p {
  margin-left: 0;
  margin-right: 0;
}

.appeal-page,
.house-finder,
.find-house,
.mening-uyim-block,
.appeal-block {
  text-align: left;
}

.appeal-form,
.house-finder-form {
  max-width: 720px;
  margin: 0;
  padding: clamp(24px, 3vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background-color: var(--white);
}

.house-search-row {
  justify-content: flex-start;
  max-width: 720px;
  margin: 0 0 32px;
  padding: 8px;
  gap: 8px;
  flex-wrap: nowrap;
  border-radius: var(--r-pill);
  background-color: var(--white);
  border: 1px solid var(--line);
}

main .house-search-row .house-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: var(--r-pill);
}

@media (max-width: 767px) {
  .house-search-row {
    flex-direction: column;
    align-items: stretch;
    border-radius: 22px;
  }

  .mulkdorlarga-teaser-card {
    min-height: 0;
    gap: 16px;
  }
}

.house-hero,
.houses-list-wrap h2 {
  text-align: left;
}

.house-hero-cta {
  justify-content: flex-start;
}

.house-about-list,
.about-mission p,
.house-finder-empty {
  margin-left: 0;
  margin-right: 0;
}

.houses-list-wrap {
  margin: 48px 0 0;
}

/* ---------- Buttons: pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn-primary,
.homepage-page .btn-primary {
  background-color: var(--green);
  color: var(--ink);
  box-shadow: none;
}

.btn-primary:hover,
.homepage-page .btn-primary:hover {
  background-color: var(--green-dark);
  color: var(--ink);
  opacity: 1;
}

/* Arrow bubble on link-buttons (decorative glyph, not copy). */
main a.btn-primary::after {
  content: "\2192";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: -14px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--ink);
  font-size: 16px;
  transition: transform 0.25s var(--ease-out);
}

main a.btn-primary:hover::after {
  transform: translateX(3px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-secondary:hover {
  background-color: var(--ink);
  color: var(--white);
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--line);
}

/* Frosted header only where the menu isn't an off-canvas drawer: a
   backdrop-filter makes the header the containing block of the fixed
   mobile .main-nav, which then overflows the page sideways. */
@media (min-width: 1226px) {
  .site-header {
    background-color: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}

.header-inner {
  max-width: calc(var(--container) + 2 * var(--gutter));
  padding: 14px var(--gutter);
}

.nav-list a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.nav-list a:hover {
  color: var(--green-accessible);
}

.nav-actions .btn {
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
}

.mening-uyim-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  font-weight: 500;
  white-space: nowrap;
}

.nav-submenu {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(2, 20, 13, 0.25);
  padding: 8px;
}

.nav-submenu a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
}

.nav-submenu a:hover {
  background-color: var(--tint);
  color: var(--ink);
}

.nav-actions .btn,
.mening-uyim-link,
.quick-appeal-btn {
  white-space: nowrap;
}

/* .btn's inline-flex above would otherwise un-hide the mobile-only copy
   on desktop (same specificity, later file wins). */
.quick-appeal-btn {
  display: none;
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

@media (max-width: 1225px) {
  .quick-appeal-btn {
    display: inline-flex;
  }
}

/* ---------- Cards ---------- */
.card,
.homepage-page .card {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(24px, 2.4vw, 36px);
  box-shadow: none;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.homepage-page .card::before {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  a.card:hover,
  .homepage-page a.card:hover {
    transform: translateY(-6px);
    border-color: var(--green);
    box-shadow: 0 26px 50px -30px rgba(2, 20, 13, 0.35);
  }
}

/* Icon holders: rounded tiles instead of small circles. */
.contact-icon-circle,
.mulkdorlarga-route-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background-color: var(--tint);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.35s var(--ease-out);
}

.contact-icon-circle svg,
.mulkdorlarga-route-icon svg {
  width: 26px;
  height: 26px;
}

a.card:hover .contact-icon-circle,
a.card:hover .mulkdorlarga-route-icon {
  background-color: var(--green);
}

.what-we-do-cards,
.how-we-work-cards,
.mulkdorlarga-teaser-grid,
.mulkdorlarga-route-grid,
.values-cards,
.approach-cards,
.contact-routing-cards,
.news-card-grid {
  gap: clamp(14px, 1.6vw, 24px);
}

.what-we-do-card {
  gap: 14px;
}

.what-we-do-card h3 {
  margin: 22px 0 0;
}

.mulkdorlarga-teaser-card {
  gap: 24px;
  min-height: 200px;
  justify-content: space-between;
}

/* ---------- Homepage: hero, split layout ---------- */
.homepage-page .hero,
.homepage-page .hero.has-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  min-height: 0;
  margin: 0 auto;
  padding-top: clamp(32px, 4.5vw, 72px);
  padding-bottom: clamp(48px, 6vw, 96px);
  border-radius: 0;
  overflow: visible;
  background: none;
  text-align: left;
}

.homepage-page .hero::before {
  display: none;
}

.homepage-page .hero.has-photo .hero-content {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  padding: 0;
  max-width: none;
  margin: 0;
}

.homepage-page .hero h1,
.homepage-page .hero.has-photo h1 {
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--ink);
  max-width: 11ch;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.homepage-page .hero.has-photo .hero-subheadline,
.homepage-page .hero.has-photo .hero-trust-strip li {
  color: var(--text);
}

.homepage-page .hero-cta,
.homepage-page .hero.has-photo .hero-cta {
  justify-content: flex-start;
  gap: 12px;
}

.homepage-page .hero.has-photo .btn-primary {
  background-color: var(--green);
  color: var(--ink);
}

.homepage-page .hero.has-photo .btn-secondary {
  color: var(--ink);
  border-color: var(--ink);
}

.homepage-page .hero.has-photo .btn-secondary:hover {
  background-color: var(--ink);
  color: var(--white);
}

.homepage-page .hero.has-photo .hero-media {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  inset: auto;
  aspect-ratio: 5 / 4;
  border-radius: var(--r-card) 220px var(--r-card) var(--r-card);
  overflow: hidden;
  background-color: var(--tint);
}

.homepage-page .hero.has-photo .hero-media-overlay {
  display: none;
}

/* ---------- Homepage: find your house ---------- */
.homepage-page .find-house-box,
.homepage-page .find-house-box.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas: "title form" "text form";
  column-gap: clamp(24px, 4vw, 64px);
  align-items: center;
  max-width: none;
  margin: 0;
  padding: clamp(28px, 4vw, 56px);
  text-align: left;
  background-color: var(--tint);
  border-color: transparent;
}

.homepage-page .find-house-box h2 {
  grid-area: title;
  align-self: end;
  margin-bottom: 14px;
}

.homepage-page .find-house-box p {
  grid-area: text;
  align-self: start;
  margin: 0;
  text-align: left;
}

.homepage-page .find-house-row {
  grid-area: form;
  justify-content: flex-start;
  margin: 0;
  padding: 8px;
  gap: 8px;
  background-color: var(--white);
  border-radius: var(--r-pill);
  flex-wrap: nowrap;
}

.homepage-page .find-house-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-pill);
  background-color: var(--white);
  color: var(--ink);
  font-size: 16px;
}

.homepage-page .find-house-input::placeholder {
  color: var(--muted);
}

.homepage-page .find-house-submit {
  flex: 0 0 auto;
  background-color: var(--ink);
  color: var(--white);
}

.homepage-page .find-house-submit:hover {
  background-color: var(--green);
  color: var(--ink);
}

/* ---------- Homepage: owners ---------- */
.homepage-page .mulkdorlarga-teaser {
  text-align: left;
}

.homepage-page .mulkdorlarga-teaser > p {
  margin: -16px 0 clamp(24px, 3vw, 40px);
}

.homepage-page .mulkdorlarga-teaser > .btn {
  margin-top: clamp(24px, 3vw, 40px);
}

/* ---------- Homepage: houses and team ---------- */
.homepage-page .houses-team-grid {
  gap: clamp(14px, 1.6vw, 24px);
}

.homepage-page .houses-team-main-photo,
.homepage-page .houses-team-secondary-photo {
  border-radius: var(--r-media);
  overflow: hidden;
}

/* The main photo fills the whole height of the right-hand column instead
   of leaving an empty gap under it (inline aspect-ratio comes from data). */
.homepage-page .houses-team-grid {
  align-items: stretch;
}

.homepage-page .houses-team-main-photo {
  aspect-ratio: auto !important;
  height: 100%;
  min-height: 420px;
  border-radius: var(--r-card) 160px var(--r-card) var(--r-card);
}

.homepage-page .houses-team-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.homepage-page .houses-team-text {
  padding: clamp(22px, 2.4vw, 32px);
  border-radius: var(--r-media);
  background-color: var(--tint);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink);
  box-shadow: none;
}

/* ---------- News ---------- */
.homepage-news-card {
  border-radius: var(--r-media);
}

.homepage-news-card img,
.news-card img {
  border-radius: 16px;
}

.homepage-announcements-column {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background-color: var(--white);
}

/* ---------- Contact strip (homepage + /contacts/) ---------- */
.contact-strip {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background-color: var(--white);
  padding: clamp(20px, 2.6vw, 36px);
}

.homepage-page .homepage-contact .contact-strip {
  background-color: var(--ground);
  border-color: transparent;
}

.contact-strip-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-strip-value {
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--green);
}

.contact-strip-address {
  color: var(--muted);
}

/* ---------- Services list ---------- */
.work-card {
  border-radius: var(--r-media);
  align-items: flex-start;
}

.work-order {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background-color: var(--tint);
  color: var(--ink);
  font-weight: 600;
}

.work-frequency {
  color: var(--muted);
}

/* ---------- Forms ---------- */
main input[type="text"],
main input[type="tel"],
main input[type="email"],
main input[type="search"],
main select,
main textarea {
  min-height: 52px;
  padding: 12px 18px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background-color: var(--white);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

main textarea {
  min-height: 140px;
}

main input:focus-visible,
main select:focus-visible,
main textarea:focus-visible {
  outline: none;
  border-color: var(--green-accessible);
  box-shadow: 0 0 0 4px rgba(19, 209, 140, 0.22);
}

main label {
  font-weight: 500;
  color: var(--ink);
}

main form.card,
.appeal-form {
  border-radius: var(--r-card);
}

/* ---------- Footer (light, per owner rule) ---------- */
.site-footer {
  background-color: var(--surface-tint-1);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: calc(var(--container) + 2 * var(--gutter));
  padding: clamp(56px, 7vw, 96px) var(--gutter) 32px;
}

.footer-column h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.footer-nav a,
.footer-contacts a,
.footer-contacts span {
  color: var(--ink);
  font-size: 15px;
}

.footer-nav a:hover,
.footer-contacts a:hover {
  color: var(--green-accessible);
}

.footer-mission {
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: var(--ink);
  max-width: 28ch;
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-legal a,
.footer-copy {
  color: var(--muted);
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1023px) {
  .homepage-page .hero,
  .homepage-page .hero.has-photo {
    grid-template-columns: 1fr;
  }

  .homepage-page .hero.has-photo .hero-media {
    grid-column: 1;
    grid-row: 2;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-media) 140px var(--r-media) var(--r-media);
  }

  .homepage-page .hero h1,
  .homepage-page .hero.has-photo h1 {
    max-width: 14ch;
  }

  .homepage-page .find-house-box,
  .homepage-page .find-house-box.card {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "text" "form";
    row-gap: 12px;
  }

  .homepage-page .find-house-row {
    margin-top: 12px;
  }
}

@media (max-width: 900px) {
  .homepage-page section {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .what-we-do-card h3 {
    margin-top: 8px;
  }

  .homepage-page .houses-team-main-photo {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3 !important;
  }
}

@media (max-width: 767px) {
  :root {
    --r-card: 22px;
  }

  .homepage-page .hero,
  .homepage-page .hero.has-photo {
    padding-top: 28px;
  }

  .homepage-page .hero.has-photo .hero-media {
    border-radius: var(--r-media) 96px var(--r-media) var(--r-media);
  }

  .homepage-page .hero-cta .btn {
    width: 100%;
    justify-content: space-between;
  }

  .homepage-page .find-house-row {
    flex-direction: column;
    align-items: stretch;
    border-radius: 22px;
  }

  .homepage-page .find-house-submit {
    width: 100%;
  }

  .homepage-page .houses-team-main-photo {
    border-radius: var(--r-card) 96px var(--r-card) var(--r-card);
  }

  .btn {
    min-height: 50px;
  }
}

/* =====================================================================
   Task 040, round 2: more character - decorative elements only (no new
   copy): hero seal + glow, heading marquee, bold green search panel,
   numbered cards with arrow bubbles,    ===================================================================== */

/* ---------- Hero: soft brand glow behind the section ---------- */
.homepage-page .hero.has-photo {
  position: relative;
  isolation: isolate;
}

.homepage-page .hero.has-photo::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10% -20% -10% 35%;
  background:
    radial-gradient(closest-side, rgba(19, 209, 140, 0.28), transparent 70%) 70% 40% / 70% 80% no-repeat,
    radial-gradient(closest-side, rgba(19, 209, 140, 0.14), transparent 70%) 10% 90% / 50% 60% no-repeat;
  filter: blur(10px);
  pointer-events: none;
}

.hero-seal {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  justify-self: start;
  position: relative;
  z-index: 2;
  width: clamp(112px, 11vw, 156px);
  aspect-ratio: 1;
  margin: 0 0 -8% -9%;
  border-radius: 50%;
  background-color: var(--green);
  box-shadow: 0 20px 44px -18px rgba(2, 20, 13, 0.45);
  display: grid;
  place-items: center;
}

.hero-seal-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: fps-spin 18s linear infinite;
}

.hero-seal-ring text {
  font-family: 'Futura New', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  fill: var(--ink);
}

.hero-seal-logo {
  width: 36%;
  height: auto;
  filter: brightness(0) invert(1);
}

@keyframes fps-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Marquee band (hero heading repeated) ---------- */
.hero-marquee {
  overflow: hidden;
  padding: clamp(20px, 3vw, 40px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-color: var(--white);
}

.hero-marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  width: max-content;
  animation: fps-marquee 60s linear infinite;
}

html.motion .hero-marquee-track {
  animation: none;
}

.hero-marquee-item {
  font-size: clamp(40px, 7vw, 108px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
}

.hero-marquee-item.is-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

.hero-marquee-leaf {
  flex: 0 0 auto;
  width: clamp(32px, 3.4vw, 52px);
  height: auto;
}

@keyframes fps-marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Bold green search panel ---------- */
.homepage-page .find-house-box,
.homepage-page .find-house-box.card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--green);
  padding: clamp(32px, 5vw, 72px);
}

.homepage-page .find-house-box::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -60px;
  bottom: -90px;
  width: 340px;
  height: 320px;
  background: url("../img/logo-badge-176.png") center / contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: 0.16;
  transform: rotate(-12deg);
}

.homepage-page .find-house-box h2,
.homepage-page .find-house-box p {
  color: var(--ink);
}

.homepage-page .find-house h2::before {
  background-color: var(--white);
}

.homepage-page .find-house-row {
  box-shadow: 0 24px 50px -24px rgba(2, 20, 13, 0.45);
}

/* ---------- Numbered cards with an arrow bubble ---------- */
.what-we-do-cards,
.mulkdorlarga-teaser-grid {
  counter-reset: fps-card;
}

.homepage-page .what-we-do-card,
.homepage-page .mulkdorlarga-teaser-card {
  position: relative;
  counter-increment: fps-card;
  padding-bottom: clamp(88px, 7.4vw, 108px);
}

.what-we-do-card::after,
.mulkdorlarga-teaser-card::after {
  content: "0" counter(fps-card);
  position: absolute;
  top: clamp(24px, 2.4vw, 36px);
  right: clamp(24px, 2.4vw, 36px);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.what-we-do-card > p:last-child::after,
.mulkdorlarga-teaser-card > h3::after {
  content: "\2192";
  position: absolute;
  left: clamp(24px, 2.4vw, 36px);
  bottom: clamp(24px, 2.4vw, 36px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--ink);
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

a.card:hover > p:last-child::after,
a.card:hover > h3::after {
  background-color: var(--green);
  border-color: var(--green);
  transform: rotate(-45deg);
}

/* Middle services card set lower and tinted - breaks the flat row.
   margin (not transform): motion.js animates these cards' transform. */
@media (min-width: 901px) {
  .what-we-do-cards {
    align-items: start;
  }

  .what-we-do-cards > .card:nth-child(2) {
    margin-top: 40px;
    background-color: var(--tint);
    border-color: transparent;
  }
}

/* ---------- Houses & team: green frame accent ---------- */
.homepage-page .houses-team-main-photo {
  box-shadow: 14px 14px 0 0 var(--green);
}

/* ---------- Contact: one rounded tinted panel ---------- */
.homepage-page .homepage-contact .contact-strip {
  background-color: var(--tint);
}

/* The search panel's h2 sits inside a .card but is a section heading. */
.homepage-page .find-house-box h2 {
  font-size: var(--fs-h2);
  max-width: 14ch;
}

.site-footer {
  margin-top: 0;
}

@media (max-width: 1023px) {
  .hero-seal {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    justify-self: end;
    margin: 0 4% -10% 0;
  }

  .homepage-page .houses-team-main-photo {
    box-shadow: 8px 8px 0 0 var(--green);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-seal-ring,
  .hero-marquee-track {
    animation: none;
  }
}
