:root {
  --ink: #262322;
  --muted: #6d6966;
  --paper: #fffaf3;
  --paper-deep: #f4ede5;
  --white: #ffffff;
  --line: #2b2928;
  --yellow: #ffda62;
  --yellow-soft: #fff0b8;
  --blue: #4c7ff0;
  --blue-soft: #dbe7ff;
  --purple: #a486e8;
  --purple-soft: #ece4ff;
  --orange: #f3b75e;
  --pink: #ed6f7e;
  --shadow: 7px 8px 0 rgba(38, 35, 34, 0.13);
  --radius: 26px;
  --shell: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Noto Sans TC",
    "PingFang TC",
    "Microsoft JhengHei",
    system-ui,
    sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(43, 41, 40, 0.14);
  background: rgba(255, 250, 243, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand span {
  display: grid;
  line-height: 1.2;
}

.brand strong {
  font-size: 1.03rem;
  letter-spacing: 0.06em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav > a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  padding: 9px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.nav-cta:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 2px 0 var(--ink);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  background: transparent;
}

.menu-button span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--ink);
}

.hero {
  overflow: hidden;
  padding: 80px 0 96px;
  border-bottom: 1px solid rgba(43, 41, 40, 0.12);
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 218, 98, 0.32), transparent 28%),
    linear-gradient(180deg, #fffaf3 0%, #f9f3ec 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 70px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.75rem, 6.5vw, 5.8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.highlight {
  position: relative;
  z-index: 1;
  display: inline-block;
}

.highlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -5px;
  bottom: 7px;
  left: -5px;
  height: 0.3em;
  border-radius: 52% 46% 46% 52%;
  background: var(--yellow);
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 680px;
  margin: 28px 0 0;
  color: #54504d;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translate(2px, 2px);
}

.button.primary {
  background: var(--yellow);
  box-shadow: 4px 5px 0 var(--ink);
}

.button.primary:hover {
  box-shadow: 2px 3px 0 var(--ink);
}

.button.secondary {
  background: var(--white);
  box-shadow: 4px 5px 0 rgba(38, 35, 34, 0.14);
}

.button.secondary:hover {
  box-shadow: 2px 3px 0 rgba(38, 35, 34, 0.14);
}

.button.dark {
  flex-shrink: 0;
  background: var(--ink);
  color: #fff;
  box-shadow: 5px 6px 0 var(--yellow);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-note span {
  color: var(--pink);
}

.hero-visual {
  position: relative;
  min-height: 510px;
  display: grid;
  place-items: center;
}

.mascot-card {
  position: relative;
  z-index: 2;
  width: min(430px, 92%);
  padding: 22px 22px 0;
  border: 3px solid var(--ink);
  border-radius: 46% 54% 48% 52% / 54% 43% 57% 46%;
  background: var(--yellow-soft);
  box-shadow: 11px 12px 0 var(--ink);
  transform: rotate(2deg);
}

.mascot-card img {
  width: 100%;
  filter: drop-shadow(0 15px 14px rgba(38, 35, 34, 0.12));
}

.scribble {
  position: absolute;
  border: 4px solid;
  border-radius: 50%;
}

.scribble-one {
  top: 48px;
  right: 12px;
  width: 160px;
  height: 72px;
  border-color: var(--blue);
  border-left-color: transparent;
  transform: rotate(18deg);
}

.scribble-two {
  bottom: 55px;
  left: 5px;
  width: 130px;
  height: 85px;
  border-color: var(--pink);
  border-right-color: transparent;
  transform: rotate(-24deg);
}

.floating-label {
  position: absolute;
  z-index: 4;
  padding: 8px 17px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
  box-shadow: 3px 4px 0 var(--ink);
}

.label-one {
  top: 28px;
  left: 3px;
  background: var(--blue-soft);
  transform: rotate(-8deg);
}

.label-two {
  right: -4px;
  bottom: 102px;
  background: var(--purple-soft);
  transform: rotate(8deg);
}

.label-three {
  bottom: 18px;
  left: 50px;
  background: var(--yellow);
  transform: rotate(-4deg);
}

.value-section {
  padding: 84px 0;
  background: var(--paper);
}

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

.section-heading.compact {
  max-width: 720px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.65rem);
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.section-description {
  max-width: 690px;
  margin: 15px 0 0;
  color: var(--muted);
}

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

.value-card {
  position: relative;
  min-height: 245px;
  padding: 30px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.value-card:nth-child(2) {
  background: var(--blue-soft);
}

.value-card:nth-child(3) {
  background: var(--purple-soft);
}

.value-number {
  display: inline-grid;
  min-width: 56px;
  min-height: 40px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 0.84rem;
  font-weight: 900;
}

.value-card h3 {
  margin: 25px 0 8px;
  font-size: 1.5rem;
}

.value-card p {
  margin: 0;
  color: #5b5754;
}

.cases-section {
  padding: 88px 0 110px;
  border-block: 1px solid rgba(43, 41, 40, 0.13);
  background: var(--paper-deep);
}

.cases-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.case-count {
  flex-shrink: 0;
  display: grid;
  min-width: 142px;
  padding: 16px 20px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--yellow);
  box-shadow: 4px 5px 0 var(--ink);
  text-align: center;
}

.case-count strong {
  font-size: 2rem;
  line-height: 1.1;
}

.case-count span {
  margin-top: 3px;
  font-size: 0.82rem;
  font-weight: 700;
}

.api-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -4px 0 25px;
  padding: 13px 18px;
  border: 1px dashed #a16f00;
  border-radius: 14px;
  background: #fff4c8;
  color: #6e510d;
  font-size: 0.9rem;
}

