
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-56px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideOutToLeft {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-56px) scale(0.97);
  }
}

@keyframes popupOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popupOverlayOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.hero-section {
  width: 100%;
  background-color: var(--bg-color);
  padding: 40px 0 90px;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  animation: fadeIn 0.8s ease-out;
}

.hero-copy {
  flex: 1 1 48%;
  max-width: 520px;
}

.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-gold);
  opacity: 0.85;
  margin-bottom: 10px;
}

.hero-title {
  font-family: "Noto Serif TC", serif;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: var(--title-track);
  color: var(--primary-jade);
  padding-top: 60px;
}

.hero-slogan {
  font-size: 18px;
  color: var(--accent-gold);
  margin: 16px 0;
  font-style: italic;
  letter-spacing: 0.08em;
}

.hero-text {
  font-size: 14px;
  color: var(--ink-70);
  line-height: 1.9;
}

.hero-info-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-events-row {
  position: relative;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-event-card {
  flex: 1 1 260px;
  min-width: 240px;
  background: var(--soft-white);
  backdrop-filter: var(--blur);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  color: var(--text-main);
  transition: transform .3s ease, box-shadow .3s ease;
}

.hero-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(0,0,0,0.22);
}

.hero-event-main {
  display: flex;
  gap: 14px;
  align-items: center;
}

.hero-event-date {
  text-align: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--light-jade);
  font-size: 1.3rem;
  color: var(--primary-jade);
}

.hero-event-title {
  font-size: 14px;
  font-weight: 500;
}

.hero-event-tag {
  font-size: 11px;
  color: var(--ink-55);
}

.hero-event-arrow {
  font-size: 1rem;
  color: var(--accent-gold);
}

.after-hero-spacer {
  height: 70px;
}

.mission-section {
  background: var(--soft-white);
  padding: 60px 0 10px;
  position: relative;
}

.mission-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  gap: 40px;
}

.mission-visual {
  position: relative;
  height: 360px;
}

.mission-image {
  width: 100%;
  height: 100%;
  background: url('https://img1.wsimg.com/isteam/ip/efab237e-94e1-40b7-87ea-be9de3d11c0d/69%E9%A6%99%E4%BE%9B%E9%A4%8A.png') center / cover;
  border-radius: 200px 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(28,74,60,0.15);
}

.mission-float-card {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--soft-white);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  max-width: 210px;
  animation: float 4s ease-in-out infinite;
}

.mission-card-title {
  color: var(--accent-gold);
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.mission-card-text {
  color: var(--primary-jade);
  font-size: 22px;
  font-weight: 500;
}

.mission-content {
  padding-left: 10px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.mission-title {
  font-family: "Noto Serif TC", serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--primary-jade);
  margin: 0 0 18px;
  line-height: 1.6;
  letter-spacing: var(--title-track);
}

.mission-text {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-70);
  margin-bottom: 18px;
}

.mission-highlight {
  font-size: 14px;
  color: white;
  background: var(--primary-jade);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 6px;
}

.mission-points {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.mission-point {
  position: relative;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(184,134,11,0.08), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(28,74,60,0.08), transparent 40%);
  border: 1px solid rgba(28,74,60,0.10);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow:
    0 10px 26px rgba(0,0,0,0.06),
    0 1px 0 rgba(255,255,255,0.7) inset;
  backdrop-filter: var(--blur);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.mission-point::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  background: linear-gradient(180deg, rgba(184,134,11,0.15), rgba(184,134,11,0.85), rgba(184,134,11,0.15));
  border-radius: 999px;
}

.mission-point::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle at 30% 30%, rgba(28,74,60,0.14), transparent 60%);
  filter: blur(1px);
  pointer-events: none;
}

.mission-point:hover {
  transform: translateY(-4px);
  border-color: rgba(184,134,11,0.22);
  box-shadow:
    0 18px 44px rgba(28,74,60,0.12),
    0 1px 0 rgba(255,255,255,0.78) inset;
}

.point-number {
  color: var(--primary-jade);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  margin: 2px 0 10px;
  padding-left: 12px;
}

.point-text {
  color: var(--ink-70);
  font-size: 13.5px;
  line-height: 1.85;
  padding-left: 12px;
  font-variant-numeric: tabular-nums;
}

.point-text a {
  color: var(--primary-jade);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.point-text .dot {
  color: var(--accent-gold);
}

.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin: 60px 0;
  align-items: center;
  animation: fadeIn 1.2s ease-out;
}

