/* DN REAL ESTATE DEV — 首頁
   1:1 對齊 Figma Frame 1（1920 × 3140）。所有尺寸／色值皆由 Figma API 取得，非目測。
   縮放策略：以 1920 為基準，用 --k 係數（1vw = 1920/100 px）等比換算，
   小於 1440 起改用 RWD 斷點重排，不做整頁 transform 縮放（會糊字）。
*/

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--f-latin);
  color: var(--c-ink);
  background: var(--c-white);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* 1920 基準下的等比單位：1920px 寬時 100u = 100px */
:root { --u: min(1px, 0.0520833vw); }
@media (min-width: 1920px) { :root { --u: 1px; } }

/* 共用按鈕：180×60、#7b7473、r4、白字 16/36 置中 */
.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 60px;
  background: var(--c-taupe);
  color: var(--c-white);
  border-radius: var(--r-sm);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: 36px;
  transition: background .25s ease;
}
.btn-more:hover { background: var(--c-taupe-dark); }

/* ========================= HERO ========================= */
.hero {
  position: relative;
  height: 1080px;
  background: #000 center/cover no-repeat;   /* 設計稿 banner 為純黑佔位，客戶主視覺就位後換這裡 */
  color: var(--c-white);
}
/* 設計稿在照片上疊 40% 黑遮罩，保留此層，換上實拍照後對比才夠 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-overlay-40);
  pointer-events: none;
}
.hero > * { position: relative; }

/* ---- Header（白底，疊在 hero 最上方）---- */
.site-header {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 130px 0 120px;
  background: var(--c-white);
}
.logo img { width: 182px; height: 56px; }

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 401px;              /* 設計稿 logo 右緣 → 選單起點 */
  font-size: var(--fs-16);
  color: var(--c-taupe-dark);
  line-height: var(--lh-tight);
}
.nav a { transition: color .2s ease; }
.nav a:hover { color: var(--c-ink-950); }
.nav-sep { width: 1px; height: 20px; background: var(--c-line); }

.lang {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.lang-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.lang-btn img { width: 32px; height: 32px; }
/* 當前語言：42px 圓框 #7b7473 2px（同設計稿 Ellipse 1）*/
.lang-btn.is-active { box-shadow: inset 0 0 0 2px var(--c-taupe); }

.nav-toggle { display: none; }

/* ---- Hero 文案 ---- */
.hero-copy { padding-top: 146px; text-align: center; }
.hero-title {
  width: 909px;
  max-width: 100%;
  margin: 0 auto;
  font-size: var(--fs-46);
  font-weight: var(--fw-bold);
  line-height: 55px;
  text-transform: uppercase;
}
.hero-sub {
  width: 720px;
  max-width: 100%;
  margin: 24px auto 0;
  font-size: var(--fs-24);
  font-weight: var(--fw-regular);
  line-height: 43px;
}
:lang(th) .hero-title { line-height: var(--lh-thai-tight); text-transform: none; }
:lang(th) .hero-sub { line-height: var(--lh-thai-body); }

/* ---- 數據帶（貼 hero 底部）---- */
.stats {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  width: min(1680px, 100% - 48px);
  height: 260px;
}
.stat {
  flex: 1;
  padding-top: 40px;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--c-gray-200); }
.stat-value {
  font-size: var(--fs-112);
  font-weight: var(--fw-bold);
  line-height: 134px;
}
.stat-label {
  margin-top: 17px;
  font-size: var(--fs-24);
  font-weight: var(--fw-regular);
  line-height: 29px;
}
:lang(th) .stat-value { line-height: var(--lh-thai-tight); }

/* ========================= 品牌理念 ========================= */
.brand {
  display: flex;
  align-items: flex-start;
  width: min(1560px, 100% - 48px);
  height: 600px;
  margin: 0 auto;
}
.brand-mark { flex: 0 0 50%; padding: 88px 0 0 clamp(0px, 7.6vw, 119px); }
.brand-mark img { width: min(541px, 100%); height: auto; }

.brand-copy { flex: 0 0 50%; padding: 133px 0 0 20px; }
.brand-title {
  margin: 0;
  font-size: var(--fs-40);
  font-weight: var(--fw-bold);
  line-height: 48px;
  color: var(--c-taupe-dark);
}
.brand-body {
  width: min(730px, 100%);
  margin: 26px 0 0;
  font-size: var(--fs-20);
  font-weight: var(--fw-regular);
  line-height: 26px;
  text-align: justify;
  color: var(--c-taupe);
}
.brand-copy .btn-more { margin-top: 34px; }
:lang(th) .brand-title { line-height: var(--lh-thai-tight); }
:lang(th) .brand-body { line-height: var(--lh-thai-body); text-align: left; }

