/* =========================================================================
   Piano Tuning Nashville — "Ebony & Ivory" concert-hall theme
   Ebony charcoal + warm ivory + brass accent, with a restrained slate-blue.
   Content is visible with CSS alone; animations only enhance.
   ========================================================================= */

:root {
  --ink: #17151d;
  --ink-2: #221f2b;
  --ink-3: #2c2836;
  --ivory: #f8f4ec;
  --ivory-2: #fdfbf6;
  --cream-line: #e7e0d1;
  --brass: #b0873f;
  --brass-2: #caa25a;
  --brass-soft: #f0e6d2;
  --slate: #35668c;
  --slate-2: #274d6b;
  --text: #2a2631;
  --muted: #675f6d;
  --on-dark: #f4efe4;
  --on-dark-muted: #b4ab9c;
  --shadow-sm: 0 1px 2px rgba(23, 21, 29, .06), 0 2px 8px rgba(23, 21, 29, .05);
  --shadow-md: 0 6px 24px rgba(23, 21, 29, .10);
  --shadow-lg: 0 18px 48px rgba(23, 21, 29, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1140px;
  --prose: 720px;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.72;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate); text-decoration: none; }
a:hover { color: var(--brass); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.18; color: var(--ink); letter-spacing: .1px; }
strong { color: var(--ink); font-weight: 700; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

/* accessibility skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--brass); color: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* ---- Safeguard: never leave content hidden waiting on JS (belt & suspenders) ---- */
[data-aos] { opacity: 1 !important; transform: none !important; }

/* =========================== header / nav =========================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 244, 236, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--cream-line);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: .55rem; font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .keys { font-size: 1.15rem; letter-spacing: -2px; }
.brand .accent { color: var(--brass); }
.brand small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links a {
  display: inline-block; padding: .45rem .7rem; border-radius: 8px;
  color: var(--ink-2); font-weight: 600; font-size: .95rem;
}
.nav-links a:hover { background: var(--brass-soft); color: var(--slate-2); text-decoration: none; }
.nav-links a.active { color: var(--brass); }

/* =========================== hero =========================== */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .58; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23,21,29,.35) 0%, rgba(23,21,29,.55) 55%, rgba(23,21,29,.82) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: clamp(3.2rem, 8vw, 6rem) 0; }
.hero.hero-tall .hero-inner { padding: clamp(4.5rem, 12vw, 8.5rem) 0; }

/* imageless title band for inner pages (image is showcased crisply below as a figure) */
.hero-band { background: radial-gradient(130% 150% at 12% -10%, #322d3d 0%, #201d29 48%, #17151d 100%); }
.hero-band::after { display: none; }
.hero-band .hero-inner { padding: clamp(2.6rem, 6vw, 4.2rem) 0; }
.hero-band h1 { max-width: 22ch; }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; font-size: .74rem;
  color: var(--brass-2); margin: 0 0 .9rem; padding-bottom: .35rem;
  border-bottom: 2px solid rgba(202, 162, 90, .5);
}
.hero h1 { color: var(--on-dark); font-size: clamp(2.05rem, 5.2vw, 3.5rem); margin: 0; max-width: 16ch; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero .lede { color: #eee7d8; font-size: 1.2rem; max-width: 46ch; margin: 1.15rem 0 0; }
.hero-cta { margin-top: 1.9rem; display: flex; flex-wrap: wrap; gap: .8rem; }

/* buttons */
.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 700;
  font-family: var(--font-body); font-size: 1rem; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--brass), var(--brass-2)); color: #241a08; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; color: #241a08; }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(244,239,228,.45); }
.btn-ghost:hover { background: rgba(244,239,228,.1); color: var(--on-dark); text-decoration: none; border-color: var(--brass-2); }

/* =========================== main / prose =========================== */
main { display: block; }
.section { padding: clamp(2.6rem, 6vw, 4.4rem) 0; }
.section-alt { background: var(--ivory-2); border-top: 1px solid var(--cream-line); border-bottom: 1px solid var(--cream-line); }

.prose { max-width: var(--prose); margin: 0 auto; }
.prose > p:first-of-type { font-size: 1.16rem; color: #423c4b; }
.prose h2 {
  font-size: clamp(1.55rem, 3.4vw, 2rem); margin: 2.4rem 0 .85rem; padding-top: .3rem;
  position: relative;
}
.prose h2::before {
  content: ""; display: block; width: 46px; height: 3px; margin-bottom: .9rem;
  background: linear-gradient(90deg, var(--brass), var(--brass-2)); border-radius: 3px;
}
.prose h3 { font-size: 1.3rem; margin: 1.8rem 0 .6rem; }
.prose p { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.prose li { margin: 0 0 .55rem; padding-left: .2rem; }
.prose li::marker { color: var(--brass); }
.prose a { color: var(--slate-2); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(53,102,140,.3); text-underline-offset: 3px; }
.prose a:hover { color: var(--brass); text-decoration-color: var(--brass); }

.figure { margin: 0 0 2rem; }
.figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.figure figcaption { margin-top: .6rem; font-size: .9rem; color: var(--muted); text-align: center; font-style: italic; }

/* =========================== guides grid (home) =========================== */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.4rem; }
.section-head .eyebrow { color: var(--brass); border-bottom-color: rgba(176,135,63,.35); }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .6rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--ivory-2); border: 1px solid var(--cream-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brass-2); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 1.25rem 1.35rem 1.45rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.28rem; margin: 0 0 .5rem; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--brass); text-decoration: none; }
.card-body p { color: var(--muted); font-size: .98rem; margin: 0 0 1rem; flex: 1; }
.card-more { font-weight: 700; color: var(--slate-2); font-size: .95rem; }
.card:hover .card-more { color: var(--brass); }

