/* Base reset */
* { box-sizing: border-box; }
html {
  height: 100%;
  overflow: hidden;
}
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #6e534d;
  font-family: "Noto Serif SC", ui-serif, Georgia, serif;
  background: #f5f1ee;
}

/* Hero: fixed to viewport height; crop sides according to width */
.hero {
  position: relative;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;         /* 宽度变化时裁剪两侧 */
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  justify-items: center;
  background-image: url('./images/bg.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: auto 100%; /* 按高度等于视口，左右超出被裁剪 */
}

.brand { margin-top: clamp(24px, 5vh, 50px); }
.brand-name {
  letter-spacing: 0.02em;
  color: #7b635c;
  font-family: "Noto Serif SC", "Source Han Serif SC", "思源宋体", serif;
  font-weight: 300;
  font-size: clamp(16px, 2.1vh, 22px);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}

.content {
  align-self: center;
  text-align: center;
  padding-inline: 20px;
}

.title-en {
  margin: 140px 0 10px;
  line-height: 1.2;
  font-family: "Noto Serif SC", "Source Han Serif SC", "思源宋体", serif;
  font-weight: 250;
  color: #6e534d;
  text-shadow: 0 2px 0 rgba(255,255,255,.4);
  font-size: clamp(22px, 5.6vw, 54px);
}

.title-en span { display: block; }

.title-zh {
  margin: clamp(12px, 2vh, 20px) 0 clamp(18px, 3vh, 28px);
  color: #7b635c;
  font-family: "Noto Serif SC", "Source Han Serif SC", "思源宋体", serif;
  font-weight: 350;
  font-size: clamp(21px, 2.4vw, 32px);
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
}

.cta {
  display: inline-flex;
  align-items: center;
  margin: 25px 0px 25px 0px;
  gap: 10px;
  padding: 7px 38px;
  border-radius: 999px;
  background: white;
  color: #6e534d;
  font-family: "Noto Serif SC", "Source Han Serif SC", "思源宋体", serif;
  font-weight: 300;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(72,56,48,.15), inset 0 1px 0 #fff;
  border: 1px solid rgba(110,83,77,.15);
  transition: transform .15s ease, box-shadow .2s ease;
  min-width: fit-content;
}

.cta .note { font-size: 16px; }
.cta:active { transform: translateY(1px); }
.cta:hover {
  box-shadow: 0 10px 28px rgba(72,56,48,.22), inset 0 1px 0 #fff;
}

.audio-player {
  gap: 0;
  position: relative;
}

.audio-player.cta {
  min-width: fit-content;
  font-size: 16px;
  padding: 7px 13px 7px 13px;
}

.audio-player .pause-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #6e534d;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  margin-left: 12px;
}

.audio-player .pause-btn img {
  width: 24px;
  height: 24px;
  display: block;
}

.audio-player .progress {
  position: relative;
  width: clamp(160px, 38vw, 260px);
  height: 8px;
  background: rgba(110,83,77,.18);
  border-radius: 999px;
  cursor: pointer;
  outline: none;
}

.audio-player .progress-filled {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #6e534d;
  border-radius: 999px;
  pointer-events: none;
}

.audio-player .progress-handle {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: white;
  border: 1px solid rgba(110,83,77,.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(72,56,48,.2);
  pointer-events: none;
}

.audio-player .time {
  font-size: 16px;
  color: #7b635c;
  min-width: 88px;
}

.audio-player .progress:focus-visible {
  box-shadow: 0 0 0 2px rgba(110,83,77,.25);
}

.links {
  display: grid;
  grid-auto-flow: column;
  gap: clamp(36px, 5vw, 42px);
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vh, 20px) 0 clamp(0px, 0vh, 0px);
  align-self: end;
  margin-bottom: clamp(80px, 10vh, 130px);
}

.link {
  width: clamp(34px, 5vw, 42px);
  height: clamp(34px, 5vw, 42px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
  transition: transform .15s ease;
}

.link:hover { transform: translateY(-2px); }
.link img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Improve contrast if background is very bright */
@media (prefers-color-scheme: light) {
  .title-en, .title-zh, .brand-name { text-shadow: 0 1px 0 rgba(255,255,255,.5); }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: clamp(24px, 6vh, 64px);
  transform: translateX(-50%) translateY(10px);
  background: rgba(51, 38, 33, 0.9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


