/*
Theme Name: Carrie's Piano Studio
Theme URI: https://carriespianostudio.org
Author: Carrie Wright
Description: Custom theme for Carrie's Piano Studio — private piano lessons in Huntersville, NC. Warm, elegant design with an animated, playable hero keyboard.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: carries-piano-studio
*/

/* =========================================================
   Carrie's Piano Studio — Elegant, warm theme
   Warm cream + walnut + antique gold, serif/sans pairing
   ========================================================= */

:root{
  --cream:          #faf6ec;
  --cream-alt:      #f2e9d6;
  --card:           #fffdf8;
  --paper:          #fffaf0;
  --espresso:       #362a18;
  --espresso-soft:  #5d4c35;
  --taupe:          #8d7c62;
  --gold:           #b9873e;
  --gold-light:     #d9ac5c;
  --gold-deep:      #8c6526;
  --line:           rgba(139,101,43,.22);
  --footer-bg:      #2a2013;
  --footer-text:    #cdbc9d;

  --font-display: "Playfair Display", "Georgia", serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

  --max-width: 1140px;
  --radius: 4px;
  --shadow-soft: 0 20px 50px -22px rgba(90,60,15,0.28);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--cream);
  color: var(--espresso-soft);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }

h1, h2, h3, h4{
  font-family: var(--font-display);
  color: var(--espresso);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: .01em;
}

h1{ font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; }
h2{ font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3{ font-size: clamp(1.2rem, 2vw, 1.5rem); }

p{ margin: 0 0 1.2em; }

a{ color: var(--gold-deep); text-decoration: none; transition: color .2s var(--ease); }
a:hover{ color: var(--espresso); }

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow{
  display: inline-block;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .25em;
  font-size: .72rem;
  color: var(--gold-deep);
  margin-bottom: .9em;
}

.eyebrow::before{
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  margin-right: 10px;
  vertical-align: middle;
}

.lede{
  font-size: 1.15rem;
  color: var(--espresso-soft);
  max-width: 60ch;
}

section{ padding: 96px 0; }
section.tight{ padding: 64px 0; }
.alt-bg{ background: var(--cream-alt); }

.divider{
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 8px 0 28px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}

.btn-primary{
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: var(--paper);
  border-color: transparent;
}
.btn-primary:hover{
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(140,101,38,.45);
}

.btn-ghost{
  background: transparent;
  color: var(--espresso);
  border-color: var(--gold-deep);
}
.btn-ghost:hover{
  color: var(--paper);
  background: var(--gold-deep);
  transform: translateY(-2px);
}

.btn-row{ display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

/* ---------- Header / Nav ---------- */
header.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,246,236,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  color: var(--espresso);
  font-size: 1.3rem;
  font-weight: 700;
}
.brand:hover{ color: var(--espresso); }

.brand-mark{
  width: 38px; height: 38px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.brand small{
  display: block;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .58rem;
  color: var(--gold-deep);
  font-weight: 500;
}

nav.main-nav ul{
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav a{
  color: var(--espresso-soft);
  font-size: .92rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}
nav.main-nav a::after{
  content:"";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 1px;
  background: var(--gold-deep);
  transition: width .25s var(--ease);
}
nav.main-nav a:hover::after,
nav.main-nav a.active::after,
nav.main-nav li.current-menu-item > a::after,
nav.main-nav li.current_page_item > a::after{ width: 100%; }
nav.main-nav a.active,
nav.main-nav li.current-menu-item > a,
nav.main-nav li.current_page_item > a{ color: var(--gold-deep); }

.nav-cta{
  display: none;
}
@media (min-width: 860px){
  .nav-cta{ display: inline-flex; }
}

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 24px; height: 2px; background: var(--espresso);
}

@media (max-width: 859px){
  .nav-toggle{ display: flex; }
  nav.main-nav{
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream-alt);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s var(--ease);
  }
  nav.main-nav.open{ max-height: 400px; }
  nav.main-nav ul{
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 26px;
  }
  nav.main-nav li{ border-bottom: 1px solid rgba(54,42,24,.08); }
  nav.main-nav a{ display: block; padding: 14px 0; }
}

/* ---------- Hero (animated) ---------- */
.hero{
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 65% 55% at 50% 0%, rgba(217,172,92,.28), transparent 62%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-alt) 100%);
}

