:root {
  --ink: #252525;
  --muted: #6f6f6f;
  --line: #e8e8e8;
  --paper: #f7f7f7;
  --white: #fff;
  --soft: #f4f5f7;
  --cream: #fbfaf6;
  --black: #1f1f1f;
  --accent: #8f8776;
  --blue: #5d708a;
  --rose: #a6817c;
  --shadow: 0 18px 54px rgba(31, 31, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
}

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

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding: 14px clamp(18px, 4vw, 62px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(31, 31, 31, 0.08);
}

.brand img {
  width: 214px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 15px;
  font-weight: 700;
}

.site-nav a {
  position: relative;
}

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

.site-nav a:hover::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 0px 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 86px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(76px, 10vw, 136px) clamp(18px, 7vw, 104px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.78) 50%, rgba(247, 247, 247, 0.52) 100%),
    url("assets/bvg-logo-trim.png") right 8vw center / min(48vw, 680px) auto no-repeat,
    radial-gradient(circle at 78% 28%, rgba(93, 112, 138, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7f7f7 58%, #eceff3 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(56vw, 720px);
  height: 38%;
  background: linear-gradient(135deg, transparent, rgba(166, 129, 124, 0.18));
  clip-path: polygon(26% 24%, 100% 0, 100% 100%, 0 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 26px;
  font-size: clamp(42px, 6.4vw, 86px);
  line-height: 1.08;
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-weight: 800;
}

h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.15;
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-weight: 800;
}

h3 {
  font-size: 23px;
  line-height: 1.25;
}

.hero-text {
  max-width: 660px;
  color: #555;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid var(--black);
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: var(--black);
  box-shadow: 0 14px 30px rgba(31, 31, 31, 0.18);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.78);
}

.hero-dots {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 7vw, 104px);
  bottom: clamp(24px, 5vw, 54px);
  display: flex;
  gap: 10px;
}

.hero-dots span {
  width: 10px;
  height: 10px;
  border-radius: 8px;
  background: #1f1f1f;
  opacity: 0.25;
}

.hero-dots span:first-child {
  width: 34px;
  opacity: 1;
}

.section {
  padding: clamp(70px, 9vw, 124px) clamp(18px, 6vw, 90px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: clamp(36px, 5vw, 62px);
}

.section-heading p:not(.eyebrow) {
  max-width: 740px;
  color: var(--muted);
  font-size: 18px;
}

.intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 7vw, 90px);
  background: var(--white);
}

.intro-content {
  display: grid;
  gap: 34px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-stats div {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f2f4f6);
  box-shadow: 0 14px 36px rgba(31, 31, 31, 0.07);
}

