/* 3/4 音樂藝術工作室 — 節奏色紙
   UI Guideline：docs/ui-guideline.md（v1.0） */

:root {
  --paper: #FDFBF6;
  --ink: #26221C;
  --muted: #5E564A;
  --line: #E9E2D4;
  --card: #FFFFFF;

  /* 課程色：base 做色塊、deep 做文字 */
  --amber: #D98E2B;      --amber-deep: #8A5710;   /* 鋼琴 ● */
  --vermilion: #C4442C;  --vermilion-deep: #9E3117; /* 律動 ▲ */
  --indigo: #2E5E8C;     --indigo-deep: #24496E;  /* 繪本錄音 ■ */
  --moss: #4A7350;       --moss-deep: #375A3C;    /* 人聲 ◗ */

  --font-display: "Huninn", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", sans-serif;

  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-paper: 0 2px 0 var(--line);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400; /* Huninn 單權重，禁止假粗體 */
  line-height: 1.3;
}

.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;
}

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 按鈕 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 0.8rem 2rem;
  min-height: 44px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: #FFFFFF;
}

.btn-primary:hover { background: var(--muted); }

.btn-outline {
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Hero ---------- */

.hero {
  min-height: 78svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4.5rem 1.5rem 3.5rem;
}

.hero-inner { width: min(46rem, 100%); }

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4rem);
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* 「3/4」琥珀圓貼紙 */
.sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15em;
  height: 2.15em;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.58em;
  transform: rotate(-5deg);
}

.tagline {
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--muted);
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

/* 節奏卡形狀列：四拍貼上 */
.rhythm-strip {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
  gap: 2.25rem;
}

.rhythm-strip svg { width: 2.25rem; height: 2.25rem; }
/* 手貼傾斜角度寫在 SVG 內部 transform，避免與開場動畫衝突 */

/* ---------- 題辭 ---------- */

.motto {
  text-align: center;
  padding: 4.5rem 1.5rem;
  border-top: 1px solid var(--line);
}

.motto-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
  line-height: 2;
}

/* ---------- 課程（節奏卡） ---------- */

.courses {
  width: min(58rem, 100%);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5.5rem;
}

.courses h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 3rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-paper);
  padding: 2rem;
}

.card-shape {
  width: 2rem;
  height: 2rem;
  display: block;
  margin-bottom: 1.25rem;
  transform: rotate(-4deg);
}

.card h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

.card ul { list-style: none; }

.card li {
  padding-left: 1.1rem;
  position: relative;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent, var(--ink));
}

.age {
  margin-top: 1.25rem;
  display: inline-block;
  font-size: 0.875rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.9rem;
}

/* 各卡課程色 */
.card-piano    { --accent: var(--amber);     --accent-deep: var(--amber-deep); }
.card-rhythm   { --accent: var(--vermilion); --accent-deep: var(--vermilion-deep); }
.card-storybook{ --accent: var(--indigo);    --accent-deep: var(--indigo-deep); }
.card-vocal    { --accent: var(--moss);      --accent-deep: var(--moss-deep); }

/* ---------- 聯絡 ---------- */

.contact {
  text-align: center;
  padding: 4.5rem 1.5rem;
  border-top: 1px solid var(--line);
}

.contact h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: 0.08em;
}

.contact-lead {
  color: var(--muted);
  margin-top: 0.75rem;
}

.contact-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-name { font-family: var(--font-display); color: var(--ink); }

.copyright { margin-top: 0.35rem; font-size: 0.8rem; }

/* ---------- 手機浮動撥號鈕 ---------- */

.call-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--ink);
  color: #FFFFFF;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(38, 34, 28, 0.3);
  transition: background-color 0.2s ease;
}

.call-fab:hover { background: var(--muted); }

.call-fab svg { width: 1.5rem; height: 1.5rem; }

/* ---------- 開場：節奏卡依拍貼上 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-title, .tagline, .hero-actions {
    opacity: 0;
    animation: rise-in 0.6s ease-out forwards;
  }
  .hero-title { animation-delay: 0.1s; }
  .tagline { animation-delay: 0.25s; }
  .hero-actions { animation-delay: 0.4s; }

  .rhythm-strip svg {
    opacity: 0;
    animation: shape-stick 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
  .rhythm-strip .shape-1 { animation-delay: 0.65s; }
  .rhythm-strip .shape-2 { animation-delay: 0.80s; }
  .rhythm-strip .shape-3 { animation-delay: 0.95s; }
  .rhythm-strip .shape-4 { animation-delay: 1.10s; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes shape-stick {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: none; }
}

/* ---------- 捲動浮現（漸進增強） ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .call-fab { transition: none; }
}

/* ---------- 響應式 ---------- */

@media (max-width: 48rem) {
  .card-grid { grid-template-columns: 1fr; }
  .call-fab { display: flex; }
}