/* ========================= 作品集輪播 ========================= */
/* 版面：180 預覽 | 780 主圖 | 780 資訊 | 180 預覽 = 1920 */
.projects {
  display: flex;
  height: 600px;
}
.peek {
  position: relative;
  flex: 0 0 9.375%;      /* 180/1920 */
  overflow: hidden;
}
.peek-img { width: 100%; height: 100%; object-fit: cover; }
.peek-mask { position: absolute; inset: 0; background: rgba(53, 45, 43, .8); }
.peek-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 70px;          /* SVG 原始比例 22:70，用高度控制才不會被寬度撐爆 */
  width: auto;
  transform: translate(-50%, -50%);
}
.peek-prev .peek-arrow { transform: translate(-50%, -50%) scaleX(-1); }
.peek-text {
  position: absolute;
  left: 50%;
  top: calc(50% + 65px);
  transform: translateX(-50%);
  font-size: var(--fs-16);
  line-height: 36px;
  text-transform: uppercase;
  color: var(--c-white);
  white-space: nowrap;
}
.peek:hover .peek-mask { background: rgba(53, 45, 43, .65); }

.project-photo { flex: 0 0 40.625%; overflow: hidden; }   /* 780/1920 */
.project-photo img { width: 100%; height: 100%; object-fit: cover; }

.project-info { flex: 0 0 40.625%; padding: 80px 0 0 30px; }
.project-name {
  margin: 0;
  font-size: var(--fs-40);
  font-weight: var(--fw-bold);
  line-height: 48px;
  color: var(--c-taupe-dark);
}
.project-spec {
  width: min(726px, 100%);
  margin: 40px 0 0;
  font-size: var(--fs-24);
  line-height: 50px;
  color: var(--c-taupe);
}
.project-spec > div { display: flex; gap: 0; }
.project-spec dt::after { content: "："; }
.project-spec dd { margin: 0; }
.project-info .btn-more { margin-top: 40px; }
:lang(th) .project-spec { line-height: 56px; }

.dots { display: flex; gap: 10px; margin-top: 62px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-taupe-light); }
.dot.is-active { background: var(--c-taupe-dark); }

/* ========================= 最新消息 ========================= */
.news { display: flex; height: 600px; }
.news-copy {
  flex: 0 0 50%;
  padding: 45px 0 0 clamp(24px, 9.9vw, 190px);
  background: var(--c-bg-soft);
}
.news-title {
  margin: 0;
  font-size: var(--fs-40);
  font-weight: var(--fw-bold);
  line-height: 48px;
  color: var(--c-taupe-dark);
  text-transform: uppercase;
}
:lang(th) .news-title { text-transform: none; line-height: var(--lh-thai-tight); }

.news-list { width: min(710px, 100%); margin: 25px 0 0; padding: 0; list-style: none; }
.news-item {
  position: relative;
  display: block;
  height: 96px;
  padding: 0 40px 0 25px;
}
.news-item::before {                     /* 左側 5×54 深褐色塊 */
  content: "";
  position: absolute;
  left: 0;
  top: 21px;
  width: 5px;
  height: 54px;
  background: var(--c-taupe-dark);
}
.news-date {
  font-size: var(--fs-24);
  font-weight: var(--fw-medium);
  line-height: 29px;
  color: var(--c-taupe);
}
.news-headline {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
  line-height: 29px;
  color: var(--c-taupe-dark);
}
.news-item .chev {
  position: absolute;
  right: 0;
  top: 50%;
  height: 52px;          /* 同上，靠高度控制比例 */
  width: auto;
  margin-top: -26px;
  opacity: .85;
  transition: transform .2s ease;
}
.news-item:hover .chev { transform: translateX(6px); }
:lang(th) .news-headline { line-height: var(--lh-thai-tight); }

.news-copy .btn-more { margin-top: 32px; }
.news-photo { flex: 0 0 50%; overflow: hidden; }
.news-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ========================= Footer ========================= */
.site-footer { background: var(--c-ink-900); color: var(--c-taupe); }
.footer-inner {
  display: flex;
  width: min(1560px, 100% - 48px);
  height: 210px;
  margin: 0 auto;
  padding-top: 44px;
}
.footer-col { flex: 0 0 33.333%; }
.footer-brand img { width: 395px; height: auto; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: var(--fs-16);
  line-height: var(--lh-tight);
}
.footer-nav a:hover { color: var(--c-white); }
.footer-contact { font-size: var(--fs-16); line-height: 32px; }
.footer-contact p { margin: 0; max-width: 430px; }

