:root {
  --brand: #b04541;
  --brand-deep: #a03a36;
  --brand-soft: #c45a55;
  --ink: #1a1a1a;
  --text: #333333;
  --muted: #6b6b6b;
  --page: #f3f1f1;
  --white: #ffffff;
  --blob: rgba(196, 90, 85, 0.28);
  --header-h: 78px;
  --serif: "Libre Baskerville", "Times New Roman", Times, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --zh: "Noto Sans SC", "Source Sans 3", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--page);
  line-height: 1.55;
  overflow-x: hidden;
}

main section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand);
  min-height: var(--header-h);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  width: 88px;
  height: 62px;
  background: var(--white);
  display: grid;
  place-items: center;
  padding: 3px 4px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--white);
  min-width: 0;
}

.brand-en {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-zh {
  font-family: var(--zh);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: flex-end;
  gap: clamp(1.25rem, 3vw, 2.4rem);
  padding-bottom: 0.15rem;
}

.site-nav .nav-link {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding: 0.2rem 0;
}

.site-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 2px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav .nav-link:hover::after,
.site-nav .nav-link.is-active::after,
.nav-item.has-dropdown:hover > .nav-link::after {
  transform: scaleX(1);
}

.nav-item.has-dropdown {
  position: relative;
  padding-bottom: 0.55rem;
  margin-bottom: -0.55rem;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% - 0.15rem);
  left: 0;
  min-width: 280px;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 120;
  box-shadow: 0 10px 28px rgba(80, 30, 30, 0.18);
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown,
.nav-item.has-dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-dropdown li:nth-child(1) a {
  background: #8f3532;
}

.nav-dropdown li:nth-child(2) a {
  background: #c47a78;
}

.nav-dropdown li:nth-child(3) a {
  background: #d9a6a4;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: #f3e4e3;
  color: #3a2a2a;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: 0.2s ease;
}

/* ---------- Blobs ---------- */
.blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  background: var(--blob);
  filter: blur(70px);
  will-change: transform;
}

.blob-a {
  width: 420px;
  height: 420px;
  top: -80px;
  left: 8%;
  opacity: 0.9;
}

.blob-b {
  width: 520px;
  height: 520px;
  top: 10%;
  right: -120px;
  opacity: 0.75;
}

.blob-c {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: 38%;
  opacity: 0.55;
}

.blob-d {
  width: 180px;
  height: 180px;
  top: 45%;
  left: 55%;
  opacity: 0.45;
}

.blob-e {
  width: 480px;
  height: 480px;
  top: -60px;
  left: 5%;
}

.blob-f {
  width: 360px;
  height: 360px;
  top: 20%;
  right: -80px;
  opacity: 0.7;
}

.blob-g {
  width: 300px;
  height: 300px;
  top: -40px;
  left: 20%;
}

.blob-h {
  width: 420px;
  height: 420px;
  bottom: -120px;
  right: 5%;
}

.blob-i {
  width: 220px;
  height: 220px;
  top: 40%;
  left: 55%;
  opacity: 0.5;
}

.blob-j {
  width: 380px;
  height: 380px;
  top: -80px;
  left: 10%;
}

.blob-k {
  width: 300px;
  height: 300px;
  bottom: -60px;
  right: 8%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  background: var(--page);
  padding: 4rem 1.5rem 5rem;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.35rem, 5.2vw, 4.2rem);
  line-height: 1.22;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero-title {
    max-width: none;
  }

  .hero-title span {
    white-space: normal;
  }
}

.hero-sub {
  margin: 2.4rem 0 0;
  margin-left: clamp(0rem, 28vw, 22rem);
  max-width: 28rem;
  font-family: var(--sans);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--brand);
}

/* ---------- About ---------- */
.about {
  position: relative;
  padding: 5.5rem 1.5rem 4.5rem;
  background: var(--page);
}

.about-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.about-heading {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.2;
  color: var(--brand);
  text-align: right;
  padding-top: 0.2rem;
}

.about-heading span {
  display: block;
}

.about-body {
  position: relative;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: var(--text);
  line-height: 1.7;
}