.story-image img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 18px 18px 0 var(--light-jade);
  transition: all 0.3s ease;
}

.story-image:hover img {
  transform: translate(-4px, -4px);
  box-shadow: 22px 22px 0 var(--light-jade);
}

.story-content h2 {
  font-family: "Noto Serif TC", serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--primary-jade);
  margin: 0 0 18px;
  position: relative;
  padding-left: 18px;
  line-height: 1.6;
  letter-spacing: var(--title-track);
}

.story-content h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 60%;
  background: var(--accent-gold);
  border-radius: 2px;
}

.story-body {
  color: var(--ink-70);
  font-size: 15px;
  line-height: 1.9;
}

.lama-name {
  font-size: 18px;
  color: var(--primary-jade);
  font-weight: 500;
}

.lama-name a {
  color: inherit;
  text-decoration: none;
}

.lama-name a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lama-bio {
  font-size: 14px;
  color: var(--ink-55);
  margin-top: 6px;
}

.lama-meta-bar {
  display: flex;
  background: linear-gradient(135deg, var(--soft-white), var(--warm-cream));
  border-radius: var(--radius-lg);
  padding: 24px 34px;
  margin: 50px 0 40px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.lama-meta-bar::before {
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(184,134,11,0.05), transparent);
  border-radius: 50%;
}

.meta-item {
  flex: 1;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.meta-item + .meta-item {
  border-left: 1px solid var(--rule);
}

.work-section {
  margin: 50px 0 40px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr;
  gap: 40px;
  align-items: flex-start;
}

.work-grid--spaced {
  margin: 60px 0 80px;
}

.work-intro-title {
  font-family: "Noto Serif TC", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-jade);
  margin: 0 0 12px;
  letter-spacing: var(--title-track);
}

.work-intro-text {
  font-size: 15px;
  color: var(--ink-70);
  line-height: 1.9;
}

.work-items-card {
  background: var(--soft-white);
  border: 1px solid var(--paper-edge-soft);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  font-size: 15px;
}

.work-items-card > img { max-width: 100%; }

.work-items-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--primary-jade);
}

.work-items-card ul {
  margin: 0;
  margin-top: 0.5em;
  padding-left: 1.2em;
  color: var(--ink-70);
}

.work-items-card li + li { margin-top: 4px; }

