/* =========================================================
   sections.css — styles specific to each page section,
   in the same order the sections appear in index.html
   ========================================================= */

/* ----- Hero ----- */
.hero {
  position: relative; padding: 96px 0 160px; overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(156, 210, 86, .22), transparent 55%),
    var(--green-dark);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero__eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: 14px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-light);
}
.hero__title { font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1.05; margin-bottom: 20px; }
.hero__title em { font-style: italic; font-weight: 400; color: var(--gold-light); }
.hero__lead { font-size: 18px; max-width: 30em; opacity: .92; margin-bottom: 32px; }
/* hero logo straight on the hero. The intro SVG sits exactly over the image (same viewBox);
   its effects reach slightly past the logo, which the padding leaves room for */
.logo-anim { padding: 5% 12%; }
.logo-anim__art { position: relative; }
.logo-anim img { display: block; width: 100%; height: auto; }
.logo-anim__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.logo-anim.is-replayable { cursor: pointer; }
/* hidden until the intro reveals it; the delayed animation is a safety net if the script never runs */
.logo-intro .logo-anim img { opacity: 0; animation: logo-fallback 0s 10s forwards; }
@keyframes logo-fallback { to { opacity: 1; } }
.hero__curve { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; }

/* ----- Wavy section dividers -----
   The section's own colour rises in a soft wave over the bottom of the section above.
   Colours have to be literal inside the data URI: #357a46 = --green-dark, #9cd256 = --green-light. */
.section--wave { position: relative; }
.section--wave::before {
  content: ""; position: absolute; left: 0; right: 0; top: -47px; height: 48px;
  background: center bottom / 100% 100% no-repeat; pointer-events: none;
}
.section--dark.section--wave::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 48V30C180 6 360 0 540 14s360 32 540 22 270-30 360-30v42z' fill='%23357a46'/%3E%3C/svg%3E");
}
.section--light.section--wave::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 48V8c120 0 270 26 420 30s330-26 540-28 360 18 480 22v16z' fill='%239cd256'/%3E%3C/svg%3E");
}

/* ----- About ----- */
.about { position: relative; overflow: hidden; }
/* faint outline of the logo's mountains, drawn in when scrolled into view (main.js: initDrawOnScroll) */
.about__art {
  position: absolute; right: -60px; top: 50%;
  width: min(620px, 70vw); transform: translateY(-50%);
  color: rgba(255, 255, 255, .4); pointer-events: none;
}
.about__art path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.js .about__art path { stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease); }
.js .about__art.is-drawn path { stroke-dashoffset: 0; }
.js .about__art path:nth-child(2) { transition-delay: .7s; }
.js .about__art path:nth-child(3) { transition-delay: 1.2s; }

.about__grid { position: relative; display: grid; grid-template-columns: .8fr 1.6fr 1.6fr; gap: 32px; align-items: stretch; }
.about__grid h2 { align-self: center; font-size: clamp(2.5rem, 5vw, 3.25rem); margin: 0; }
.about__grid h2::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 18px; background: var(--gold); border-radius: 2px; }
/* frosted cards for the two paragraphs */
.about__card {
  padding: 28px 28px 26px;
  background: rgba(255, 255, 255, .38);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .3s var(--ease), box-shadow .3s, background-color .3s;
}
.about__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); background: rgba(255, 255, 255, .5); }
.about__tag {
  display: inline-block; margin-bottom: 14px; padding: 4px 11px;
  background: var(--green-darker); color: var(--white);
  border-radius: 999px;
  font: 700 11px/1.4 var(--font-body); letter-spacing: .14em;
}
.about__card p { margin: 0; font-size: 17px; }
.about__zh { line-height: 2; letter-spacing: .04em; }

/* ----- Community stats ----- */
/* The layer is clipped at the section edges, but the wavy dividers rise above / dip below
   those edges — so the light fades out towards the top and bottom instead of ending in a
   straight line that shows through the waves. */