.about-body p {
  margin: 0 0 1.15rem;
  position: relative;
  z-index: 1;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.ghost-text {
  position: absolute;
  inset: -0.5rem auto auto -0.5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.2;
  color: rgba(80, 40, 40, 0.07);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.ghost-text span {
  display: block;
}

/* ---------- Solution ---------- */
.solution {
  position: relative;
  padding: 3.5rem 1.5rem 5.5rem;
  background: var(--page);
}

.solution-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.solution-title {
  margin: 0 0 2.4rem;
  text-align: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  letter-spacing: 0.12em;
  color: var(--brand);
}

.solution-track {
  display: flex;
  align-items: flex-start;
  gap: 1.35rem;
  overflow-x: auto;
  padding: 1.25rem 0.5rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.solution-track::-webkit-scrollbar {
  height: 6px;
}

.solution-track::-webkit-scrollbar-thumb {
  background: rgba(176, 69, 65, 0.35);
  border-radius: 999px;
}

.solution-card {
  position: relative;
  flex: 0 0 auto;
  width: min(300px, 78vw);
  min-height: 150px;
  background: var(--white);
  border-radius: 28px;
  padding: 1.6rem 1.5rem 2.2rem;
  scroll-snap-align: start;
  scroll-margin-top: calc(var(--header-h) + 16px);
  box-shadow: 0 8px 28px rgba(120, 60, 60, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, outline-color 0.25s ease;
}

.solution-card:hover,
.solution-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(120, 60, 60, 0.1);
}

.solution-card h3 {
  margin: 0;
  padding-right: 2rem;
  font-family: var(--sans);
  font-style: italic;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--ink);
}

.card-play {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(176, 69, 65, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.card-play:hover {
  background: var(--brand-deep);
  transform: scale(1.05);
}

.card-play svg {
  display: block;
  margin-left: 2px;
}

.card-expand {
  position: absolute;
  right: 1rem;
  bottom: 0.75rem;
  width: 22px;
  height: 22px;
  color: var(--brand);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.solution-card:hover .card-expand,
.solution-card.is-open .card-expand {
  transform: rotate(180deg);
}

.card-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}

.solution-card:hover .card-detail,
.solution-card.is-open .card-detail {
  grid-template-rows: 1fr;
  margin-top: 0.85rem;
}

.card-detail p {
  margin: 0;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

/* ---------- Video modal ---------- */
.video-modal[hidden] {
  display: none !important;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 16, 16, 0.72);
}

.video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.video-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.video-modal__frame {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-modal__frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding: 4rem 1.5rem 5rem;
  background: var(--page);
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-title {
  margin: 0 0 2.2rem;
  text-align: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  letter-spacing: 0.12em;
  color: var(--brand);
}

.contact-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  padding: 2.4rem 2rem;
  backdrop-filter: blur(6px);
}

.contact-label {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 700;
  color: var(--ink);
}

.contact-label-zh {
  margin: 0.45rem 0 1.6rem;
  font-family: var(--zh);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--brand);
}

.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.contact-details span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-details strong {
  font-weight: 600;
  color: var(--text);
}

.contact-details a:hover {
  color: var(--brand);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 1.1rem 1.5rem;
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title,
  .hero-sub,
  .about-heading,
  .about-body,
  .solution-title,
  .solution-card {
    animation: rise 0.8s ease both;
  }

  .hero-sub {
    animation-delay: 0.12s;
  }

  .about-body {
    animation-delay: 0.1s;
  }

  .solution-card:nth-child(1) {
    animation-delay: 0.05s;
  }
  .solution-card:nth-child(2) {
    animation-delay: 0.12s;
  }
  .solution-card:nth-child(3) {
    animation-delay: 0.19s;
  }
  .solution-card:nth-child(4) {
    animation-delay: 0.26s;
  }

  .blob-a,
  .blob-e,
  .blob-g {
    animation: float 14s ease-in-out infinite;
  }

  .blob-b,
  .blob-f,
  .blob-h {
    animation: float 18s ease-in-out infinite reverse;
  }

  .blob-c,
  .blob-i,
  .blob-k {
    animation: float 16s ease-in-out infinite;
    animation-delay: -4s;
  }
}

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

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(18px, -22px) scale(1.04);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-deep);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav .nav-link {
    padding: 0.9rem 1.5rem;
  }

  .site-nav .nav-link::after {
    display: none;
  }

  .nav-item.has-dropdown {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 0;
    display: none;
  }

  .nav-item.has-dropdown.is-open .nav-dropdown {
    display: block;
  }

  .nav-dropdown a {
    padding-left: 2rem;
    white-space: normal;
  }

  .header-inner {
    position: relative;
  }

  .hero-sub {
    margin-left: 0;
    margin-top: 1.8rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .about-heading {
    text-align: left;
  }

  .ghost-text {
    display: none;
  }

  .contact-card {
    padding: 1.8rem 1.3rem;
  }

  .brand-en,
  .brand-zh {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }
}