/* callout */
.callout {
  max-width: var(--prose); margin: 2.4rem auto 0; background: var(--brass-soft);
  border-left: 4px solid var(--brass); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.3rem 1.5rem;
}
.callout p { margin: 0; color: #4a3f28; }
.callout strong { color: var(--ink); }

/* related links block */
.related { max-width: var(--prose); margin: 3rem auto 0; padding-top: 1.6rem; border-top: 1px solid var(--cream-line); }
.related h2 { font-size: 1.35rem; margin: 0 0 1rem; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem 1.4rem; }
.related-list a { font-weight: 600; }

/* =========================== footer =========================== */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 3.2rem 0 1.8rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 2rem; margin-bottom: 2.4rem; }
.footer-brand .brand { color: var(--on-dark); }
.footer-brand .brand small { color: var(--on-dark-muted); }
.footer-brand p { margin: 1rem 0 0; font-size: .96rem; max-width: 38ch; color: var(--on-dark-muted); }
.footer-col h4 { color: var(--on-dark); font-family: var(--font-body); font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 .55rem; }
.footer-col a { color: var(--on-dark-muted); font-size: .96rem; }
.footer-col a:hover { color: var(--brass-2); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(244,239,228,.12); padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .86rem; color: var(--on-dark-muted); }
.footer-note { max-width: 62ch; }

/* =========================== 404 =========================== */
.err-wrap { min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.25rem; }
.err-wrap .big { font-family: var(--font-display); font-size: clamp(4rem, 16vw, 8rem); color: var(--brass); line-height: 1; margin: 0; }
.err-wrap h1 { margin: .4rem 0 .8rem; }
.err-wrap p { color: var(--muted); max-width: 44ch; margin: 0 auto 1.6rem; }

/* =========================== motion (enhancement only) =========================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .6s ease both; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* =========================== responsive =========================== */
@media (max-width: 860px) {
  .nav-toggle-label {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; padding: 8px; cursor: pointer; border-radius: 8px;
  }
  .nav-toggle-label span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--ivory-2); border-bottom: 1px solid var(--cream-line);
    box-shadow: var(--shadow-md); padding: .5rem 1rem 1rem;
    max-height: 0; overflow: hidden; transition: max-height .28s ease, padding .28s ease;
    padding-top: 0; padding-bottom: 0;
  }
  .nav-links a { padding: .8rem .6rem; border-bottom: 1px solid var(--cream-line); font-size: 1.02rem; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-toggle:checked ~ .nav-links { max-height: 80vh; overflow-y: auto; padding-top: .4rem; padding-bottom: .8rem; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 1.04rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .lede { font-size: 1.08rem; }
}