.api-notice strong {
  flex-shrink: 0;
}

.api-notice[hidden] {
  display: none;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-button {
  min-height: 42px;
  padding: 7px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
  background: var(--ink);
  color: #fff;
}

.search-box {
  display: flex;
  width: min(300px, 100%);
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.search-box svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

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

.case-card {
  min-width: 0;
}

.case-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: #fff;
  box-shadow: 6px 7px 0 rgba(38, 35, 34, 0.16);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.case-link:hover {
  transform: translateY(-5px);
  box-shadow: 9px 12px 0 rgba(38, 35, 34, 0.18);
}

.case-link:focus-visible,
.button:focus-visible,
.filter-button:focus-visible,
.search-box:focus-within,
.site-nav a:focus-visible {
  outline: 4px solid rgba(76, 127, 240, 0.4);
  outline-offset: 3px;
}

.thumbnail-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-bottom: 2px solid var(--ink);
  background: #e8e2dc;
}

.case-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.case-link:hover .case-thumbnail {
  transform: scale(1.04);
}

.play-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--ink);
}

.play-button svg {
  width: 25px;
  fill: currentColor;
}

.featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 11px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 0.75rem;
  font-weight: 900;
}

.case-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.case-meta,
.case-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.case-category {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #234fba;
  font-weight: 800;
}

.case-brand {
  margin: 17px 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.case-title {
  margin: 0;
  font-size: 1.27rem;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.case-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 12px 0 0;
  color: #625d59;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 20px;
}

.case-tag {
  padding: 4px 9px;
  border: 1px solid rgba(43, 41, 40, 0.2);
  border-radius: 999px;
  background: #faf7f3;
  color: #625d59;
  font-size: 0.72rem;
}

.case-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(43, 41, 40, 0.12);
  font-size: 0.82rem;
}

.case-views {
  color: var(--muted);
}

.case-cta {
  font-weight: 900;
}


.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 44px;
}

.pagination[hidden] {
  display: none;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.pagination-control,
.page-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.page-button {
  padding: 7px;
}

.pagination-control:hover:not(:disabled),
.page-button:hover,
.page-button.is-active {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.pagination-control:disabled {
  border-color: rgba(43, 41, 40, 0.22);
  color: rgba(43, 41, 40, 0.38);
  cursor: not-allowed;
}

.pagination-ellipsis {
  min-width: 25px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.pagination-control:focus-visible,
.page-button:focus-visible {
  outline: 4px solid rgba(76, 127, 240, 0.4);
  outline-offset: 3px;
}

.state-card {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 30px;
  border: 2px dashed rgba(43, 41, 40, 0.42);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.state-card[hidden] {
  display: none;
}

.state-card p,
.state-card h3 {
  margin: 0;
}

.state-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 900;
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(43, 41, 40, 0.15);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.contact-section {
  padding: 92px 0;
  background:
    linear-gradient(135deg, rgba(76, 127, 240, 0.12), transparent 42%),
    var(--paper);
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: clamp(32px, 6vw, 68px);
  border: 2px solid var(--ink);
  border-radius: 34px;
  background: var(--yellow);
  box-shadow: 10px 12px 0 var(--ink);
}

.contact-card h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.45rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.contact-card p:not(.eyebrow) {
  max-width: 700px;
  margin: 17px 0 0;
  color: #514a3e;
}

.site-footer {
  border-top: 1px solid rgba(43, 41, 40, 0.15);
  background: #252322;
  color: #fff;
}

.footer-inner {
  min-height: 145px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.footer-brand div {
  display: grid;
}

.footer-brand span,
.copyright {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--yellow);
}

.copyright {
  margin: 0;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 780px;
  }

  .hero-visual {
    width: min(560px, 100%);
    min-height: 480px;
    margin: 0 auto;
  }

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

  .contact-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 30px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    padding: 30px 0;
  }

  .copyright {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 70px;
  }

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 22px;
    border-bottom: 1px solid rgba(43, 41, 40, 0.15);
    background: var(--paper);
  }

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

  .site-nav a {
    padding: 13px 8px;
  }

  .nav-cta {
    margin-top: 8px;
    text-align: center;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 13vw, 4.25rem);
  }

  .hero-visual {
    min-height: 410px;
  }

  .mascot-card {
    width: min(365px, 88%);
  }

  .label-two {
    right: 4px;
  }

  .value-section,
  .cases-section,
  .contact-section {
    padding-block: 68px;
  }

  .value-grid,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .cases-heading,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .case-count {
    align-self: flex-start;
  }

  .search-box {
    width: 100%;
  }


  .pagination {
    align-items: stretch;
    gap: 9px;
  }

  .page-numbers {
    flex: 1;
    flex-wrap: wrap;
  }

  .pagination-control {
    padding-inline: 12px;
  }

  .api-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .copyright {
    grid-column: auto;
  }
}

@media (max-width: 460px) {
  .brand small {
    display: none;
  }


  .pagination-control span:not([aria-hidden="true"]) {
    display: none;
  }

  .pagination-control {
    min-width: 44px;
    padding: 7px;
  }


  .hero-actions .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 360px;
  }

  .floating-label {
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .contact-card {
    padding: 28px 22px;
  }

  .contact-card .button {
    width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