.footer-bar {
  display: flex;
  align-items: center;
  height: 50px;
  padding-left: 120px;
  background: var(--c-ink-950);
  font-size: var(--fs-16);
  line-height: 32px;
  color: var(--c-taupe);
}

/* ========================= RWD ========================= */
/* 1440 以下：收邊距，圖文比例維持 */
@media (max-width: 1439px) {
  .site-header { padding: 0 40px; }
  .nav { margin-left: 60px; gap: 18px; }
  .brand { width: 100%; padding: 0 40px; }
  .brand-mark { flex-basis: 45%; padding-left: 0; }
  .brand-copy { flex-basis: 55%; }
  .footer-inner { width: 100%; padding-left: 40px; padding-right: 40px; }
  .footer-bar { padding-left: 40px; }
}

/* 1024 以下：輪播收掉側邊預覽，改上下堆疊 */
@media (max-width: 1024px) {
  .hero { height: auto; padding-bottom: 40px; }
  .hero-copy { padding-top: 80px; }
  .hero-title { font-size: 34px; line-height: 1.25; }
  .hero-sub { font-size: 18px; line-height: 1.8; margin-top: 16px; }
  .stats { position: static; transform: none; width: 100%; height: auto; margin-top: 60px; }
  .stat { padding: 0 12px; }
  .stat-value { font-size: 56px; line-height: 1.2; }
  .stat-label { font-size: 16px; line-height: 1.4; margin-top: 8px; }

  .brand { flex-direction: column; height: auto; padding: 60px 24px; gap: 32px; }
  .brand-mark, .brand-copy { width: 100%; padding: 0; }
  .brand-mark img { width: min(420px, 80%); }
  .brand-title { font-size: 28px; line-height: 1.3; }
  .brand-body { width: 100%; font-size: 16px; line-height: 1.9; }

  .projects { flex-direction: column; height: auto; }
  .peek { display: none; }
  .project-photo { flex: none; height: 320px; }
  .project-info { flex: none; padding: 32px 24px 48px; }
  .project-name { font-size: 28px; line-height: 1.3; }
  .project-spec { width: 100%; font-size: 18px; line-height: 2; }
  .dots { margin-top: 32px; }

  .news { flex-direction: column; height: auto; }
  .news-copy { flex: none; padding: 48px 24px; }
  .news-photo { flex: none; height: 280px; }
  .news-title { font-size: 28px; line-height: 1.3; }
  .news-list { width: 100%; }
  .news-item { height: auto; padding: 16px 32px 16px 20px; }
  .news-item::before { top: 18px; height: calc(100% - 36px); }
  .news-date, .news-headline { font-size: 16px; line-height: 1.6; }

  .footer-inner { flex-direction: column; height: auto; gap: 28px; padding: 40px 24px; }
  .footer-col { flex: none; }
  .footer-brand img { width: 260px; }
  .footer-bar { padding-left: 24px; font-size: 14px; }
}

/* 768 以下：對齊 iPhone 13 & 14 設計稿（390 寬，內容欄 358）*/
@media (max-width: 768px) {
  /* Hero 稿高 700，標題 32/800 兩行、副標 16/400，數據仍並排但字級縮到 32 */
  .hero { height: 700px; padding-bottom: 0; }
  .hero-copy { padding-top: 150px; }
  .hero-title { width: 358px; font-size: 32px; line-height: 38px; }
  .hero-sub { width: 358px; font-size: 16px; line-height: 29px; margin-top: 14px; }
  .stats {
    position: absolute;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);   /* 覆寫 1024 斷點的 transform:none */
    width: 358px;
    height: auto;
  }
  .stat { padding-top: 0; }
  .stat + .stat { border-left-width: 2px; }
  .stat-value { font-size: 32px; line-height: 38px; }
  .stat-label { font-size: 12px; line-height: 14px; margin-top: 12px; }

  .site-header { padding: 0 20px; }
  .logo img { width: 140px; height: auto; }
  .nav {
    position: absolute;
    left: 0;
    top: 80px;
    z-index: 20;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    background: var(--c-white);
    transition: max-height .3s ease;
  }
  .nav.is-open { max-height: 360px; padding: 8px 20px 16px; }
  .nav a { padding: 12px 0; width: 100%; }
  .nav-sep { width: 100%; height: 1px; }
  .lang { gap: 12px; }
  .nav-toggle {
    display: grid;
    gap: 5px;
    width: 32px;
    margin-left: 16px;
  }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-taupe-dark); }
}
