:root {
  --ink: #241b2e;
  --muted: #6b5d78;
  --line: #e6dcee;
  --paper: #faf8fb;
  --paper-deep: #f3edf7;
  --violet: #5b3a7d;
  --violet-deep: #33204a;
  --violet-darker: #241533;
  --gold: #cfa136;
  --gold-light: #f0cf7a;
  --white: #ffffff;
  --good: #1f7a4c;
  --good-bg: #e7f5ed;
  --shadow: 0 1px 2px rgba(51, 32, 74, 0.06), 0 8px 24px rgba(51, 32, 74, 0.07);
  --shadow-hover: 0 4px 10px rgba(51, 32, 74, 0.09), 0 16px 36px rgba(51, 32, 74, 0.13);
}

* {
  box-sizing: border-box;
}

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

h1, h2, h3, .brand, .crystal-card-title {
  font-family: "Noto Serif TC", "Noto Sans TC", "PingFang TC", serif;
}

a {
  color: var(--violet);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(42, 32, 51, 0.08);
  background: rgba(250, 248, 251, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--violet-deep);
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.brand-word {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.94rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--violet-deep);
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 85% 0%, rgba(240, 207, 122, 0.16), transparent 60%),
    radial-gradient(70% 80% at 8% 100%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(155deg, var(--violet-darker) 0%, var(--violet-deep) 46%, var(--violet) 100%);
  color: #fdfdfd;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 70%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 9vh 0 7vh;
}

.eyebrow {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold-light);
  display: inline-block;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.hero p {
  max-width: 700px;
  margin: 20px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--violet-darker);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(207, 161, 54, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(207, 161, 54, 0.4);
}

.button.secondary {
  color: #fdfdfd;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

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

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.band {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}

.band h2 {
  margin: 0 0 22px;
  font-weight: 700;
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  line-height: 1.35;
  color: var(--violet-darker);
}

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

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

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

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.4;
  color: var(--violet-darker);
}

.card p {
  margin: 0;
}

.card p + p {
  margin-top: 10px;
}

/* 水晶品種卡片：帶縮圖，用於首頁/圖鑑格狀清單 */
.crystal-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crystal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(91, 58, 125, 0.28);
}

.crystal-card-media {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--paper-deep);
  overflow: hidden;
}

.crystal-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.crystal-card:hover .crystal-card-media img {
  transform: scale(1.05);
}

.crystal-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 20px;
}

.crystal-card-title {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--violet-darker);
}

.crystal-card-text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.crystal-card-link {
  margin-top: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--violet);
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--good-bg);
  color: var(--good);
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #efe6f3;
  color: var(--violet-deep);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: start;
}

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

.toc {
  position: sticky;
  top: 90px;
  border-left: 3px solid var(--violet);
  padding: 16px 0 16px 18px;
  color: var(--muted);
  font-size: 0.93rem;
  background: var(--paper-deep);
  border-radius: 0 10px 10px 0;
}

.toc strong {
  color: var(--violet-darker);
}

.toc a {
  display: block;
  margin: 9px 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.toc a:hover {
  color: var(--violet-deep);
}

.content h2 {
  margin-top: 36px;
  color: var(--violet-darker);
}

.content h3 {
  margin-top: 26px;
  margin-bottom: 8px;
  color: var(--violet-deep);
  font-size: 1.12rem;
}

.figure {
  margin: 0 0 28px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 420px;
}

.figure img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.note-band {
  border-left: 4px solid var(--gold);
  background: #fbf3e0;
  padding: 20px 22px;
  border-radius: 0 12px 12px 0;
}

.contact-cta {
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid rgba(91, 58, 125, 0.22);
  border-radius: 14px;
  background: linear-gradient(160deg, #f6f0f9, #efe4f4);
}

.contact-cta .button {
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(51, 32, 74, 0.28);
}

.calc-hint {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 12px;
}

.site-footer {
  background: linear-gradient(180deg, var(--violet-deep), var(--violet-darker));
  color: #ece5f0;
  margin-top: 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0;
}

.footer-inner strong {
  font-family: "Noto Serif TC", serif;
  font-size: 1.1rem;
}

.footer-inner a {
  color: var(--gold-light);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-disclaimer {
  font-size: 0.82rem;
  color: #c9bcd4;
  margin-top: 10px;
  line-height: 1.6;
}

@media (max-width: 840px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid,
  .grid.two,
  .grid.three,
  .article,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}