.hero-glow{
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(circle, rgba(217,172,92,.35), transparent 70%);
  filter: blur(30px);
  animation: pulseGlow 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseGlow{
  0%, 100%{ opacity: .5; transform: scale(1); }
  50%{ opacity: .85; transform: scale(1.08); }
}

.hero .container{
  position: relative;
  z-index: 3;
  padding-top: 70px;
  padding-bottom: 160px;
}

.hero-eyebrow{
  opacity: 0;
  animation: riseIn .8s .15s var(--ease) forwards;
}

.hero h1{
  opacity: 0;
  animation: riseIn .9s .35s var(--ease) forwards;
  max-width: 16ch;
}

.hero h1 em{
  font-style: italic;
  color: var(--gold-deep);
}

.hero .lede{
  opacity: 0;
  animation: riseIn .9s .55s var(--ease) forwards;
}

.hero .btn-row{
  opacity: 0;
  animation: riseIn .9s .75s var(--ease) forwards;
}

@keyframes riseIn{
  from{ opacity: 0; transform: translateY(22px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* floating musical notes */
.notes{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.notes span{
  position: absolute;
  bottom: -10%;
  color: var(--gold-deep);
  opacity: 0;
  font-size: 1.6rem;
  animation: floatUp 11s linear infinite;
}
.notes span:nth-child(1){ left: 6%;  font-size: 1.4rem; animation-delay: 0s;   }
.notes span:nth-child(2){ left: 16%; font-size: 2.2rem; animation-delay: 2.2s; }
.notes span:nth-child(3){ left: 28%; font-size: 1.1rem; animation-delay: 4.4s; }
.notes span:nth-child(4){ left: 46%; font-size: 1.8rem; animation-delay: 1.1s; }
.notes span:nth-child(5){ left: 62%; font-size: 1.3rem; animation-delay: 3.6s; }
.notes span:nth-child(6){ left: 74%; font-size: 2rem;   animation-delay: 5.8s; }
.notes span:nth-child(7){ left: 86%; font-size: 1.4rem; animation-delay: 0.6s; }
.notes span:nth-child(8){ left: 94%; font-size: 1.1rem; animation-delay: 7s;   }

@keyframes floatUp{
  0%{ transform: translateY(0) rotate(0deg); opacity: 0; }
  8%{ opacity: .45; }
  85%{ opacity: .28; }
  100%{ transform: translateY(-115vh) rotate(18deg); opacity: 0; }
}

/* animated, playable piano keys strip along hero bottom */
.keys{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  height: 120px;
  filter: drop-shadow(0 -16px 30px rgba(90,60,15,.18));
  border-top: 1px solid var(--line);
}

.keys-hint{
  position: absolute;
  bottom: 128px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--taupe);
  opacity: 0;
  animation: riseIn 1s 1.3s var(--ease) forwards;
  pointer-events: none;
  white-space: nowrap;
}

.white-key{
  position: relative;
  flex: 1 1 0;
  height: 100%;
  background: linear-gradient(180deg, #fffdf7 0%, #f1e6cf 100%);
  border-left: 1px solid rgba(90,60,15,.14);
  border-top: 1px solid rgba(255,255,255,.6);
  transform-origin: top center;
  animation: keyPress 5.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * .18s);
  cursor: pointer;
  z-index: 1;
  transition: filter .12s var(--ease), box-shadow .12s var(--ease);
}
.white-key.pressed{
  filter: brightness(.93);
  box-shadow: inset 0 8px 12px rgba(90,60,15,.28);
}

.black-key{
  position: absolute;
  top: 0;
  height: 62%;
  background: linear-gradient(180deg, #4a3218, var(--espresso));
  border-radius: 0 0 2px 2px;
  z-index: 2;
  cursor: pointer;
  transition: filter .12s var(--ease);
}
.black-key.pressed{
  filter: brightness(1.45);
}

@keyframes keyPress{
  0%, 88%, 100%{ transform: scaleY(1); }
  92%{ transform: scaleY(.93) translateY(2%); }
}

/* notes spawned by hovering/moving across the keys */
.fly-note{
  position: absolute;
  pointer-events: none;
  color: var(--gold-deep);
  font-size: 1.15rem;
  transform: translate(-50%,-50%);
  animation: flyNote .85s ease-out forwards;
  z-index: 5;
}
@keyframes flyNote{
  0%{ opacity: 0; transform: translate(-50%,-50%) scale(.6) rotate(0deg); }
  15%{ opacity: 1; }
  100%{ opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.15) rotate(var(--rot)); }
}

/* ---------- Page hero (interior pages, smaller, still animated) ---------- */
.page-hero{
  position: relative;
  padding: 150px 0 80px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(217,172,92,.28), transparent 65%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-alt) 100%);
}
.page-hero .eyebrow, .page-hero h1, .page-hero .lede{
  opacity: 0;
  animation: riseIn .8s .2s var(--ease) forwards;
}
.page-hero .lede{ margin: 0 auto; animation-delay: .4s; }
.page-hero h1{ animation-delay: .3s; max-width: none; }

/* ---------- Cards / grids ---------- */
.grid{
  display: grid;
  gap: 30px;
}
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){
  .grid-3, .grid-2{ grid-template-columns: 1fr; }
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover{
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-soft);
}
.card .icon{
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-family: var(--font-display);
}

/* ---------- Two-col layout ---------- */
.split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px){
  .split{ grid-template-columns: 1fr; gap: 40px; }
}