.community__glow {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%);
}
/* slow-drifting soft light spots behind the cards */
.community__glow span {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .35;
  animation: glow-drift 18s ease-in-out infinite alternate;
}
.community__glow span:nth-child(1) { width: 380px; height: 380px; top: 10px; left: -80px; background: var(--gold); }
.community__glow span:nth-child(2) { width: 460px; height: 460px; bottom: -120px; right: -100px; background: var(--green-light); animation-duration: 23s; animation-delay: -7s; }
.community__glow span:nth-child(3) { width: 260px; height: 260px; top: 35%; left: 42%; background: var(--white); opacity: .12; animation-duration: 27s; animation-delay: -12s; }
@keyframes glow-drift { to { transform: translate(70px, 40px) scale(1.15); } }
.community .container { position: relative; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); text-align: center; list-style: none; padding: 0; margin: 48px 0 0; }
.stats li {
  padding: 40px 20px 34px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: transform .35s var(--ease), border-color .35s, background-color .35s;
}
.stats li:hover { transform: translateY(-6px); border-color: rgba(242, 193, 78, .75); background: rgba(255, 255, 255, .12); }
.stats__icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 auto 18px;
  background: rgba(242, 193, 78, .16); color: var(--gold-light);
  border-radius: 16px;
  transition: transform .35s var(--ease);
}
.stats li:hover .stats__icon { transform: rotate(-6deg) scale(1.08); }
.stats__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stats__label { display: block; font-size: 16px; opacity: .9; }
.stats__num {
  display: block; margin: 6px 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3rem, 7vw, 4.5rem); line-height: 1.1;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

/* ----- Key values ----- */
/* desktop: acrostic stays in view on the left while the value cards scroll past on the right */
.values-layout { display: grid; grid-template-columns: minmax(250px, .75fr) 1.6fr; gap: 56px; align-items: start; margin: 48px 0 64px; }
.acrostic {
  position: sticky; top: calc(var(--nav-h) + 32px); justify-self: center;
  list-style: none; padding: 0; margin: 0; width: max-content;
  font-family: var(--font-display); font-size: 28px;
}
/* fixed word column (fits the longest word, "hange") so the Chinese glosses line up in a column */
.acrostic li {
  display: grid; grid-template-columns: 1.1em 3.3em auto; align-items: baseline; column-gap: 2px; line-height: 1.55;
  margin: 0 -12px; padding: 0 12px; border-radius: 12px;
  transition: transform .3s var(--ease), background-color .3s;
}
/* highlighted while its value card is hovered (main.js: initValuesLink) */
.acrostic li.is-active { transform: translateX(8px); background: rgba(255, 255, 255, .45); }
/* Chinese gloss after each English word (Chinese mode only) */
.acrostic__zh {
  margin-left: 14px;
  font-family: var(--font-body); font-size: 16px; font-weight: 500; letter-spacing: .1em;
  color: var(--green-darker); opacity: .85;
}
.acrostic__cap { font-size: 44px; font-weight: 600; color: var(--green-darker); text-align: right; line-height: 1; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.values li {
  display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: center;
  padding: 18px 22px;
  background: rgba(255, 255, 255, .38);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, background-color .3s;
}
.values li:hover, .values li.is-active { transform: translateX(6px); background: rgba(255, 255, 255, .6); box-shadow: var(--shadow-md); }
/* the value's initial — matches the acrostic letter */
.values__badge {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: var(--green-darker); color: var(--white);
  border-radius: 14px;
  font: 600 24px/1 var(--font-display);
  transition: background-color .3s, color .3s, transform .3s var(--ease);
}
.values li:hover .values__badge, .values li.is-active .values__badge { background: var(--gold); color: var(--green-deepest); transform: rotate(-6deg); }
.values__text { margin: 0; }
.values em { font-style: normal; font-weight: 700; color: var(--green-darker); }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  transition: transform .4s var(--ease);
}
.gallery figure:hover img { transform: translateY(-6px); }
.gallery figcaption { text-align: center; margin-top: 14px; font-weight: 500; line-height: 1.5; }

