/* Piano Lessons by Grace — site styles.
   Palette taken from a grand piano: lacquer indigo, the crimson felt strip above the keys,
   brass pedals, ivory/ebony keys. Body face Atkinson Hyperlegible (built for easy reading). */

:root {
  /* Warm beige, taken from the old Wix site: beige #E6DECA, brown #A86E58, plum #6830A1 */
  --ink: #3a2a22;        /* deep brown for headings + footer */
  --ink-2: #7a4a38;
  --paper: #fbf8f2;
  --wash: #f3ece0;
  --beige: #e6deca;
  --beige-2: #efe7d6;
  --brown: #a86e58;
  --plum: #6830a1;
  --felt: #a6283e;       /* piano key felt, used only on the keyboard strip */
  --brass: #a86e58;
  --brass-soft: #f3ece0;
  --text: #2e2420;
  --muted: #6b5e55;
  --line: #e0d4bf;
  --ok: #2f7a4f;

  --serif: "Gloock", "Noto Serif TC", "Noto Serif SC", Georgia, serif;
  --sans: "Atkinson Hyperlegible", "Noto Sans TC", "Noto Sans SC", system-ui, sans-serif;

  --step--1: clamp(0.9rem, 0.87rem + 0.15vw, 0.98rem);
  --step-0: clamp(1.06rem, 1rem + 0.25vw, 1.18rem);
  --step-1: clamp(1.3rem, 1.18rem + 0.55vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.45rem + 1.2vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.4vw, 3.6rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
}

:lang(zh-Hant) { --serif: "Noto Serif TC", serif; --sans: "Noto Sans TC", "Atkinson Hyperlegible", system-ui, sans-serif; }
:lang(zh-Hans) { --serif: "Noto Serif SC", serif; --sans: "Noto Sans SC", "Atkinson Hyperlegible", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
}
:lang(zh) body, body:lang(zh-Hant), body:lang(zh-Hans) { line-height: 1.85; letter-spacing: 0.02em; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: var(--step-3); letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
:lang(zh-Hant) h1, :lang(zh-Hant) h2, :lang(zh-Hant) h3,
:lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(zh-Hans) h3 { font-weight: 600; letter-spacing: 0.04em; line-height: 1.35; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brass); color: var(--ink); padding: 0.6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }

/* ---------- header ---------- */
.site-head { background: var(--beige); color: var(--ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(58,42,34,0.08); }
.site-head .wrap { display: flex; align-items: center; gap: 1rem 2rem; padding-block: 0.7rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brass); }
.brand b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; display: block; line-height: 1.1; }
.brand small { color: var(--plum); font-size: 0.85rem; }
.nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--brown); }
.lang { display: flex; border: 1px solid var(--brown); border-radius: 999px; overflow: hidden; }
.lang a { color: var(--ink); text-decoration: none; padding: 0.2rem 0.75rem; font-size: 0.95rem; }
.lang a[aria-current="true"] { background: var(--brown); color: #fff; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .site-head .wrap { gap: 0.75rem 1rem; }
  .menu-btn { display: inline-flex; background: none; color: var(--ink); border: 1px solid var(--brown); border-radius: 8px; padding: 0.35rem 0.7rem; font: inherit; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding-bottom: 0.5rem; max-height: calc(100vh - 5rem); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 0.5rem 0; font-size: 1.1rem; }
}