.portrait-frame{
  position: relative;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card);
}
.portrait-frame .portrait{
  aspect-ratio: 4/3;
  background:
    radial-gradient(circle at 30% 20%, rgba(217,172,92,.3), transparent 55%),
    linear-gradient(160deg, var(--cream-alt), var(--paper));
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep);
  font-family: var(--font-display);
  font-size: 1rem;
  text-align: center;
  padding: 20px;
  overflow: hidden;
}
.portrait-frame .portrait img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Stats strip ---------- */
.stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
@media (max-width: 700px){ .stats{ grid-template-columns: repeat(2, 1fr); } }
.stats .num{
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold-deep);
}
.stats .label{
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .74rem;
  color: var(--taupe);
}

/* ---------- Testimonials ---------- */
.quote-card{
  background: var(--card);
  border-left: 3px solid var(--gold);
  padding: 30px 32px;
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
}
.quote-card p{ font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--espresso); }
.quote-card .who{ color: var(--gold-deep); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Pricing / info table ---------- */
.info-table{
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: var(--card);
}
.info-table th, .info-table td{
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.info-table th{
  color: var(--gold-deep);
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .1em;
}

/* ---------- Forms ---------- */
.form-field{ margin-bottom: 20px; }
.form-field label{
  display: block;
  margin-bottom: 8px;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--taupe);
}
.form-field input,
.form-field select,
.form-field textarea{
  width: 100%;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 2px;
  transition: border-color .2s var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus{
  outline: none;
  border-color: var(--gold);
}
.form-field textarea{ resize: vertical; min-height: 130px; }

/* ---------- CTA band ---------- */
.cta-band{
  text-align: center;
  padding: 90px 0;
  background:
    radial-gradient(ellipse 70% 100% at 50% 100%, rgba(217,172,92,.24), transparent 70%),
    var(--cream-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-band h2{ margin-bottom: .3em; }
.cta-band .lede{ margin: 0 auto 30px; }
.cta-band .btn-row{ justify-content: center; }

/* ---------- Map ---------- */
.map-frame{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  filter: sepia(.12) saturate(1.05);
}
.map-frame iframe{ width: 100%; height: 340px; border: 0; display: block; }

/* ---------- Footer ---------- */
footer.site-footer{
  background: var(--footer-bg);
  padding: 64px 0 30px;
  border-top: 1px solid rgba(217,172,92,.2);
}
footer.site-footer .brand,
footer.site-footer h4{ color: var(--footer-text); }
footer.site-footer .brand-mark{ color: var(--gold-light); border-color: var(--gold); }
footer.site-footer .brand small{ color: var(--gold-light); }
footer.site-footer p{ color: rgba(205,188,157,.75); }
.footer-grid{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 800px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-grid h4{
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .15em;
  font-family: var(--font-body);
  margin-bottom: 18px;
  color: var(--gold-light);
}
.footer-grid ul{ list-style: none; margin: 0; padding: 0; }
.footer-grid li{ margin-bottom: 10px; color: rgba(205,188,157,.75); }
.footer-grid a{ color: var(--footer-text); }
.footer-grid a:hover{ color: var(--gold-light); }

.social-row{ display: flex; gap: 14px; margin-top: 18px; }
.social-row a{
  width: 38px; height: 38px;
  border: 1px solid rgba(217,172,92,.45);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-light);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.social-row a:hover{ background: var(--gold); color: var(--footer-bg); }

.footer-bottom{
  border-top: 1px solid rgba(217,172,92,.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: rgba(205,188,157,.6);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* ---------- Utility ---------- */
.center{ text-align: center; }
.mx-auto{ margin-left: auto; margin-right: auto; }
.mt-lg{ margin-top: 48px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
