:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-muted: #eef2ff;
  --color-text: #14213d;
  --color-text-soft: #51607a;
  --color-heading: #0f172a;
  --color-border: rgba(20, 33, 61, 0.12);
  --color-primary: #ff6b35;
  --color-primary-deep: #ff8c42;
  --color-secondary: #ffd166;
  --color-accent: #7c3aed;
  --color-success: #0ea5a6;
  --color-sky: #3b82f6;
  --color-rose: #ec4899;
  --color-yellow: #f59e0b;
  --color-overlay: rgba(15, 23, 42, 0.58);
  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #3b82f6 22%, #0ea5a6 45%, #ffd166 67%, #ff8c42 82%, #ec4899 100%);
  --gradient-wa: linear-gradient(135deg, #f31526 0%, #008ce2 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(59, 130, 246, 0.08) 32%, rgba(14, 165, 166, 0.1) 58%, rgba(255, 209, 102, 0.16) 100%);
  --shadow-sm: 0 14px 28px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 24px 60px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 32px 80px rgba(15, 23, 42, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-xl: 42px;
  --space-2xs: 0.375rem;
  --space-xs: 0.625rem;
  --space-sm: 0.875rem;
  --space-md: 1.125rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6rem;
  --text-xs: 0.78rem;
  --text-sm: 0.94rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.28rem;
  --text-xl: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  --text-2xl: clamp(2.2rem, 1.7rem + 2.8vw, 4.4rem);
  --container: min(1180px, calc(100vw - 2rem));
  --content: min(980px, calc(100vw - 2rem));
  --header-height: 108px;
  --header-height-scrolled: 84px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.08), transparent 32%), var(--color-bg);
  color: var(--color-text);
  font-family: "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: var(--text-base);
  line-height: 1.75;
}

body.menu-open {
  overflow: hidden;
}

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

img,
iframe {
  max-width: 100%;
  border: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  display: block;
}

section {
  position: relative;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

.container,
.content-width {
  width: var(--container);
  margin: 0 auto;
}

.content-width {
  width: var(--content);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-tight {
  padding: var(--space-3xl) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-sm);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

.section-heading {
  display: grid;
  gap: 0.9rem;
  max-width: 760px;
  margin-bottom: var(--space-2xl);
}

.section-title {
  color: var(--color-heading);
  font-size: var(--text-xl);
  line-height: 1.15;
}

.section-copy,
.lead {
  color: var(--color-text-soft);
  font-size: var(--text-md);
}

.note-list {
  display: grid;
  gap: 0.9rem;
}

.note-list p + p {
  margin-top: 0.5rem;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: flex-start;
  color: var(--color-text-soft);
}

.feature-list li::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: var(--gradient-brand);
  box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.12);
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tag-list li {
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: var(--color-heading);
  font-size: var(--text-sm);
  font-weight: 600;
}

.media-frame,
.brand-mark,
.service-card-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(255, 209, 102, 0.28));
}

.media-frame img,
.brand-mark img,
.service-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

.media-frame.is-empty,
.brand-mark.is-empty,
.service-card-image.is-empty {
  min-height: 220px;
}

.media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--color-heading);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(8px);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1.5rem;
}

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

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

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

.surface-muted {
  background: var(--gradient-soft);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--color-heading);
  color: #fff;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

/* 蜂巢牆（參考 gemini-code：列式 flex + 外框 + hex-inner 內縮 + 背景圖 + 遮罩） */
.hex-section.honeycomb-block {
  --hex-size: clamp(118px, 15vw, 180px);
  --hex-gap: clamp(8px, 2vw, 14px);
  --hex-frame: linear-gradient(135deg, #ffd166 0%, #ff6b35 42%, #7c3aed 100%);
  overflow-x: clip;
}

.hex-section.honeycomb-block .honeycomb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: fit-content;
  margin-inline: auto;
  padding: 0.35rem 0 1.35rem;
  box-sizing: border-box;
}

.hex-section.honeycomb-block .hex-row {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  margin-top: calc(var(--hex-size) * -0.26);
}

.hex-section.honeycomb-block .hex-row:first-child {
  margin-top: 0;
}

.hex-section.honeycomb-block a.hex {
  width: var(--hex-size);
  height: calc(var(--hex-size) * 1.1);
  margin: 0 calc(var(--hex-gap) / 2);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--hex-frame);
  text-decoration: none;
  color: #fff;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
  position: relative;
  display: block;
  flex: 0 0 auto;
}

.hex-section.honeycomb-block a.hex:hover {
  transform: scale(1.06);
  z-index: 10;
  filter: brightness(1.08);
}

.hex-section.honeycomb-block a.hex:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  z-index: 11;
}

.hex-section.honeycomb-block .hex-inner {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  left: 4px;
  background-color: #1e293b;
  background-size: cover;
  background-position: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem 0.5rem;
  box-sizing: border-box;
}

.hex-section.honeycomb-block .hex-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 1;
  pointer-events: none;
}

.hex-section.honeycomb-block .hex-inner > span {
  position: relative;
  z-index: 2;
  font-size: clamp(0.72rem, 0.62rem + 0.35vw, 1.05rem);
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.hex-section.honeycomb-block a.hex.wa-hex {
  background: linear-gradient(135deg, #128c7e, #25d366);
}

.hex-section.honeycomb-block a.hex.wa-hex .hex-inner::before {
  background: rgba(0, 50, 30, 0.45);
}

@media (max-width: 768px) {
  .hex-section.honeycomb-block {
    --hex-size: clamp(96px, 24vw, 130px);
    --hex-gap: 8px;
  }

  .hex-section.honeycomb-block .hex-inner > span {
    font-size: clamp(0.65rem, 3.2vw, 0.88rem);
  }
}

@media (max-width: 480px) {
  .hex-section.honeycomb-block {
    --hex-size: min(100px, calc((100vw - 2.5rem) / 2.85));
  }
}

@media (max-width: 980px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: var(--space-3xl) 0;
  }
}

@media (max-width: 720px) {
  :root {
    --container: min(100vw - 1.2rem, 100%);
    --content: min(100vw - 1.2rem, 100%);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: var(--space-2xl) 0;
  }
}