/* ---------- hero ---------- */
.hero { background: var(--beige-2); color: var(--text); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.hero h1 { color: var(--ink); max-width: 16ch; }
.hero p.lede { font-size: var(--step-1); color: var(--text); max-width: 34ch; line-height: 1.45; }
.hero .facts { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero .facts li { border: 1px solid var(--brown); color: var(--ink-2); background: var(--paper); border-radius: 999px; padding: 0.25rem 0.85rem; font-size: var(--step--1); }
.hero-photo { position: relative; }
.hero-photo img { border-radius: 200px 200px var(--radius) var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 200px; }
}

.btns { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--brown); color: #fff; text-decoration: none; font-weight: 700; padding: 0.85rem 1.4rem; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; min-height: 48px; }
.btn:hover { background: #8f5a46; }
.btn.felt { background: var(--plum); color: #fff; }
.btn.felt:hover { background: #532680; }
.link-light { color: var(--plum); }

/* ---------- the keyboard (the one bold thing) ---------- */
.keys-wrap { position: relative; }
.keys-felt { height: 10px; background: var(--felt); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25); }
.keys { position: relative; display: flex; height: clamp(90px, 14vw, 150px); background: #000; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.key { flex: 1 1 0; border: 0; padding: 0; margin: 0; background: linear-gradient(#fafafa, #fff 70%, #ececec); border-right: 1px solid #c9cad6; border-radius: 0 0 6px 6px; cursor: pointer; position: relative; font: inherit; }
.key:last-child { border-right: 0; }
.key.down, .key:active { background: linear-gradient(#e9e9ef, #f6f6f9); box-shadow: inset 0 4px 6px rgba(0,0,0,0.18); }
.key .nm { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 0.75rem; color: var(--felt); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.key.down .nm { opacity: 1; transition: none; }
.bk { position: absolute; top: 0; height: 62%; border: 0; padding: 0; background: linear-gradient(#2b2b2b, #000 85%); border-radius: 0 0 5px 5px; cursor: pointer; z-index: 2; box-shadow: 0 3px 4px rgba(0,0,0,0.4); }
.bk.down, .bk:active { background: linear-gradient(#1a1a1a, #3a3a3a); height: 60%; }
.keys-hint { position: absolute; right: var(--gutter); top: -2.2rem; color: var(--ink-2); font-size: var(--step--1); }
@media (max-width: 760px) { .keys-hint { position: static; display: block; text-align: center; padding: 0.4rem 0 0.6rem; background: var(--beige-2); } }

/* ---------- sections ---------- */
section { padding-block: clamp(3rem, 8vw, 5.5rem); }
section.wash { background: var(--wash); }
.section-head { max-width: 46rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); }

.offer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; }
.offer article { border-top: 3px solid var(--brown); padding-top: 1rem; }
.offer h3 { margin-bottom: 0.35rem; }
.offer p { margin: 0; color: var(--muted); }
@media (max-width: 700px) { .offer { grid-template-columns: 1fr; } }

.langs-band { background: var(--brown); color: #fff; padding-block: 2.5rem; }
.langs-band .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.langs-band b { display: block; font-family: var(--serif); font-weight: 400; font-size: var(--step-2); color: #fff; line-height: 1.2; }
.langs-band span { color: #f6ebe4; font-size: var(--step--1); }
@media (max-width: 600px) { .langs-band .wrap { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split.flip { grid-template-columns: 1.1fr 0.9fr; }
.split img { border-radius: var(--radius); }
@media (max-width: 800px) { .split, .split.flip { grid-template-columns: 1fr; } }

.creds { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.creds li { padding: 0.6rem 0 0.6rem 1.6rem; position: relative; border-bottom: 1px solid var(--line); }
.creds li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 0.6rem; height: 0.6rem; background: var(--brown); border-radius: 2px; transform: rotate(45deg); }

.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.quotes figure { margin: 0; background: var(--paper); border-radius: var(--radius); padding: 1.75rem; border-left: 4px solid var(--brown); }
.quotes blockquote { margin: 0 0 1rem; font-size: var(--step-0); }
.quotes figcaption b { display: block; color: var(--ink); }
.quotes figcaption span { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.gallery img { border-radius: var(--radius); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* ---------- fees: bar length = lesson length ---------- */
.fees { list-style: none; padding: 0; margin: 0 0 2rem; max-width: 46rem; }
.fees li { display: grid; grid-template-columns: 7.5rem 1fr 5rem; align-items: center; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.fees .len { font-weight: 700; color: var(--ink); }
.fees .bar { height: 14px; background: var(--beige); border-radius: 999px; overflow: hidden; }
.fees .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brown), var(--ink-2)); border-radius: 999px; }
.fees .price { text-align: right; font-family: var(--serif); font-size: var(--step-1); color: var(--ink-2); }
@media (max-width: 480px) { .fees li { grid-template-columns: 6rem 1fr 4.2rem; gap: 0.6rem; } }
.note { background: var(--wash); border-radius: var(--radius); padding: 1.25rem 1.5rem; max-width: 46rem; }
.note p:last-child { margin: 0; }

/* ---------- posts ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2.25rem 2rem; }
.post-card { text-decoration: none; color: inherit; display: block; }
.post-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: var(--radius); margin-bottom: 0.9rem; background: var(--wash); }
.post-card h3 { margin-bottom: 0.25rem; }
.post-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.post-card time, .post-meta { color: var(--muted); font-size: var(--step--1); }
.article { max-width: 44rem; margin-inline: auto; }
.article img { border-radius: var(--radius); margin: 1.5rem 0; }
.article h2 { font-size: var(--step-1); margin-top: 1.8em; }
.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin-bottom: 0.35rem; }
.article .video { position: relative; aspect-ratio: 16 / 9; margin: 1.5rem 0; }
.article .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.back { display: inline-block; margin-bottom: 1.5rem; }
.lang-note { background: var(--wash); border-radius: 10px; padding: 0.75rem 1rem; color: var(--muted); font-size: var(--step--1); }

/* ---------- page head (inner pages) ---------- */
.page-head { background: var(--beige-2); color: var(--text); padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { color: var(--ink); margin: 0; }
.page-head p { color: var(--muted); margin: 0.75rem 0 0; font-size: var(--step-1); line-height: 1.45; }
.page-head + .keys-felt { margin: 0; }

/* ---------- form ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; max-width: 46rem; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 0.3rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; font: inherit; color: var(--text); padding: 0.75rem 0.85rem; border: 1.5px solid #cbbda6; border-radius: 10px; background: #fff; min-height: 48px; }
.form textarea { min-height: 8rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: 3px solid var(--beige); outline-offset: 0; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 700; color: var(--ink); margin-bottom: 0.4rem; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.checks label { font-weight: 400; display: inline-flex; gap: 0.45rem; align-items: center; margin: 0; color: var(--text); }
.checks input { width: 1.2rem; height: 1.2rem; min-height: 0; accent-color: var(--plum); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; margin: 0; padding: 0.9rem 1.1rem; border-radius: 10px; display: none; }
.form-status.ok { display: block; background: #e5f3ea; color: var(--ok); }
.form-status.err { display: block; background: #fbe7ea; color: #9a2035; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

.contact-side { background: var(--wash); border-radius: var(--radius); padding: 1.75rem; }
.contact-side h3 { margin-top: 0; }
.contact-side p { margin-bottom: 0.75rem; }

/* ---------- CTA + footer ---------- */
.cta { background: var(--brown); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { margin-inline: auto; color: #f8ece5; }
.cta .btn { background: #fff; color: var(--ink-2); }
.cta .btn:hover { background: var(--beige); }

.site-foot { background: var(--ink); color: #e6dccb; padding-block: 3rem 2rem; font-size: var(--step--1); }
.site-foot .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-foot a { color: #fff; }
.site-foot h2 { color: var(--beige); font-size: 1.05rem; font-family: var(--sans); font-weight: 700; margin-bottom: 0.6rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 0.35rem; }
.site-foot .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.25rem; margin-top: 0.5rem; color: #b8a994; }
@media (max-width: 700px) { .site-foot .wrap { grid-template-columns: 1fr; } }
:lang(en) .brand small { font-style: italic; }
