/* =========================
   HOME ONLY (style3.css)
   Video hero + fixed top nav
   ========================= */
:root{
  --edge: clamp(22px, 4vw, 72px);  /* 左右安全邊距：你可調 22px */
}

/* ✅ Fix: prevent padding making elements wider than viewport */
*, *::before, *::after { box-sizing: border-box; }


body.home{
  background: #000;
}

/* HERO wrapper */
.hero{
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  color: #fff;
}

/* Background video */
.hero-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Overlay shade */
.hero-shade{
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 30% 35%,
    rgba(0,0,0,0.18),
    rgba(0,0,0,0.82)
  );
}

/* =========================
   FIXED TOP NAV
   ========================= */
.hero-top{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

/* Inner container (fix "too wide" feeling) */
.hero-top-inner{
  width: 100%;
  padding: 16px var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box; /* ✅ double-safe */
}




/* logo */
.hero-logo a{
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 22px;
}

/* nav */
.hero-nav{
  display: flex;
  gap: 22px;
}

.hero-nav a{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.hero-nav a:hover{ opacity: 0.78; }

.hero-nav a[aria-current="page"]{
  text-decoration: underline;
}

/* =========================
   HERO CONTENT
   ========================= */
.hero-content{
  position: relative;
  z-index: 2;

  min-height: 100vh;
  width: 100%;
  margin: 0;

  padding-left: var(--edge);
  padding-right: var(--edge);

  /* ✅ 關鍵：唔好垂直置中，改為靠上 */
  padding-top: 150px;         /* 想再高：130px；想再低：170px */
  padding-bottom: 90px;

  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* ✅ 原本 center 改成 flex-start */
  align-items: flex-start;
  text-align: left;
}




.hero-kicker{
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 500;
  opacity: 0.95;
  max-width: 52ch;
}

.hero-title{
  margin: 0;
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 1px;

  /* 關鍵：用字數寬度控制斷行 */
  max-width: 11ch;   /* 10–12ch 都可以試 */
}

.hero-sub{
  margin: 18px 0 26px;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 75ch;
}

/* CTA buttons */
.hero-ctas{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-btn{
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(79,209,197,0.95);
  color: #022c2a;
  text-decoration: none;
  font-weight: 900;
}

.hero-btn:hover{
  opacity: 0.92;
}

.hero-btn.ghost{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.75);
  color: #fff;
  font-weight: 800;
}

.hero-btn.ghost:hover{
  border-color: #fff;
}

/* Scroll hint */
.hero-scroll{
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 14px;
  opacity: 0.85;
  z-index: 2;
}

/* =========================
   BELOW HERO
   ========================= */
.home-main{
  background: #102a43; /* dark section */
  padding: 110px 0 2.5rem; /* avoid nav overlap */
  border-top: 1px solid rgba(255,255,255,0.08);
}

.home-section{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

.home-section h2{
  margin-top: 0;
}

.home-section p{
  color: rgba(184,199,217,0.95);
}

/* Responsive */
@media (max-width: 768px){
  .hero-top-inner{
    padding: 14px 16px;
  }

  .hero-logo a{
    font-size: 18px;
  }


  .hero-nav a{
    font-size: 14px;
  }

  .hero-content{
    padding: 88px 16px 0;
  }

  .hero-kicker{ font-size: 24px; }
  .hero-sub{ font-size: 16px; }
}


/* ===== Home Featured Projects (1 big + 2 small) ===== */
.featured-work{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
    text-align: center;
}

.featured-work p{
  color: rgba(184,199,217,0.95);
  max-width: 720px;
  margin: 12px auto 48px; /* 上 | 左右自動 | 下 */
}

.featured-grid{
  margin-top: 28px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, 1fr);
}

/* Big card spans 2 columns */
.fcard.big{
  grid-column: 1 / -1;
  min-height: 420px;
}

/* Two small cards */
.fcard.small{
  min-height: 280px;
}

/* Card base */
.fcard{
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;

  background-size: cover;
  background-position: center;

  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);

  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s ease;
}

.fcard:hover{
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}

/* Overlay (keep text readable but not too dark) */
.fcard-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.55) 100%
  );
}

/* Text bottom */
.fcard-text{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.75);
}

.fcard-text h3{
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.2px;
}

.fcard.small .fcard-text h3{
  font-size: 1.25rem;
}

.fcard-text p{
  margin: 6px 0 0;
  font-size: 1rem;
    text-align: center;
  color: rgba(255,255,255,0.9);
}

/* More projects button */
.more-wrap{
  margin-top: 26px;
  display: flex;
  justify-content: center;
}

.more-btn{
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);

  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  transition: transform .15s ease, opacity .2s ease;
}

.more-btn:hover{
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Responsive: stack */
@media (max-width: 900px){
  .featured-grid{
    grid-template-columns: 1fr;
  }
  .fcard.big{
    min-height: 360px;
  }
  .fcard.small{
    min-height: 240px;
  }
}
/* Scroll hint — default = text only, hover = arrow */
.scroll-hint{
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 10;

  border: 0;
  background: transparent;   /* ✅ 永遠唔要盒 */
  padding: 0;                /* ✅ 移除 padding 造成的「bar/box」 */
  margin: 0;

  color: rgba(255,255,255,.9);
  cursor: pointer;

  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  -webkit-tap-highlight-color: transparent;
}

.scroll-hint__label{
  font-size: 14px;
  letter-spacing: .08em;
  opacity: .9;
  transition: opacity .2s ease;
}

/* ✅ 預設：箭咀唔顯示 */
.scroll-hint__icon{
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ✅ Hover/Active：文字消失 -> 出箭咀 */
.scroll-hint:hover .scroll-hint__label,
.scroll-hint.is-active .scroll-hint__label{
  opacity: 0;
}

/* Hover 才建立 icon 尺寸 */
.scroll-hint:hover .scroll-hint__icon,
.scroll-hint.is-active .scroll-hint__icon{
  width: 34px;
  height: 34px;
  overflow: visible;
  display: grid;
  place-items: center;
}

/* 畫箭咀 */
.scroll-hint:hover .scroll-hint__icon::before,
.scroll-hint.is-active .scroll-hint__icon::before{
  content:"";
  width: 12px;
  height: 12px;
  border-right: 3px solid rgba(255,255,255,.9);
  border-bottom: 3px solid rgba(255,255,255,.9);
  transform: rotate(45deg);
  display: block;
}

.scroll-hint:focus-visible{
  outline: 2px solid rgba(255,255,255,.9);
  outline-offset: 6px;
}


/* remove default margins that create “gaps” */
body { margin: 0; }

/* make the whole page consistent dark-blue, not body black */
body.home { background: #102a43; }   /* 跟你 home-main 一樣 */

/* ensure footer has same background */
footer{
  background: #102a43;
  margin: 0;
  padding: 24px var(--edge);
  border-top: 1px solid rgba(255,255,255,0.08);
}

html{
  scroll-behavior: smooth;
}


/* Center text horizontally (only for big featured card) */
.fcard.big .fcard-text{
  text-align: center;
}

.fcard.big .fcard-text p{
  margin-left: auto;
  margin-right: auto;
}


:root{
  --nav-h: 72px; /* 你條nav實際高度，之後可微調 68/70/72/76 */
}

.hero-top{
  height: var(--nav-h);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
}

body.project{
  padding-top: var(--nav-h);
}

.project-hero{
  margin-top: 0;
}


