/* Home-specific adaptive composition. Existing destination pages stay intact. */
body.developed[data-page="index"] {
  --home-brand: #f0642b;
  --home-deep: #e8590c;
  --home-soft: #fff3e9;
  --home-line: #e7d8ce;
  --home-text: #352b30;
  --home-muted: #6c6056;
}
.mobile-home,
.mobile-home-tabs,
.mobile-home-context {
  display: none;
}

/* Short, subordinate decision support below service discovery. */
@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
  body.developed[data-homepage][data-home-focused] .mobile-home-context {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 24px;
    padding: 0 20px;
    color: var(--home-text);
  }
  body.developed[data-homepage] .mobile-home-context :is(section, header, div, h2, p, span, strong, a, blockquote) {
    background: transparent !important;
    color: inherit !important;
  }
  body.developed[data-homepage] .home-summary-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
  }
  body.developed[data-homepage] .home-summary-heading h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.4;
  }
  body.developed[data-homepage] .home-summary-heading a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 13px;
    color: var(--home-deep) !important;
  }
  body.developed[data-homepage] .home-summary-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--home-line);
    font-size: 15px;
    line-height: 1.5;
  }
  body.developed[data-homepage] .home-summary-price-row strong {
    text-align: right;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
  }
  body.developed[data-homepage] .mobile-home-context .home-summary-note {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--home-muted) !important;
  }
  body.developed[data-homepage] .home-summary-review-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    text-decoration: none;
  }
  body.developed[data-homepage] .home-summary-review-card img {
    flex: none;
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
  }
  body.developed[data-homepage] .home-summary-review-card > div { min-width: 0; }
  body.developed[data-homepage] .home-summary-review-card blockquote {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 650;
  }
  body.developed[data-homepage] .mobile-home-context :is(a, button) { touch-action: manipulation; }
  body.developed[data-homepage] .mobile-home-context button { min-height: 44px; padding: 8px 12px; }
  body.developed[data-homepage] .mobile-home-context :is(a, button):focus-visible { outline: 3px solid var(--home-deep); outline-offset: 3px; }
  body.developed[data-homepage] .mobile-home-context a:active { opacity: .75; }
}
@media (min-width: 761px) {
  body.developed[data-page="index"] #cases .comfort-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 24px;
    width: 100% !important;
  }
  body.developed[data-page="index"] #cases .comfort-title-row h2 {
    flex: 1 1 280px;
  }
  body.developed[data-page="index"] #cases .comfort-service-description {
    flex: 1 1 260px;
    min-width: 0;
    width: auto !important;
    max-width: 460px;
    white-space: normal;
    word-break: keep-all !important;
    overflow-wrap: break-word;
  }
  /* Follow the supplied hero composition, photograph crop and heading palette. */
  body.developed[data-page="index"] .hero-entry {
    gap: 12px;
  }
  body.developed[data-page="index"] .hero-entry .button {
    width: 161px;
    min-height: 44px;
    padding: 8px 12px !important;
    background: var(--sage) !important;
    border-color: var(--sage) !important;
    font-size: 13px;
    line-height: 1.5;
  }
  body.developed[data-page="index"] .hero-entry .button:hover {
    background: var(--sage-deep) !important;
    border-color: var(--sage-deep) !important;
  }
  body.developed[data-page="index"] .hero-entry .button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
  }
}
@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
  body.developed[data-homepage] main#main {
    width: 100%;
    max-width: 100%;
  }
  body.developed[data-page="index"] {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  body.developed[data-page="index"] .site-header {
    min-height: 64px;
    padding-block: 6px !important;
    background: var(--white) !important;
    border-bottom-color: var(--home-line) !important;
  }
  body.developed[data-page="index"]
    .site-header
    :is(nav, div, a, span, small, button) {
    background: var(--white) !important;
  }
  body.developed[data-page="index"] .site-header .header-estimates {
    display: none !important;
  }
  body.developed[data-page="index"] .site-header .menu-toggle {
    grid-column: 3;
    min-height: 48px;
    min-width: 48px;
  }
  body.developed[data-page="index"] .channel-strip {
    display: none;
  }
  body.developed[data-page="index"] .hero {
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 20px 8px;
    min-height: 0;
    border: 0;
  }
  body.developed[data-page="index"] .hero > :is(.hero-copy, .hero-photo) {
    display: none !important;
  }
  body.developed[data-page="index"] .mobile-home {
    display: block;
    color: var(--home-text);
  }
  body.developed[data-page="index"]
    .mobile-home
    :is(div, p, small, b, span, h1, svg, nav, a):not(:where([class*="showcase-"], [class*="showcase-"] *, .home-consultation, .home-consultation *, .consultation-launcher, .consultation-launcher *)) {
    background: transparent !important;
    color: inherit !important;
  }
  body.developed[data-page="index"] .mobile-home-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
  }
  body.developed[data-page="index"] .mobile-home-welcome p {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: var(--home-muted) !important;
  }
  body.developed[data-page="index"] .mobile-home-welcome h1 {
    font-size: 30px;
    line-height: 1.3;
    font-weight: 750;
    letter-spacing: -0.045em;
    color: var(--home-deep) !important;
  }
  body.developed[data-page="index"] .mobile-home-welcome > img {
    display: none;
  }
  body.developed[data-page="index"] .mobile-home-scene {
    margin: 0;
    overflow: hidden;
    border-radius: 14px;
  }
  body.developed[data-page="index"] .mobile-home-scene img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: cover;
    object-position: 50% 30%;
  }
  body.developed[data-page="index"] .mobile-home .mobile-photo-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    min-height: 76px;
    border-radius: 18px;
    background: var(--home-brand) !important;
    color: var(--white) !important;
  }
  body.developed[data-page="index"] .mobile-photo-entry > svg {
    flex: none;
    width: 32px;
    height: 32px;
  }
  body.developed[data-page="index"] .mobile-photo-entry > span:nth-child(2) {
    display: grid;
    gap: 6px;
  }
  body.developed[data-page="index"] .mobile-photo-entry small {
    font-size: 12px;
  }
  body.developed[data-page="index"] .mobile-photo-entry b {
    font-size: 18px;
    line-height: 1.4;
  }
  body.developed[data-page="index"] .mobile-photo-entry span span {
    font-size: 12px;
    line-height: 1.6;
  }
  body.developed[data-page="index"] .mobile-photo-entry > span:last-child {
    margin-left: auto;
    flex: none;
    font-size: 20px;
  }
  body.developed[data-page="index"] .mobile-home .mobile-visit-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    min-height: 52px;
    padding: 10px 16px;
    margin-top: 8px;
    border: 1px solid var(--home-line);
    border-radius: 14px;
    font-size: 13px;
  }
  body.developed[data-page="index"] .mobile-visit-entry b {
    color: var(--home-deep) !important;
  }
  body.developed[data-page="index"] .mobile-home-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }
  body.developed[data-page="index"] .mobile-home-shortcuts a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 64px;
    font-size: 12px;
  }
  body.developed[data-page="index"] .mobile-home-shortcuts svg {
    width: 24px;
    height: 24px;
    stroke: var(--home-deep);
    stroke-width: 1.5;
  }
  body.developed[data-page="index"] #cases {
    border: 0;
    margin: 12px auto 0;
    padding: 0 20px 20px;
    max-width: 560px;
  }
  body.developed[data-page="index"] #cases > .chapter-heading {
    padding: 16px 0 12px;
    background: transparent !important;
    border: 0 !important;
  }
  body.developed[data-page="index"] .comfort-title-row {
    display: block;
    width: auto !important;
  }
  body.developed[data-page="index"] .comfort-title-row h2 {
    font-size: 22px;
    line-height: 1.4;
  }
  body.developed[data-page="index"] .comfort-title-row h2 br {
    display: none;
  }
  body.developed[data-page="index"] .comfort-service-description {
    display: none;
  }
  body.developed[data-page="index"] .home-space-links {
    display: none;
  }
  body.developed[data-page="index"] #cases > .chapter-content {
    padding: 0;
  }
  body.developed[data-page="index"] .service-carousel-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    overflow: visible;
    padding: 0;
  }
  body.developed[data-page="index"] .service-space-card {
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
  }
  body.developed[data-page="index"] .service-space-card[aria-hidden="true"] {
    display: none;
  }
  /* A small discovery shelf, not the entire desktop catalogue before the next task.
     The existing 'all services' destination below exposes every remaining space. */
  body.developed[data-homepage]
    .service-space-card:not([href*="room=whole-home"]):not(
      [href*="room=kitchen"]
    ):not([href*="room=bath"]):not([href*="room=bedroom"]) {
    display: none;
  }
  body.developed[data-page="index"] .service-space-card figure {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    overflow: hidden;
    border-radius: 14px;
  }
  body.developed[data-page="index"] .service-space-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  body.developed[data-page="index"] .service-space-card h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    min-height: 28px;
    font-size: 15px !important;
    text-align: left;
  }
  body.developed[data-homepage] .service-space-card h3::after {
    content: "›";
    font-size: 20px;
  }
  body.developed[data-homepage] .service-space-card > div {
    padding: 10px 2px 0;
  }
  body.developed[data-page="index"] .service-carousel-controls {
    display: none;
  }
  body.developed[data-page="index"] .service-actions {
    display: block;
    margin-top: 12px;
    padding-top: 8px;
  }
  body.developed[data-page="index"] .service-actions p {
    display: none;
  }
  body.developed[data-page="index"] .service-actions > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  body.developed[data-page="index"] .service-actions a {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 14px;
  }
  body.developed[data-page="index"] .home-guide-hub {
    margin-block: 8px 20px;
  }
  body.developed[data-page="index"] .home-price-intro-visual img {
    display: none;
  }
  body.developed[data-page="index"] .home-price-summary {
    padding: 20px;
  }
  body.developed[data-page="index"] .home-price-summary h2 {
    font-size: 26px;
  }
  body.developed[data-page="index"] .home-price-summary header p {
    font-size: 14px;
  }
  body.developed[data-page="index"] .home-price-principles {
    margin-top: 16px;
  }
  body.developed[data-page="index"] .home-price-principles article {
    padding: 12px 0;
  }
  body.developed[data-page="index"] #team .manager-preview {
    gap: 16px;
  }
  body.developed[data-homepage] #team.chapter { margin-block: 20px; padding-block: 20px; }
  body.developed[data-page="index"] .mobile-home-tabs {
    position: fixed;
    z-index: 60;
    bottom: 0;
    inset-inline: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 8px max(12px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid var(--home-line);
    background: var(--white);
    color: var(--home-muted);
  }
  body.developed[data-page="index"] .mobile-home-tabs a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 52px;
    font-size: 11px;
  }
  body.developed[data-page="index"] .mobile-home-tabs svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.5;
  }
  body.developed[data-page="index"] .mobile-home-tabs a[aria-current] {
    color: var(--home-brand);
    font-weight: 750;
  }
  body.developed[data-page="index"] .mobile-home a,
  body.developed[data-page="index"] .mobile-home-tabs a {
    touch-action: manipulation;
    transition: opacity 0.15s;
  }
  body.developed[data-page="index"] .mobile-home a:active,
  body.developed[data-page="index"] .mobile-home-tabs a:active {
    opacity: 0.75;
  }
}
@media (max-width: 360px) {
  body.developed[data-page="index"] .mobile-home-welcome {
    grid-template-columns: minmax(0, 1fr);
  }
  body.developed[data-page="index"] .mobile-home-welcome h1 {
    font-size: 27px;
  }
  body.developed[data-page="index"] .mobile-photo-entry > svg {
    width: 24px;
    height: 24px;
  }
  body.developed[data-page="index"] .mobile-home .mobile-photo-entry {
    gap: 10px;
    padding-inline: 14px;
  }
  body.developed[data-page="index"] .mobile-photo-entry b {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.developed[data-page="index"] .mobile-home a,
  body.developed[data-page="index"] .mobile-home-tabs a {
    transition: none;
  }
}

/* Mobile home is a starting point, not the complete desktop sales page.
   Keep source content/CMS bindings for desktop; mobile uses destination pages. */
@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
  body.developed[data-homepage][data-home-focused] :is(
    .home-guide-hub,
    #team,
    .website-reviews,
    .mobile-home-shortcuts,
    .service-actions,
    #contact
  ) {
    display: none !important;
  }
}
