
.hero {
  width: 100%;
  min-height: max(100vh, 56.25vw);
  min-height: max(100svh, 56.25vw);
  max-height: 140vh;
  position: relative;
  z-index: 0;
  isolation: isolate;
  padding: 60px var(--rail-gutter) 50px 0;
  background:
    radial-gradient(circle at 72% 16%, rgba(255,255,255,0.72), transparent 34%),
    linear-gradient(180deg, #f8f3ea 0%, var(--bg-color) 94%);
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  z-index: -1;
  pointer-events: none;
  background-image: url("../assets/images/homepage-hero.webp");
  background-size: cover;
  background-position: left bottom;
  background-repeat: no-repeat;
  mix-blend-mode: normal;
}

@media (pointer: coarse) {
  .hero {
    width: 100vw;
    width: 100dvw;
    max-width: 100dvw;
    margin-left: calc(50% - 50dvw);
    margin-right: calc(50% - 50dvw);
    padding-right: 0;
  }
}

.hero-copy {
  --hero-line2-chars: 7;
  --hero-line2-pad: 0.5em;
  position: absolute;
  z-index: 2;
  top: 35%;
  left: calc(50% - var(--rail-gutter) / 2 + 25vw);
  transform: translate(-50%, -50%);
  margin: 0;
  box-sizing: border-box;
  display: block;
  width: max-content;
  min-width: calc(var(--hero-line2-chars) * (1em + 0.14em) + var(--hero-line2-pad));
  max-width: calc(100% - var(--rail-gutter) - 1.5rem);
  padding: 0;
  text-align: left;
  font-family: "Noto Serif TC", serif;
  font-size: 48px;
  line-height: 1.85;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--ink-85);
  text-shadow:
    0 0 14px rgba(255, 252, 240, 0.95),
    0 0 28px rgba(255, 246, 220, 0.78);
  background: none;
  border-radius: 0;
  overflow: visible;
}

.hero-copy__line2 {
  display: inline-block;
  white-space: nowrap;
}

.hero-copy::before {
  content: attr(data-storke);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  white-space: pre-line;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: transparent;
  -webkit-text-stroke: 10px #fcf7f0;
  paint-order: stroke fill;
}

.news-card {
  position: absolute;
  left: clamp(24px, 4vw, 54px);
  bottom: clamp(32px, 5vh, 58px);
  z-index: 3;
  width: min(318px, calc(100% - 48px));
  padding: 18px 22px;
  background: rgba(201, 164, 91, 0.38);
  backdrop-filter: blur(5px);
  border-left: 4px solid rgba(184,134,11,.6);
  color: var(--ink-85);
  font-size: 14px;
  line-height: 1.75;
  zoom: var(--font-scale, 1);
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}

a.news-card:hover {
  background: rgba(201, 164, 91, 0.5);
}

.news-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--primary-jade);
}

.intro p {
  font-size: 16px;
  margin: 0 0 18px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 58px;
  align-items: start;
}

.feature-grid {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px 86px;
  align-items: center;
}

.feature h3 {
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: 0.06em;
}

.feature p {
  margin: 0;
  font-size: 15px;
  color: #42504b;
}

.feature-image img {
  height: 100%;
  min-height: 220px;
  width: 100%;
  object-fit: cover;
}

.page main .image-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(28, 74, 60, 0.12);
  background: var(--paper-2);
  border: none;
}

.page main .image-card--organic {
  border-radius: 50% 12px 28px 12px;
}

.page main .image-card--arc {
  border-radius: 30% 10px 30% 10px;
  min-height: 220px;
}

.page main .image-card--flip {
  border-radius: 10px 30% 10px 30%;
}

.page main .image-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
  filter: grayscale(0.08) saturate(0.92);
  transition: transform 0.55s ease, filter 0.35s ease;
}

.page main .intro-grid .image-card {
  min-height: 360px;
}

.page main .intro-grid .image-card img {
  object-position: 58% center;
}

.page main .image-card:hover img {
  transform: scale(1.04);
  filter: grayscale(0) saturate(1);
}

.page main .image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0.85;
}

.wisdom-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  margin-top: 46px;
  text-align: center;
}