.work-items-card a {
  color: var(--primary-jade);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.work-items-card a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.timeline-section {
  margin: 60px 0;
  background: linear-gradient(180deg, transparent, var(--soft-white), transparent);
}

.timeline-section-head {
  text-align: center;
  margin-bottom: 26px;
}

.timeline-caption {
  padding: 0 15px;
  font-size: 14px;
  color: var(--ink-55);
}

.timeline-year--flip {
  order: 2;
  margin-bottom: 0 !important;
  margin-top: 32px;
}

.timeline-caption--flip {
  order: 1;
  margin-bottom: 32px;
}

.timeline-wrapper {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 40px 0;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 50%; left: 5%; right: 5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  flex: 1;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeline-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 240px;
  justify-content: center;
}

.timeline-dot {
  width: 16px; height: 16px;
  background: var(--soft-white);
  border: 3px solid var(--accent-gold);
  border-radius: 50%;
  margin: 0 auto;
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  transition: 0.3s;
}

.timeline-step:hover .timeline-dot {
  transform: translate(-50%, -50%) scale(1.5);
  background: var(--accent-gold);
  box-shadow: 0 0 0 8px rgba(184,134,11,0.1);
}

.timeline-year {
  font-size: 20px;
  color: var(--primary-jade);
  font-weight: 600;
  margin-bottom: 32px;
  transition: all 0.3s ease;
  font-family: "Noto Serif TC", serif;
}

.timeline-step:hover .timeline-year {
  color: var(--accent-gold);
  transform: scale(1.06);
}

.timeline-popup {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.timeline-popup.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: popupOverlayIn 0.35s ease forwards;
}

.timeline-popup.active.closing {
  pointer-events: none;
  animation: popupOverlayOut 0.45s ease 0.18s forwards;
}

.popup-content {
  background: var(--soft-white);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 90%;
  overflow: hidden;
  position: relative;
  will-change: transform, opacity;
}

.timeline-popup.active:not(.closing) .popup-content {
  animation: slideInLeft 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.timeline-popup.active.closing .popup-content {
  animation: slideOutToLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.popup-image {
  width: 100%;
  height: 260px;
  background-size: cover;
  background-position: center;
}

.popup-body { padding: 26px 26px 30px; }

.popup-year {
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.popup-title {
  font-family: "Noto Serif TC", serif;
  color: var(--primary-jade);
  font-size: 22px;
  margin-bottom: 12px;
}

.popup-text {
  color: var(--ink-70);
  line-height: 1.85;
  font-size: 15px;
}

.popup-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  background: var(--soft-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  font-size: 20px;
  color: var(--primary-jade);
  transition: all 0.3s ease;
}

.popup-close:hover {
  transform: rotate(90deg);
  background: var(--primary-jade);
  color: white;
}

@media (max-width: 860px) {
  .hero-inner {
    flex-direction: column;
    gap: 24px;
  }

  .hero-copy { max-width: 100%; }
  .hero-title { padding-top: 20px; }

  .hero-info-wrap { margin-top: 0; }
  .hero-events-row { margin-top: 24px; }

  .mission-container { grid-template-columns: 1fr; }
  .mission-content { padding-left: 0; margin-top: 20px; }
  .mission-visual { height: 260px; }
  .mission-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .story-section { grid-template-columns: 1fr; gap: 30px; margin: 40px 0; }
  .work-grid { grid-template-columns: 1fr; }

  .lama-meta-bar { flex-direction: column; padding: 22px 20px; }
  .meta-item { padding: 10px 0; border-left: none !important; border-top: 1px solid var(--rule); }
  .meta-item:first-child { border-top: none; }

  .timeline-wrapper { flex-direction: column; height: auto; }
  .timeline-line { width: 2px; height: 100%; left: 50%; top: 0; }
  .timeline-step { margin: 20px 0; }
}

@media (max-width: 640px) {
  .mission-points { grid-template-columns: 1fr; gap: 14px; }
  .mission-point { padding: 16px 16px 14px; border-radius: var(--radius-md); }
}

@media (max-width: 599px) {
  .timeline-section {
    margin: 36px 0 28px;
  }

  .timeline-section-head {
    margin-bottom: 14px;
  }

  .timeline-wrapper {
    flex-direction: column;
    overflow: visible;
    padding: 8px 0 12px;
    max-width: 100%;
    gap: 0;
  }

  .timeline-line {
    display: block;
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, var(--accent-gold), transparent);
  }

  .timeline-step {
    flex: none;
    width: 100%;
    margin: 0;
    padding: 10px 0;
    display: flex;
  }

  .timeline-step:nth-of-type(odd) {
    justify-content: flex-start;
    padding-left: calc(50% + 14px);
    padding-right: 12px;
    text-align: left;
  }

  .timeline-step:nth-of-type(even) {
    justify-content: flex-end;
    padding-right: calc(50% + 14px);
    padding-left: 12px;
    text-align: right;
  }

  .timeline-box {
    position: relative;
    height: auto;
    min-height: 0;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--paper-edge-soft);
    background: rgba(255, 255, 255, 0.72);
    justify-content: flex-start;
  }

  .timeline-step:nth-of-type(odd) .timeline-box {
    align-items: flex-start;
  }

  .timeline-step:nth-of-type(even) .timeline-box {
    align-items: flex-end;
  }

  .timeline-dot {
    position: absolute;
    top: 50%;
    margin: 0;
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .timeline-step:nth-of-type(odd) .timeline-dot {
    left: -22px;
    right: auto;
    transform: translate(-50%, -50%);
  }

  .timeline-step:nth-of-type(even) .timeline-dot {
    right: -22px;
    left: auto;
    transform: translate(50%, -50%);
  }

  .timeline-step:nth-of-type(odd):hover .timeline-dot {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 0 6px rgba(184, 134, 11, 0.1);
  }

  .timeline-step:nth-of-type(even):hover .timeline-dot {
    transform: translate(50%, -50%) scale(1.2);
    box-shadow: 0 0 0 6px rgba(184, 134, 11, 0.1);
  }

  .timeline-year {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .timeline-year--flip {
    order: unset;
    margin-top: 0 !important;
    margin-bottom: 6px;
  }

  .timeline-caption {
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .timeline-caption--flip {
    order: unset;
    margin-bottom: 0;
  }

  .timeline-step:hover .timeline-year {
    transform: none;
  }
}
