/* 天母映象｜平板與電腦版
   業主的設計稿只有 1080 寬的手機稿。Hanson 2026-11-24：「有些會給有些不會給所以可以需要自行去做然後要照它的視覺一模一樣」。
   所以電腦版是自己排的：字體、顏色、照片、標準字、文案、字級比例全部沿用手機稿，只重新安排每一塊放在哪裡。
   手機（540px 以下）完全不受這個檔影響。

   做法：電腦版的畫板是 2160 寬（＝兩塊 1080 的手機畫板並排），--u ＝ 版面寬 ÷ 2160。
   每一塊文字與照片仍然用 layout.css 量到的手機稿座標，再加上「往右移多少（--dx）、往下移多少（--dy）」。
   單位用 cqw（版面本身的寬）而不是 vw：電腦的捲軸會佔寬度，用 vw 右邊會被切掉一條。 */

/* ── 平板（541–1023px）：手機稿放大到整個畫面寬，不留兩側 ── */
@media (min-width: 541px) and (max-width: 1023.98px) {
  :root { --u: calc(100vw / 1080); }
  .page { width: 100%; box-shadow: none; container-type: inline-size; }
  @supports (width: 1cqw) { :root { --u: calc(100cqw / 1080); } }
}

/* ── 電腦（1024px 以上） ── */
@media (min-width: 1024px) {
  :root { --u: calc(min(100vw, 1920px) / 2160); }
  .page { width: min(100%, 1920px); container-type: inline-size; }
  @supports (width: 1cqw) { :root { --u: calc(100cqw / 2160); } }

  /* 手機稿座標＋位移 */
  .tx, .vx, .row__desc, .box, .img {
    left: calc((var(--x) + var(--dx, 0)) * var(--u));
    top: calc((var(--y) - var(--y0) + var(--dy, 0)) * var(--u));
  }

  /* 一、首屏：左半是照片（標語照手機稿壓在草地上），右半深綠底放標準字與兩行說明 */
  .hero { --h: 1140; background: linear-gradient(30deg, #00180c 37%, #004836 98%); }
  .hero::after { content: none; }
  .hero .bg { right: 50%; }
  .hero .bg img { object-position: 50% 25%; }
  .hero__l1, .hero__l2 { --dy: -120; }
  .hero__logo { left: calc(1305 * var(--u)); top: calc(400 * var(--u)); }
  .hero__tag-n, .hero__tag, .hero__sub, .hero__frame, .hero__size, .hero__size-u { --dx: 1080; --dy: -1023; }

  /* 二、空拍全景：整張全景攤開（電腦夠寬，不用左右滑），下緣淡進深綠，標題與內文壓在深綠上 */
  .pano {
    --h: 1880;
    background: #0c3129 url("../img/pano-bg.jpg") center top / 100% calc(1545.6 * var(--u)) no-repeat;
  }
  .pano__en { --dx: 540; --dy: -76; }
  .pano__strip { top: calc(330 * var(--u)); height: calc(1333.5 * var(--u)); overflow: hidden; }
  .pano__strip img { width: 100%; height: 100%; }
  /* 圖上烘著的「H-SCROLL」提示在電腦版沒有意義（不用滑），連同下緣一起蓋進深綠 */
  .pano::after {
    content: "";
    position: absolute;
    inset: calc(1343 * var(--u)) 0 0;
    background: linear-gradient(30deg, #00180c 37%, #004836 98%);
    -webkit-mask-image: linear-gradient(#0000, #000 22%);
    mask-image: linear-gradient(#0000, #000 22%);
  }
  .pano__h1, .pano__h2, .pano__sub, .pano__p1, .pano__p2, .pano__p3, .pano__p4 { --dx: 540; --dy: 36; }

  /* 三、林蔭道（左半，照手機稿）＋四、生活機能（第 1、2 列在右半；第 3、4 列在下面一左一右） */
  .avenue { width: 50%; }
  .life {
    --h: 2213;
    margin-top: calc(-1513 * var(--u));
    background:
      linear-gradient(#fefefe, #fcfbf9 40%, #faf1e6 75%, #f1ede2) right top / 50% calc(1513 * var(--u)) no-repeat,
      linear-gradient(#f1ede2, #faf1e6 15%, #fcfbf9 35%, #fefefe) left bottom / 100% calc(700 * var(--u)) no-repeat;
  }
  .row { --dx: 0; --dy: 0; left: calc(var(--rx, 0) * var(--u)); width: calc(1080 * var(--u)); }
  .row--1 { --top: 231; --rx: 1080; }
  .row--2 { --top: 811; --rx: 1080; }
  .row--3 { --top: 1628; }
  .row--4 { --top: 1628; --rx: 1080; }

  /* 五、自然環境：右半母子照（下緣淡進深綠），左半英文標與內文、兩列輪播 */
  .nature { --h: 1540; background: linear-gradient(#0e312a 60%, #03221c 90%); }
  .nature .bg { left: 50%; overflow: hidden; }
  /* 照片下緣接回這一區的深綠底，不留一條邊 */
  .nature .bg::after { content: ""; position: absolute; inset: 68% 0 0; background: linear-gradient(#03221c00, #03221c 72%); }
  /* 照片放大四分之一、靠右對齊：母子留在畫面裡，裁掉的是左邊失焦的樹葉；這樣照片的高度才撐得滿這一區 */
  .nature .bg img { width: 125%; max-width: none; margin-left: -25%; }
  .nature__v { --dx: 1080; }
  .nature__en, .nature__p1, .nature__p2 { --dy: -1083; }
  .row--5 { --top: 420; }
  .row--6 { --top: 1000; }

  /* 六、建設團隊：左半主圖；右半業績圖＋董事長；下面兩位並排置中 */
  .team { --h: 2350; }
  .team__works { --dx: 1080; --dy: -1350; }
  .team__c-en, .team__c-photo, .team__c-co, .team__c-name, .team__c-p1, .team__c-p2 { --dx: 1080; --dy: -1408; }
  .team__s-photo, .team__s-en, .team__s-co, .team__s-name, .team__s-p1, .team__s-p2,
  .team__a-photo, .team__a-en, .team__a-co, .team__a-name, .team__a-p1, .team__a-p2 { --dx: 540; --dy: -1459; }

  /* 七、建築：右半外觀圖（標題照手機稿壓在圖上），左半白底放英文標、內文、兩個標章 */
  .build { --h: 1419; }
  .build .bg { left: 50%; }
  .build__h1, .build__h2, .build__tag, .build__frame { --dx: 1080; }
  .build__en, .build__p1, .build__p2, .build__p3, .build__mark1, .build__mark2 { --dy: -935; }

  /* 八、室內：左半照片輪播，右半標題與內文；九、棟距：反過來 */
  .carousel--l { width: calc(1080 * var(--u)); }
  .interior { --h: 726; background: #fbfbfc; } /* 比手機稿的 #f8f8fa 再亮一點：綠字壓在上面對比才到 4.5 */
  .interior__car { top: 0; }
  .interior__h { --dx: 1080; --dy: 53; }
  .interior__sub { --dx: 1080; --dy: -732; }
  .interior__p1, .interior__p2, .interior__p3, .interior__p4 { --dx: 1080; --dy: -733; }
  .view { --h: 726; background: linear-gradient(167deg, #fff 42%, #f3f4f3 70%, #edefec 86%, #eaece9); }
  .view__car { top: 0; left: calc(1080 * var(--u)); }
  .view__h { --dy: 162; }
  .view__p { --dy: -655; }

  /* 十、預約：左半標準字、電話、地圖（照手機稿）；右半表單；基本資料在下面排成兩欄 */
  .reserve { display: grid; grid-template-columns: 1fr 1fr; }
  .reserve__body { display: contents; }
  .reserve__top { grid-area: 1 / 1; }
  .reserve__form { grid-area: 1 / 2; padding: calc(171 * var(--u)) calc(105.8 * var(--u)) calc(60 * var(--u)); }
  .reserve__info { grid-area: 2 / 1 / 3 / 3; padding: 0 calc(105.8 * var(--u)) calc(70 * var(--u)); }
  .info__title { margin-top: calc(60 * var(--u)); }
  .info { columns: 2; column-gap: calc(100 * var(--u)); }
  .info__row { break-inside: avoid; }
}
