:root {
  --bg: #f7f2e8;
  --surface: #fffdf8;
  --surface-strong: #f1e7d5;
  --text: #2f2624;
  --muted: #6b5b57;
  --primary: #66bcb3;
  --accent: #f25863;
  --border: rgba(47, 38, 36, 0.1);
  --shadow: 0 18px 40px rgba(72, 44, 41, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(102, 188, 179, 0.18), transparent 28%),
    linear-gradient(180deg, #fcf9ea 0%, #f8f2e7 100%);
}

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

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

.site-header,
.site-footer,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav,
.social-links,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-nav a,
.social-links a,
.back-link {
  color: var(--muted);
}

.page-shell {
  padding-bottom: 72px;
}

.hero,
.detail-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 32px 0 56px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

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

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.04;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  margin-bottom: 12px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.hero-text,
.brand-intro p,
.section-heading p,
.card-body p,
.detail-section p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-preview,
.detail-preview {
  background: linear-gradient(145deg, rgba(255, 253, 248, 0.95), rgba(241, 231, 213, 0.9));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.button.primary {
  background: var(--primary);
  color: #17332f;
}

.button.secondary {
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.85);
}

.brand-intro,
.detail-section {
  display: grid;
  gap: 18px;
  padding: 32px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.brand-intro {
  grid-template-columns: 1.4fr 0.8fr;
  align-items: center;
}

.social-links a {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.templates-section {
  padding-top: 56px;
}

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

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

.template-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(72, 44, 41, 0.12);
  border-color: rgba(102, 188, 179, 0.32);
}

.card-cover {
  display: block;
  padding: 14px;
  background: linear-gradient(180deg, rgba(102, 188, 179, 0.16), rgba(242, 88, 99, 0.08));
}

.card-cover img {
  border-radius: 16px;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(102, 188, 179, 0.12);
  color: #21554f;
  font-size: 0.9rem;
}

.detail-shell {
  padding-top: 12px;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
}

.site-footer {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  align-items: center;
  padding: 0 0 32px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero,
  .detail-hero,
  .brand-intro,
  .template-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .template-grid {
    display: grid;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .page-shell {
    width: min(1120px, calc(100% - 20px));
  }

  .hero,
  .detail-hero {
    padding-top: 16px;
    padding-bottom: 40px;
  }

  .brand-intro,
  .detail-section {
    padding: 24px;
  }
}
