/*
Theme Name: Guitar
Theme URI: https://www.jitaka.com/
Author: Jitaka
Description: 面向吉他乐谱、在线播放、音频、乐谱购买及会员服务的 WordPress 主题。
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: guitar
*/

:root {
  color-scheme: light;
  --gt-bg: #f5f6f8;
  --gt-surface: #fff;
  --gt-surface-soft: #f0f1f3;
  --gt-text: #17181b;
  --gt-muted: #717680;
  --gt-primary: #e34b3f;
  --gt-primary-dark: #c9372d;
  --gt-border: #e7e8eb;
  --gt-shadow: 0 16px 40px rgba(27, 31, 38, .07);
}

[data-theme="dark"] {
  color-scheme: dark;
  --gt-bg: #14171c;
  --gt-surface: #1d2128;
  --gt-surface-soft: #252a32;
  --gt-text: #f3f4f6;
  --gt-muted: #a8b0bd;
  --gt-primary: #ff7469;
  --gt-primary-dark: #ff8d84;
  --gt-border: #343a45;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--gt-bg); color: var(--gt-text); font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--gt-primary); }
.site-header { position: sticky; top: 0; z-index: 500; background: color-mix(in srgb, var(--gt-surface) 88%, transparent); backdrop-filter: blur(18px); }
.site-header, .site-footer { background: var(--gt-surface); border-color: var(--gt-border); }
.site-header { border-bottom: 1px solid var(--gt-border); }
.site-footer { border-top: 1px solid var(--gt-border); }
.site-header__inner, .site-footer__inner, .site-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header__inner { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.site-branding { margin-right: auto; }
.site-title { color: var(--gt-text); font-size: 1.2rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.custom-logo { display: block; width: auto; max-height: 38px; }
.site-navigation ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.site-navigation a { color: var(--gt-muted); font-size: .92rem; font-weight: 600; text-decoration: none; transition: color .2s ease; }
.site-navigation a:hover, .site-navigation .current-menu-item > a { color: var(--gt-text); }
.theme-toggle, .menu-toggle { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid var(--gt-border); border-radius: 50%; background: var(--gt-surface); color: var(--gt-text); cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--gt-primary); transform: translateY(-1px); }
.menu-toggle { display: none; gap: 3px; align-content: center; }
.menu-toggle > span:not(.screen-reader-text) { width: 16px; height: 1.5px; background: currentColor; }
.site-main { min-height: calc(100vh - 145px); padding: 34px 0 64px; }
.entry-card { margin-bottom: 24px; padding: 24px; border: 1px solid var(--gt-border); border-radius: 12px; background: var(--gt-surface); }
.entry-title { margin-top: 0; }
.entry-meta { color: var(--gt-muted); font-size: .9rem; }
.site-footer__inner { padding: 24px 0; color: var(--gt-muted); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.home-shell { display: grid; gap: 54px; }
.home-intro { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 48px; align-items: center; overflow: hidden; padding: 38px 42px; border: 1px solid var(--gt-border); border-radius: 24px; background: var(--gt-surface); box-shadow: var(--gt-shadow); }
.home-intro::after { position: absolute; right: -70px; top: -105px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(227,75,63,.16), rgba(227,75,63,0) 68%); content: ""; pointer-events: none; }
.home-eyebrow, .home-section__kicker { display: block; color: var(--gt-primary); font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.home-intro h1 { max-width: 620px; margin: 8px 0 7px; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.25; letter-spacing: -.045em; }
.home-intro p { max-width: 650px; margin: 0; color: var(--gt-muted); font-size: .96rem; }
.home-search { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 16px; border: 1px solid var(--gt-border); border-radius: 14px; background: var(--gt-bg); }
.home-search svg { width: 19px; fill: none; stroke: var(--gt-muted); stroke-linecap: round; stroke-width: 1.8; }
.home-search input { min-width: 0; flex: 1; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--gt-text); font: inherit; font-size: .88rem; }
.home-search button { padding: 9px 17px; border: 0; border-radius: 10px; background: var(--gt-primary); color: #fff; font-weight: 700; cursor: pointer; }
.home-search button:hover { background: var(--gt-primary-dark); }
.home-section__header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.home-section__header h2 { margin: 3px 0 0; font-size: 1.55rem; line-height: 1.3; letter-spacing: -.035em; }
.home-section__header > a { color: var(--gt-muted); font-size: .86rem; font-weight: 700; text-decoration: none; }
.home-section__header > a:hover { color: var(--gt-primary); }
.score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.score-card { min-width: 0; overflow: hidden; border: 1px solid var(--gt-border); border-radius: 18px; background: var(--gt-surface); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.score-card:hover { border-color: color-mix(in srgb, var(--gt-primary) 35%, var(--gt-border)); box-shadow: var(--gt-shadow); transform: translateY(-3px); }
.score-card--featured { grid-column: span 2; grid-row: span 2; }
.score-card__media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(145deg, #252b34, #111318); }
.score-card--featured .score-card__media { aspect-ratio: 16 / 8.6; }
.score-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.score-card:hover .score-card__media img { transform: scale(1.035); }
.score-card__placeholder { display: grid; width: 100%; height: 100%; place-items: center; background: linear-gradient(135deg, #262b34, #15181e); }
.score-card__placeholder svg { width: 62px; fill: rgba(255,255,255,.72); }
.score-card__type { position: absolute; top: 13px; left: 13px; padding: 4px 9px; border-radius: 999px; background: rgba(16,18,22,.76); color: #fff; font-size: .68rem; font-weight: 700; backdrop-filter: blur(8px); }
.score-card__body { padding: 17px 18px 16px; }
.score-card--featured .score-card__body { padding: 21px 23px 19px; }
.score-card__artist { display: inline-block; margin-bottom: 4px; color: var(--gt-primary); font-size: .72rem; font-weight: 700; text-decoration: none; }
.score-card h3 { margin: 0; font-size: 1.04rem; line-height: 1.4; letter-spacing: -.025em; }
.score-card--featured h3 { font-size: 1.35rem; }
.score-card h3 a, .article-row h3 a { color: var(--gt-text); text-decoration: none; }
.score-card p { display: -webkit-box; overflow: hidden; margin: 7px 0 14px; color: var(--gt-muted); font-size: .82rem; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.score-card footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--gt-border); color: var(--gt-muted); font-size: .75rem; }
.score-card footer strong { color: var(--gt-primary); font-size: .82rem; }
.home-articles { padding-top: 2px; }
.article-list { overflow: hidden; border: 1px solid var(--gt-border); border-radius: 20px; background: var(--gt-surface); }
.article-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 18px; }
.article-row + .article-row { border-top: 1px solid var(--gt-border); }
.article-row__media { display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--gt-surface-soft); }
.article-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.article-row:hover img { transform: scale(1.04); }
.article-row__placeholder { display: grid; height: 100%; place-items: center; color: var(--gt-muted); font-size: .68rem; font-weight: 800; letter-spacing: .2em; }
.article-row__body { min-width: 0; align-self: center; }
.article-row__meta { display: flex; gap: 10px; color: var(--gt-muted); font-size: .7rem; }
.article-row__meta span { color: var(--gt-primary); font-weight: 800; }
.article-row h3 { margin: 5px 0 4px; font-size: 1.08rem; line-height: 1.45; letter-spacing: -.02em; }
.article-row p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--gt-muted); font-size: .82rem; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-empty { padding: 42px 24px; border: 1px dashed var(--gt-border); border-radius: 18px; background: var(--gt-surface); color: var(--gt-muted); text-align: center; }

@media (max-width: 900px) {
  .home-intro { grid-template-columns: 1fr; gap: 24px; padding: 32px; }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-card--featured { grid-column: span 2; }
}

@media (max-width: 720px) {
  .site-header__inner, .site-footer__inner, .site-main { width: min(100% - 28px, 1180px); }
  .site-header__inner { min-height: 60px; gap: 12px; }
  .menu-toggle { display: grid; order: 3; }
  .theme-toggle { order: 2; }
  .site-navigation { position: absolute; top: calc(100% + 1px); left: 0; display: none; width: 100%; padding: 10px 14px 16px; background: var(--gt-surface); border-bottom: 1px solid var(--gt-border); box-shadow: 0 14px 28px rgba(20,24,30,.08); }
  .site-navigation.is-open { display: block; }
  .site-navigation ul { display: grid; gap: 2px; }
  .site-navigation a { display: block; padding: 10px 8px; }
  .site-main { padding-top: 20px; }
  .home-shell { gap: 40px; }
  .home-intro { gap: 22px; padding: 25px 21px; border-radius: 19px; }
  .home-intro h1 { font-size: 1.7rem; }
  .home-search { padding-left: 12px; }
  .home-search button { padding-inline: 13px; }
  .score-grid { grid-template-columns: 1fr; }
  .score-card--featured { grid-column: auto; grid-row: auto; }
  .score-card--featured .score-card__media { aspect-ratio: 16 / 9; }
  .score-card--featured h3 { font-size: 1.12rem; }
  .score-card--featured .score-card__body { padding: 17px 18px 16px; }
  .article-row { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 13px; }
  .article-row p { -webkit-line-clamp: 1; }
}

@media (max-width: 430px) {
  .home-search svg { display: none; }
  .article-row { grid-template-columns: 92px minmax(0, 1fr); }
  .article-row h3 { overflow: hidden; font-size: .94rem; white-space: nowrap; text-overflow: ellipsis; }
  .article-row p { display: none; }
}