.about-stats strong {
  color: var(--black);
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.about-stats span {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  color: #555956;
  font-size: 18px;
}

.service-band {
  background: linear-gradient(180deg, #f7f7f7 0%, #ffffff 100%);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.department-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-grid article,
.case-card,
.contact-form {
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 18px;
  background: var(--white);
}

.service-grid article {
  min-height: 258px;
  padding: 28px;
  box-shadow: 0 16px 38px rgba(31, 31, 31, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.department-grid article {
  min-height: 300px;
}

.service-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 54px rgba(31, 31, 31, 0.1);
}

.service-grid span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}

.service-grid p,
.case-card p {
  color: var(--muted);
}

.method {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(34px, 6vw, 80px);
  background:
    linear-gradient(135deg, rgba(31, 31, 31, 0.86), rgba(31, 31, 31, 0.64)),
    url("assets/bvg-logo-trim.png") right 8vw center / min(44vw, 560px) auto no-repeat,
    #252525;
  color: var(--white);
}

.method-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.timeline li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.timeline span {
  color: rgba(255, 255, 255, 0.74);
}

.cases {
  background: var(--white);
}

.case-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.service-toolbar {
  margin-top: -8px;
  margin-bottom: 30px;
}

.case-toolbar button {
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.case-toolbar button.active {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.case-toolbar button[hidden] {
  display: none;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.case-card {
  position: relative;
  overflow: hidden;
  padding: 190px 26px 26px;
  min-height: 500px;
  box-shadow: 0 18px 44px rgba(31, 31, 31, 0.08);
}

.case-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.case-link:hover,
.case-link:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(31, 31, 31, 0.12);
}

.case-link:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 4px;
}

.client-logo {
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 26px;
  width: 116px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(31, 31, 31, 0.1);
}

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

.client-logo.wide-logo {
  width: 150px;
}

.client-logo.text-logo span {
  color: var(--black);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
}

.case-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 164px;
  background:
    linear-gradient(135deg, rgba(31, 31, 31, 0.12), rgba(31, 31, 31, 0.02)),
    radial-gradient(circle at 20% 30%, rgba(143, 135, 118, 0.32), transparent 32%),
    linear-gradient(135deg, #f6f4ef, #e9edf2);
}

.case-card::after {
  content: "BVG";
  position: absolute;
  top: 40px;
  right: 28px;
  color: rgba(31, 31, 31, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  letter-spacing: 0;
}

.case-card.hidden {
  display: none;
}

.case-kicker {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

dl {
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}

.case-collab {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(31, 31, 31, 0.1);
}

.case-collab-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.case-collab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-collab-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--black);
  background: #f2f2f2;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(35, 35, 35, 0.1);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
}

.inquiry {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 0.82fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(31, 31, 31, 0.92), rgba(31, 31, 31, 0.7)),
    radial-gradient(circle at 78% 22%, rgba(166, 129, 124, 0.32), transparent 32%),
    #1f1f1f;
}

.inquiry-copy p:not(.eyebrow) {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.inquiry-panel {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}

.inquiry-panel h3 {
  margin-bottom: 18px;
}

.inquiry-panel ul {
  margin: 0 0 26px;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.76);
}

.inquiry-panel li + li {
  margin-top: 10px;
}

.inquiry-panel .button.primary {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
  box-shadow: none;
}

.diagnosis-flow {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.diagnosis-grid article {
  min-height: 230px;
  padding: 26px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(31, 31, 31, 0.06);
}

.diagnosis-grid span {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.diagnosis-grid p {
  color: var(--muted);
}

.diagnosis-cta {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.contact {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 6vw, 80px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 247, 247, 0.82)),
    radial-gradient(circle at 86% 14%, rgba(93, 112, 138, 0.16), transparent 34%),
    var(--white);
}

.contact-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
}

.contact-list span {
  color: var(--accent);
  font-weight: 900;
}

.contact-list a {
  color: var(--ink);
  font-weight: 700;
}

.note {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f3f3f3;
  color: var(--muted);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.contact-form label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.contact-form .full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 6vw, 90px);
  color: rgba(255, 255, 255, 0.7);
  background: #1f1f1f;
  font-size: 14px;
}

.footer img {
  width: 170px;
  filter: invert(1);
}

.to-top-button {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 30;
  min-width: 118px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--white);
  background: rgba(31, 31, 31, 0.92);
  box-shadow: 0 18px 44px rgba(31, 31, 31, 0.2);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.to-top-button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top-button:hover {
  background: var(--black);
}

@media (max-width: 1040px) {
  .hero,
  .intro,
  .method,
  .inquiry,
  .contact {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .diagnosis-grid,
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .site-header {
    min-height: 70px;
    padding: 10px 18px;
  }

  .brand img {
    width: 132px;
    height: 42px;
  }

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 18px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(31, 31, 31, 0.08);
  }

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

  .site-nav a {
    padding: 12px 0;
  }

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

  .hero {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 247, 247, 0.82)),
      url("assets/bvg-logo-trim.png") center 34px / min(86vw, 360px) auto no-repeat;
    padding: 158px 22px 52px;
  }

  .hero::after {
    height: 24%;
  }

  h1 {
    font-size: clamp(34px, 9vw, 42px);
    line-height: 1.18;
    margin-bottom: 18px;
  }

  h2 {
    font-size: clamp(28px, 7.4vw, 36px);
    line-height: 1.22;
  }

  h3 {
    font-size: 21px;
  }

  .hero-text,
  .section-heading p:not(.eyebrow),
  .intro-grid,
  .method-copy p:not(.eyebrow),
  .contact-copy p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 28px;
  }

  .button {
    width: 100%;
    min-height: 52px;
  }

  .hero-dots {
    left: 22px;
    bottom: 28px;
  }

  .section {
    padding: 56px 22px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .hero-actions,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .intro-grid,
  .about-stats,
  .service-grid,
  .department-grid,
  .diagnosis-grid,
  .contact-form,
  .timeline li {
    grid-template-columns: 1fr;
  }

  .about-stats div {
    min-height: 112px;
  }

  .service-grid article,
  .department-grid article,
  .diagnosis-grid article {
    min-height: auto;
    padding: 22px;
  }

  .diagnosis-cta {
    justify-content: stretch;
    margin-top: 24px;
  }

  .service-grid span {
    margin-bottom: 18px;
    font-size: 22px;
  }

  .method {
    background:
      linear-gradient(135deg, rgba(31, 31, 31, 0.9), rgba(31, 31, 31, 0.76)),
      #252525;
  }

  .timeline {
    gap: 12px;
  }

  .timeline li {
    padding: 18px;
  }

  .case-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-left: -22px;
    margin-right: -22px;
    padding-left: 22px;
    padding-right: 22px;
    scrollbar-width: none;
  }

  .case-toolbar::-webkit-scrollbar {
    display: none;
  }

  .case-toolbar button {
    flex: 0 0 auto;
  }

  .case-grid {
    display: flex;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    margin-left: -22px;
    margin-right: -22px;
    padding: 2px 48px 18px 22px;
    scroll-padding-left: 22px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .case-grid::-webkit-scrollbar {
    display: none;
  }

  .case-grid::after {
    content: "";
    flex: 0 0 12px;
  }

  .case-card {
    flex: 0 0 min(82vw, 342px);
    scroll-snap-align: start;
    padding: 132px 20px 22px;
    min-height: 492px;
  }

  .case-card::before {
    height: 112px;
  }

  .case-card::after {
    top: 24px;
    right: 20px;
    font-size: 42px;
  }

  .client-logo {
    top: 18px;
    left: 20px;
    width: 92px;
    height: 72px;
    padding: 10px;
    border-radius: 14px;
  }

  .client-logo.wide-logo {
    width: 118px;
  }

  .client-logo.text-logo span {
    font-size: 15px;
  }

  dl div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  dd {
    text-align: left;
  }

  .inquiry-panel {
    padding: 20px;
  }

  .case-collab {
    margin-top: 16px;
    padding-top: 14px;
  }

  .case-collab-tags {
    gap: 6px;
  }

  .case-collab-tags span {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 12px;
  }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contact-form {
    padding: 20px;
  }

  .footer {
    text-align: center;
  }

  .footer img {
    width: 150px;
  }

  .to-top-button {
    right: 16px;
    bottom: 16px;
    min-width: 104px;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 13px;
  }
}