.video-card {
  position: relative;
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 3px;
  border-radius: 18px;
  background: linear-gradient(135deg,
    rgba(201, 169, 98, 0.9) 0%,
    rgba(184, 134, 11, 0.45) 28%,
    rgba(28, 74, 60, 0.45) 50%,
    rgba(184, 134, 11, 0.45) 72%,
    rgba(201, 169, 98, 0.9) 100%);
  background-size: 220% 220%;
  animation: videoShimmer 9s ease-in-out infinite;
  box-shadow:
    0 20px 50px rgba(28, 74, 60, 0.18),
    0 6px 18px rgba(184, 134, 11, 0.14);
  transition: transform .55s cubic-bezier(.16, .9, .2, 1), box-shadow .55s ease;
}

.video-card:hover {
  transform: translateY(-5px) scale(1.005);
  box-shadow:
    0 34px 80px rgba(28, 74, 60, 0.26),
    0 14px 32px rgba(184, 134, 11, 0.26),
    0 0 60px rgba(184, 134, 11, 0.18);
}

@keyframes videoShimmer {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .video-card { animation: none; }
}

.video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 15px;
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  background: #000;
  border-radius: 15px;
  position: relative;
  z-index: 1;
}

.video-card video:fullscreen,
.video-card video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.duration {
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: white;
  background: rgba(0,0,0,0.35);
  padding: 0 8px;
  border-radius: 5px;
  font-family: sans-serif;
  font-weight: 700;
}

.resources {
  padding-bottom: 110px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  margin-top: 36px;
}

.resource-item h3,
.resource-item .hub-tile-label {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.resource-item p,
.resource-item .hub-tile-desc {
  margin: 0;
  color: #4e5954;
  font-size: 13px;
  line-height: 1.6;
}

.dots {
  margin: 44px auto 0;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #91c6bd;
}

.dot.active {
  width: 44px;
  border-radius: 999px;
  background: var(--primary-jade);
}

@media (max-width: 860px) {
  .intro-grid, .feature-grid, .resource-grid { grid-template-columns: 1fr; }
  .page main .intro-grid .image-card { min-height: 280px; }
  .page main .image-card--arc { min-height: 240px; }
  .wisdom-icons { grid-template-columns: repeat(2, 1fr); }
  .feature-grid > :nth-child(3) { order: 4; }
  .feature-grid > :nth-child(4) { order: 3; }
}

@media (min-width: 681px) and (max-width: 1024px) and (pointer: coarse) and (orientation: portrait) {
  .hero-art {
    /* background-image: url("../assets/images/homepage-hero-tablet.png"); */
    background-position: center bottom;
  }
  .hero-copy {
    top: 20%;
    left: calc(50% + 24px);
    transform: translate(-50%, -50%);
    font-size: 36px;
    margin: 0;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: 100svh;
    padding-right: 0;
  }
  .hero-art {
    background-image: url("../assets/images/homepage-hero-mobile.webp");
    background-position: center bottom;
  }
  .hero-copy {
    top: calc(var(--mobile-top-chrome, 56px) + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(22px, 5.5vh, 28px);
    letter-spacing: 0.08em;
    line-height: 1.65;
    margin: 0;
    max-width: calc(100% - 5rem);
    min-width: 0;
  }
  .hero-copy::before {
    -webkit-text-stroke: 5px #fdfbf7;
  }
  .news-card {
    left: 16px;
    bottom: 16px;
    width: min(280px, calc(100% - 32px));
    padding: 12px 14px;
    font-size: 12px;
  }
  .news-card strong {
    font-size: 14px;
  }
}

@media (max-width: 680px) and (pointer: coarse) {
  .hero { min-height: 100svh; padding-right: 0; }
  .hero-art {
    background-image: url("../assets/images/homepage-hero-mobile.webp");
    background-position: center bottom;
  }
  .hero-copy {
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    letter-spacing: 0.1em;
    line-height: 1.75;
    text-align: left;
    margin: 0;
    min-width: calc(var(--hero-line2-chars) * (1em + 0.1em) + var(--hero-line2-pad));
    max-width: calc(100% - 2rem);
  }
  .hero-copy::before {
    -webkit-text-stroke: 6px #fdfbf7;
  }
  .news-card {
    left: 16px;
    bottom: 24px;
    width: calc(100% - 32px);
    padding: 14px 16px;
    font-size: 13px;
  }
  .news-card strong {
    font-size: 15px;
  }
}

/* section 的 86px 上下留白會再乘上字級 zoom，手機上等於影片框前後各空一大塊。
   收緊但仍留一點呼吸，不要貼齊相鄰區塊。 */
@media (max-width: 599px) {
  #videos {
    padding: 44px 0 40px;
  }

  #wisdom {
    padding-bottom: 10px;
  }

  #resources {
    padding-top: 12px;
  }

  #videos .home-video-caption {
    margin-top: 12px;
  }
}