/* ----- News & events ----- */
.post a {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 1 / 1; padding: 22px; text-decoration: none; overflow: hidden;
  background: var(--green-darker);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.post img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post a::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 30, 15, .85), rgba(10, 30, 15, 0) 60%);
  transition: background .3s;
}
.post a:hover img, .post a:focus-visible img { transform: scale(1.06); }
.post a:hover::after, .post a:focus-visible::after { background: linear-gradient(to top, rgba(10, 30, 15, .9), rgba(10, 30, 15, .2)); }
.post h3, .post time { position: relative; z-index: 1; }
.post h3 { font-size: 19px; line-height: 1.4; margin-bottom: 6px; }
.post time { font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--gold-light); }

/* ----- Members ----- */
.member {
  background: var(--white); color: var(--card-text);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.member__body { padding: 22px 22px 26px; }
.member h3 { font-size: 23px; margin-bottom: 4px; color: var(--green-deepest); }
.member__role {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-dark); margin-bottom: 14px;
}
.member blockquote { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 17px; line-height: 1.5; color: var(--muted); }
/* Chinese translation of the quote (Chinese mode only) */
.member__quote-zh { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.members-note { text-align: center; margin: 48px 0 0; font-weight: 500; }

/* ----- Join ----- */
.join { text-align: center; }
.join__text { max-width: 560px; margin: 0 auto 32px; font-size: 18px; }
.join__qr {
  width: 180px; margin: 36px auto 0; padding: 10px;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.join__qr-caption { margin-top: 12px; font-size: 14px; opacity: .85; }

/* ----- Store ----- */
.store__sub { text-align: center; margin: -8px 0 48px; }
.product {
  background: var(--white); color: var(--card-text);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.product__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product h3 { font-size: 20px; margin: 0; color: var(--green-deepest); }
.product__price { font-weight: 700; color: var(--green-dark); margin-bottom: 8px; }
.product .btn { margin-top: auto; padding: 11px 18px; font-size: 15px; }

/* ----- FAQ / contact ----- */
.faq { text-align: center; }
.faq a { word-break: break-all; font-weight: 500; color: var(--green-darker); }
.contact-form {
  max-width: 520px; margin: 40px auto 0; padding: 32px;
  display: grid; gap: 14px; text-align: left;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.contact-form label:not(.visually-hidden) { font-size: 14px; font-weight: 700; color: var(--green-deepest); margin-bottom: -8px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 16px;
  border: 1.5px solid #d5ddd6; border-radius: var(--radius); background: #fbfcfb; color: var(--card-text);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(53, 122, 70, .18);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .btn { margin-top: 6px; }
.contact-form .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.contact-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__status { margin: 0; font-size: 15px; text-align: center; color: var(--green-darker); }
.contact-form__status:empty { display: none; }
.contact-form__status.is-error { color: #b3261e; }

/* ----- Responsive ----- */
@media (max-width: 860px) {
  .hero { padding: 56px 0 120px; }
  .hero__grid, .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .about__grid { gap: 20px; }
  .about__art { top: 18%; right: -120px; width: 420px; }
  .hero__media { order: -1; width: 100%; max-width: 380px; margin-inline: auto; }
  .stats { grid-template-columns: 1fr; }
  .values-layout { grid-template-columns: 1fr; gap: 36px; }
  .acrostic { position: static; }
}
@media (max-width: 520px) {
  .hero__media { max-width: 300px; }
  .contact-form { padding: 22px; }
  .acrostic { font-size: 24px; }
  .acrostic__cap { font-size: 36px; }
  .about__card { padding: 22px; }
  .values li { grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 18px; }
  .values__badge { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
  /* members sit two per row on phones (like the shop): compact cards */
  .member__body { padding: 12px 10px 16px; }
  .member h3 { font-size: 17px; }
  .member__role { font-size: 10px; letter-spacing: .08em; margin-bottom: 8px; }
  .member blockquote { font-size: 14px; line-height: 1.45; }
  .member__quote-zh { font-size: 12.5px; line-height: 1.5; }
}
