/* ============ Piano Place ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f4f0;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --navy: #1c2333;
  --navy-2: #2b3350;
  --gold: #c8a24a;
  --gold-soft: #e8d9b5;
  --line: #e6e2da;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(28, 35, 51, 0.08);
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 140px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-logo {
  height: 128px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
}

.header-right { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  transition: all 0.15s;
}
.lang-switch:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.nav-list { display: flex; align-items: center; gap: 6px; }

.nav-list > li { position: relative; }

.nav-list a.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}

.nav-list a.nav-link:hover,
.nav-list a.nav-link.active { background: var(--bg-soft); color: var(--navy); }

.dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 8px; z-index: 50; }

.has-dropdown:hover .dropdown { display: block; }
.dropdown a { display: block; padding: 9px 12px; border-radius: 7px; font-size: 0.92rem; }
.dropdown a:hover { background: var(--bg-soft); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; transition: 0.2s; }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(160deg, rgba(28, 35, 51, 0.92) 0%, rgba(43, 51, 80, 0.82) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect width='120' height='120' fill='%231c2333'/%3E%3Cpath d='M0 60h120M60 0v120' stroke='%23333d5c' stroke-width='1'/%3E%3C/svg%3E");
  color: #fff;
  overflow: hidden;
}

.hero-inner { padding: 96px 0; max-width: 720px; }
.hero .kicker { color: var(--gold); font-weight: 600; letter-spacing: 3px; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 20px; }
.hero h1 .zh { display: block; font-size: 0.5em; color: var(--gold-soft); margin-top: 8px; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.85); margin-bottom: 32px; max-width: 560px; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d9b45c; transform: translateY(-2px); }
.btn-outline { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ============ Sections ============ */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img { height: 200px; display: grid; place-items: center; font-size: 3rem; color: #fff; }

.card-img-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-img-img.contain { object-fit: contain; background: #f6f4f0; }
.card-body { padding: 24px; }
.card-body h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card-body p { color: var(--muted); font-size: 0.95rem; }

/* Instrument tints */
.tint-piano { background: linear-gradient(135deg, #1c2333, #3a4568); }
.tint-strings { background: linear-gradient(135deg, #5a3b22, #8a5f3c); }
.tint-woodwind { background: linear-gradient(135deg, #2e4a3a, #4c7358); }
.tint-brass { background: linear-gradient(135deg, #6b4a12, #a07a24); }
.tint-chinese { background: linear-gradient(135deg, #5b2d2d, #8a4848); }
.tint-drums { background: linear-gradient(135deg, #23232e, #4a4a5c); }
.tint-guitar { background: linear-gradient(135deg, #3a2d1c, #66502f); }
.tint-navy { background: linear-gradient(135deg, var(--navy), var(--navy-2)); }

/* Pricing table */
.pricing-wrap { overflow-x: auto; }
table.pricing { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 640px; }
table.pricing th, table.pricing td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
table.pricing thead th { background: var(--navy); color: #fff; font-weight: 600; }
table.pricing tbody tr:nth-child(even) { background: #faf9f6; }
table.pricing td:first-child { font-weight: 600; text-align: left; }
table.pricing td.na { color: #c0bdb4; }

.perf-level { margin-top: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.perf-level h3 { margin-bottom: 16px; }
.perf-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.perf-row:last-child { border: 0; }
.perf-row .price { font-weight: 700; color: var(--navy); }

/* Course detail blocks */
.course-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 40px; margin-bottom: 28px; }
.course-block h2 { font-size: 1.6rem; color: var(--navy); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--gold); display: inline-block; }
.course-meta { margin-bottom: 18px; }
.course-meta strong { color: var(--navy); }
.course-meta span { color: var(--muted); }
.course-highlights { list-style: none; }
.course-highlights li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--muted); }
.course-highlights li::before { content: '♪'; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }
.course-highlights li b { color: var(--ink); }

/* Teacher cards */
.teacher { text-align: center; padding: 8px; }
.teacher .avatar { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; color: #fff; font-size: 2rem; font-family: var(--font-head); }
.teacher h3 { font-size: 1.1rem; }
.teacher .inst { color: var(--muted); font-size: 0.9rem; margin: 6px 0 12px; }
.teacher p { font-size: 0.9rem; color: var(--muted); }

/* Contact / footer */
.footer { background: var(--navy); color: #fff; padding: 72px 0 32px; }
.footer .grid { gap: 48px; }
.footer h4 { color: var(--gold); font-family: var(--font-body); letter-spacing: 2px; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 18px; }
.footer p, .footer li { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 56px; padding-top: 24px; text-align: center; color: rgba(255,255,255,0.55); font-size: 0.85rem; }

/* Forms */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.9rem; margin-bottom: 6px; font-weight: 500; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; background: #fff;
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }

/* Page hero (subpages) */
.page-hero { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; padding: 72px 0; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-hero h1 .zh { display: block; font-size: 0.55em; color: var(--gold-soft); margin-top: 8px; }
.page-hero p { color: rgba(255,255,255,0.8); margin-top: 14px; }

/* Responsive */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-list { display: none; position: absolute; top: 140px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 16px 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-list.open { display: flex; }
  .dropdown { position: static; display: none; box-shadow: none; border: 0; padding-left: 16px; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-toggle { display: block; }
  .hero { min-height: 60vh; }
  .section { padding: 60px 0; }
}

/* ============ Music Dictionary ============ */
.dict-toolbar { margin-bottom: 20px; }
.dict-search {
  width: 100%; padding: 16px 20px; font-size: 1.05rem;
  border: 2px solid var(--line); border-radius: 40px; font-family: inherit;
}
.dict-search:focus { outline: none; border-color: var(--gold); }

.dict-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dict-cat {
  padding: 8px 16px; border-radius: 30px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 0.88rem; font-family: inherit;
  transition: all 0.15s;
}
.dict-cat:hover { border-color: var(--gold); }
.dict-cat.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.dict-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }

.dict-index { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 24px; }
.dict-letter {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: var(--navy);
}
.dict-letter:hover { background: var(--gold-soft); }
.dict-letter.active { background: var(--navy); color: #fff; }

.dict-results { display: grid; gap: 14px; }
.dict-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; position: relative;
  transition: box-shadow 0.15s, transform 0.15s;
}
.dict-card:hover { box-shadow: var(--shadow); }
.dict-term { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 12px; }
.dict-zh { color: var(--gold); font-weight: 600; margin: 4px 0 6px; }
.dict-def { color: var(--muted); font-size: 0.95rem; }
.dict-badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-soft); color: var(--muted);
  font-size: 0.72rem; padding: 4px 10px; border-radius: 20px;
}
.dict-img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.dict-empty { text-align: center; color: var(--muted); padding: 40px 0; }

@media (max-width: 720px) {
  .dict-badge { position: static; display: inline-block; margin-top: 10px; }
}
