/* VeredaoSol V3 — mobile-native layer added without changing the desktop art direction. */

img {
  height: auto;
}

.question-media > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.ds-figure > picture {
  display: block;
}

.mobile-segments,
.mobile-only,
.mobile-inside-option {
  display: none;
}

html:not(.js) .ds-nav-toggle,
html:not(.js) .menu-button,
html:not(.js) .hero-control-stack {
  display: none !important;
}

html:not(.js) .ds-nav {
  position: static;
  display: flex;
  overflow-x: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

@media (max-width: 820px), (hover: none), (pointer: coarse) {
  .lens-ring {
    display: none !important;
  }

  .tone-option,
  .view-option,
  .ds-nav-toggle,
  .ds-button {
    min-width: 48px;
    min-height: 48px;
  }

  .ds-link,
  .ds-link-light,
  .source-list a {
    min-height: 44px;
    align-items: center;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .moment-image {
    --mobile-pan-x: 0px;
    --mobile-pan-y: 0px;
    --mobile-scale: 1;
    width: 100%;
    min-height: 100svh;
    height: 100svh;
    background: #101c17;
    touch-action: pan-y;
  }

  .moment-image::after {
    z-index: 3;
    background:
      linear-gradient(180deg, rgba(8, 20, 15, 0.22) 0%, transparent 24%),
      linear-gradient(180deg, transparent 48%, rgba(8, 20, 15, 0.16) 62%, rgba(8, 20, 15, 0.82) 100%);
    pointer-events: none;
  }

  .moment-image picture {
    height: 100svh;
    background: #101c17;
    transform: translate3d(var(--mobile-pan-x), var(--mobile-pan-y), 0) scale(var(--mobile-scale));
    transform-origin: 50% 43%;
    transition: opacity 260ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: auto;
  }

  .moment-image picture img {
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    object-position: top center;
    animation-duration: 1100ms;
  }

  .moment-image .finished-layer,
  .moment-image .timber-layer,
  .moment-image .xray-layer,
  .moment-image .interior-layer {
    overflow: hidden;
    clip-path: none;
    transition: opacity 260ms ease;
    will-change: auto;
  }

  .moment-image .finished-layer,
  .moment-image .xray-layer,
  .moment-image .interior-layer {
    opacity: 0;
  }

  .moment-image[data-view="timber"] .finished-layer,
  .moment-image[data-view="render"] .timber-layer {
    opacity: 0 !important;
  }

  .moment-image[data-view="timber"] .timber-layer.tone-light,
  .moment-image[data-view="structure"] .timber-layer.tone-light,
  .moment-image[data-view="inside"] .timber-layer.tone-light {
    opacity: 1;
  }

  .moment-image[data-view="structure"] .xray-layer {
    opacity: 1;
    clip-path: none;
  }

  .moment-image[data-view="inside"] .interior-layer {
    opacity: 1;
    clip-path: none;
  }

  .moment-image.mobile-zoom-active {
    touch-action: none;
  }

  .moment-image.mobile-zoom-active picture {
    cursor: grab;
    will-change: transform;
  }

  .moment-image.mobile-pan-active picture {
    cursor: grabbing;
    transition: opacity 260ms ease, transform 0ms;
  }

  .image-note {
    display: flex !important;
  }

  .view-note {
    display: block;
  }

  .lens-launcher {
    display: grid !important;
  }

  .lens-ring {
    display: none !important;
  }

  .view-switcher {
    gap: 1px;
  }

  .view-option {
    min-width: 0;
    padding-inline: 5px;
    font-size: clamp(0.5rem, 2.15vw, 0.59rem);
    letter-spacing: 0.045em;
  }

  .mobile-inside-option {
    display: block;
  }
}

@media (max-width: 760px) {
  :root {
    --mobile-gutter: 18px;
  }

  body {
    overflow-x: hidden;
  }

  .ds-shell {
    width: calc(100% - 36px);
  }

  .question-moment,
  .question-moment:nth-child(even),
  .homes-gateway,
  .home-listing,
  .model-hero,
  .system-panel,
  .system-panel:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
  }

  .question-moment > *,
  .homes-gateway > *,
  .home-listing > *,
  .model-hero > *,
  .system-panel > * {
    min-width: 0;
  }

  .ds-display,
  .ds-title,
  .decision-end h2,
  .source-list strong {
    overflow-wrap: anywhere;
  }

  .journey-reality {
    min-height: 100svh;
    padding: 34px 16px;
  }

  .journey-reality h1 {
    margin-bottom: 24px;
    font-size: clamp(2.35rem, 11.5vw, 3.35rem);
    line-height: 0.98;
  }

  .price-truth-card {
    gap: 14px;
    padding: 22px;
    box-shadow: none;
  }

  .price-truth-card h2 {
    font-size: 2rem;
  }

  .price-truth-card .price-state {
    max-width: none;
    padding: 10px 12px;
  }

  .price-truth-card .price-main {
    padding-top: 18px;
  }

  .price-truth-card .price-main strong {
    font-size: 1.7rem;
  }

  .price-truth-card .price-links {
    display: grid;
    gap: 0;
  }

  .price-truth-card .price-links a {
    display: flex;
    min-height: 44px;
    align-items: center;
  }

  .journey-land-copy {
    padding: 76px 18px 52px;
  }

  .journey-land-copy h2 {
    font-size: clamp(3.7rem, 18vw, 5.8rem);
  }

  .mobile-segments {
    display: grid;
    grid-template-columns: repeat(var(--segment-count, 2), minmax(0, 1fr));
    gap: 4px;
    width: calc(100% - 36px);
    margin: 0 auto 16px;
    padding: 4px;
    border: 1px solid var(--ds-line);
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.12);
  }

  .mobile-segments button {
    min-width: 0;
    min-height: 48px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    color: inherit;
    background: transparent;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .mobile-segments button[aria-selected="true"] {
    color: var(--ds-forest-deep);
    background: var(--ds-white);
  }

  .mobile-switcher.is-enhanced [data-mobile-panel] {
    display: none;
  }

  .mobile-switcher.is-enhanced [data-mobile-panel].is-active {
    display: block;
  }

  .journey-land .mobile-segments {
    color: var(--ds-white);
    border-color: var(--ds-line-light);
  }

  .journey-land .land-compare {
    display: block;
  }

  .land-frame,
  .scenario img {
    min-height: 0;
  }

  .land-frame {
    height: auto;
    max-height: none;
    aspect-ratio: 9 / 16;
    background: var(--ds-forest-deep);
  }

  .land-frame picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  .land-frame img {
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .land-compare-note {
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .question-intro {
    min-height: 70svh;
    padding: 80px 18px;
  }

  .question-intro h2 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .question-moment,
  .question-moment:nth-child(even) {
    position: relative;
    display: block;
    min-height: 100svh;
    overflow: hidden;
  }

  .question-moment:nth-child(even) .question-media {
    order: initial;
  }

  .question-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .question-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .question-media::after {
    background: linear-gradient(180deg, rgba(8, 21, 16, 0.05) 18%, rgba(8, 21, 16, 0.28) 48%, rgba(8, 21, 16, 0.96) 100%);
  }

  .question-media .visual-note {
    display: none;
  }

  .question-copy {
    position: relative;
    z-index: 2;
    justify-content: flex-end;
    min-height: 100svh;
    padding: 76px 18px max(24px, env(safe-area-inset-bottom));
    color: var(--ds-white);
    background: transparent !important;
  }

  .question-copy .question-index {
    margin: 0 0 14px;
    color: rgba(255, 253, 248, 0.8);
  }

  .question-copy h2 {
    margin: 0 0 12px;
    color: var(--ds-white);
    font-size: clamp(2.55rem, 12vw, 3.65rem);
  }

  .question-copy p,
  .question-fire .question-copy p,
  .question-comfort .question-copy p,
  .question-build .question-copy p {
    color: rgba(255, 253, 248, 0.86) !important;
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .question-copy .ds-link {
    min-height: 44px;
    margin-top: 14px;
    color: var(--ds-white);
  }

  .question-copy .question-boundary {
    margin-top: 16px;
    padding-top: 12px;
    color: rgba(255, 253, 248, 0.58) !important;
    font-size: 0.64rem;
  }

  .homes-gateway {
    position: relative;
    display: block;
    min-height: 100svh;
    overflow: hidden;
  }

  .homes-gateway-media {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .homes-gateway-media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(16, 43, 36, 0.95) 100%);
    content: "";
  }

  .homes-gateway-copy {
    position: relative;
    z-index: 1;
    justify-content: flex-end;
    min-height: 100svh;
    padding: 76px 18px max(28px, env(safe-area-inset-bottom));
  }

  .homes-gateway-copy h2 {
    font-size: clamp(3.4rem, 16vw, 5.2rem);
  }

  .decision-end {
    padding: 86px 0 42px;
  }

  .decision-end h2 {
    margin-bottom: 44px;
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .decision-action {
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 10px;
    min-height: 88px;
  }

  .decision-action strong {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .ds-hero {
    min-height: auto;
    padding: 82px 0 70px;
  }

  .ds-display {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .ds-title {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

  .ds-lead {
    font-size: 1.05rem;
  }

  .ds-chapter {
    padding: 78px 0;
  }

  .truth-rail {
    grid-template-columns: 1fr;
  }

  .truth-rail > div,
  .truth-rail > div + div,
  .truth-rail > div:nth-child(3),
  .truth-rail > div:nth-child(4) {
    padding: 20px 0;
    border-top: 1px solid var(--ds-line);
    border-left: 0;
  }

  .cost-layer {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 24px 0;
  }

  .cost-layer::before {
    grid-row: 1 / span 2;
  }

  .cost-layer p {
    grid-column: 2;
  }

  .scope-table.is-mobile-cards,
  .scope-table.is-mobile-cards tbody,
  .scope-table.is-mobile-cards tr,
  .scope-table.is-mobile-cards td {
    display: block;
    width: 100%;
  }

  .scope-table.is-mobile-cards thead {
    display: none;
  }

  .scope-table.is-mobile-cards tr {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--ds-line-light);
  }

  .scope-table.is-mobile-cards td {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ds-line-light);
  }

  .scope-table.is-mobile-cards td::before {
    color: var(--ds-sun);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    content: attr(data-label);
    text-transform: uppercase;
  }

  .scenario-grid,
  .systems-stack {
    display: block;
  }

  .scenario + .scenario {
    border-left: 0;
  }

  .scenario img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .scenario-body {
    padding: 22px 18px;
  }

  .site-check {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    padding: 26px 0;
  }

  .site-check p {
    grid-column: 2;
  }

  .system-panel,
  .system-panel:nth-child(even) {
    display: block;
    padding: 48px 0;
  }

  .system-panel:nth-child(even) .system-visual {
    order: initial;
  }

  .system-visual img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .system-copy {
    padding-top: 24px;
  }

  .mechanism {
    min-height: 0;
    padding: 30px 20px;
  }

  .claim {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    padding: 26px 0;
  }

  .claim .claim-limit {
    grid-column: 2;
  }

  .source-list li {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }

  .source-list a {
    grid-column: 2;
  }

  .homes-intro {
    padding: 82px 0 54px;
  }

  .home-listing-image {
    min-height: 52svh;
  }

  .home-listing-copy {
    padding: 44px 18px;
  }

  .model-hero-media {
    order: 1;
    min-height: 52svh;
  }

  .model-hero-copy {
    order: 2;
    min-height: auto;
    padding: 48px 18px;
  }

  .model-moments {
    grid-template-columns: 1fr;
  }

  .model-moment {
    min-height: 0;
    padding: 48px 18px;
  }

  .model-moment:nth-child(even) {
    border-left: 0;
  }

  .conversation-option {
    min-height: 0;
    padding: 28px 22px;
  }

  .field input,
  .field textarea,
  .field select {
    min-height: 48px;
    font-size: 16px;
  }

  .conversation-form .ds-button,
  [data-copy-summary] {
    width: 100%;
    min-height: 52px;
  }

  .ds-footer {
    padding: 64px 18px 26px;
  }
}

@media (max-width: 360px) and (max-height: 640px) and (orientation: portrait) {
  .menu-panel a {
    gap: 12px;
    font-size: 2rem;
  }

  .menu-panel a span:first-child {
    min-width: 0;
  }

  .menu-panel a span:last-child {
    min-width: 0;
    line-height: 1.05;
    text-align: right;
  }

  .view-option {
    min-width: 0;
    padding-inline: 2px;
    font-size: 0.45rem;
    letter-spacing: 0;
  }

  .explore-active .view-switcher {
    display: grid;
    grid-template-columns: 49px 52px 49px 44px;
  }

  .journey-reality {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .moment-image picture {
    transition: none !important;
  }
}
