/*
Theme Name:        The Music Box
Theme URI:         https://www.themusicbox.online
Author:            O-Matic AI Research Lab
Author URI:        https://o-matic.io
Description:       Custom block theme for The Music Box — Music Lessons & Studio, Dayton, Tennessee. Vintage neighborhood music studio aesthetic.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.9
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       themusicbox
Tags:              block-patterns, full-site-editing, custom-colors, custom-fonts
*/

/* ---------------------------------------------------------------
   GOOGLE FONTS IMPORT
--------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@400;600&family=Dancing+Script:wght@600;700&display=swap');

/* ---------------------------------------------------------------
   CSS CUSTOM PROPERTIES
--------------------------------------------------------------- */
:root {
  --mb-cream:      #F5E9D7;
  --mb-ink:        #1E1B18;
  --mb-green:      #2D6A73;
  --mb-red:        #B5463B;
  --mb-gold:       #E0B45A;
  --mb-white:      #FFFFFF;
  --mb-cream-dark: #EAD9C0;

  --mb-font-display: 'Playfair Display', Georgia, serif;
  --mb-font-body:    'Source Sans 3', Helvetica, Arial, sans-serif;
  --mb-font-script:  'Dancing Script', cursive;

  --mb-max-width:  1100px;
  --mb-content:    780px;
  --mb-radius:     3px;
}

/* ---------------------------------------------------------------
   RESET & BASE
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--mb-cream);
  color: var(--mb-ink);
  font-family: var(--mb-font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--mb-red);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--mb-green); }

/* ---------------------------------------------------------------
   TYPOGRAPHY
--------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mb-font-display);
  color: var(--mb-ink);
  line-height: 1.2;
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p { margin-top: 0; margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------
   HEADER
--------------------------------------------------------------- */
.site-header {
  background-color: var(--mb-ink);
  border-bottom: 3px solid var(--mb-red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: var(--mb-max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-family: var(--mb-font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mb-cream);
  letter-spacing: 0.05em;
  text-decoration: none;
  line-height: 1;
}

.site-logo:hover { color: var(--mb-gold); }

.site-logo span {
  display: block;
  font-family: var(--mb-font-script);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mb-red);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* ---------------------------------------------------------------
   NAVIGATION
--------------------------------------------------------------- */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  font-family: var(--mb-font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mb-cream);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav a.current-page {
  color: var(--mb-gold);
  border-bottom-color: var(--mb-red);
}

.site-nav .nav-book {
  background: var(--mb-red);
  color: var(--mb-cream) !important;
  padding: 0.45rem 1.25rem;
  border-radius: var(--mb-radius);
  border-bottom: none !important;
  letter-spacing: 0.08em;
}

.site-nav .nav-book:hover {
  background: var(--mb-green);
  color: var(--mb-cream) !important;
}

/* ---------------------------------------------------------------
   MOBILE NAV TOGGLE
--------------------------------------------------------------- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--mb-cream);
  font-size: 1.5rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--mb-ink);
    border-bottom: 2px solid var(--mb-red);
    padding: 1.5rem 2rem;
    z-index: 99;
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* ---------------------------------------------------------------
   MAIN CONTENT WRAPPER
--------------------------------------------------------------- */
.site-main {
  min-height: 60vh;
}

/* ---------------------------------------------------------------
   PAGE TITLE (default WP page header)
--------------------------------------------------------------- */
.wp-block-post-title,
.entry-title {
  font-family: var(--mb-font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--mb-ink);
  text-align: center;
  padding: 3rem 2rem 1rem;
  max-width: var(--mb-content);
  margin: 0 auto;
}

/* ---------------------------------------------------------------
   CONTENT AREA
--------------------------------------------------------------- */
.entry-content,
.wp-block-group.is-layout-constrained > * {
  max-width: var(--mb-content);
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------------
   HERO IMAGE
--------------------------------------------------------------- */
.hero-image-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
}

/* Hero via block — center and constrain the signboard */
.wp-block-image.aligncenter {
  max-width: 700px;
  margin: 3rem auto 2rem;
  padding: 0 1.5rem;
}

/* ---------------------------------------------------------------
   SEPARATORS — staff line style
--------------------------------------------------------------- */
.wp-block-separator {
  border: none;
  border-top: 2px solid var(--mb-green);
  margin: 2.5rem auto;
  max-width: 600px;
  opacity: 1;
}

.wp-block-separator.is-style-wide {
  max-width: 100%;
}

/* ---------------------------------------------------------------
   BUTTONS
--------------------------------------------------------------- */
.wp-block-button .wp-block-button__link,
.wp-element-button {
  background-color: var(--mb-red) !important;
  color: var(--mb-cream) !important;
  font-family: var(--mb-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 2.5rem;
  border-radius: var(--mb-radius);
  border: none;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.wp-block-button .wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: var(--mb-green) !important;
  color: var(--mb-cream) !important;
}

/* ---------------------------------------------------------------
   THREE PILLARS / COLUMNS
--------------------------------------------------------------- */
.wp-block-columns {
  max-width: var(--mb-max-width);
  margin: 2rem auto;
  padding: 0 2rem;
  gap: 3rem;
}

.wp-block-column h3 {
  font-size: 1.3rem;
  border-bottom: 2px solid var(--mb-green);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--mb-ink);
}

/* ---------------------------------------------------------------
   LESSONS PAGE — instrument tiles
--------------------------------------------------------------- */
.wp-block-column h3.has-red-color,
.wp-block-column h3[style*="#B5463B"] {
  color: var(--mb-red) !important;
}

/* ---------------------------------------------------------------
   FOOTER
--------------------------------------------------------------- */
.site-footer {
  background-color: var(--mb-ink);
  color: var(--mb-cream);
  border-top: 3px solid var(--mb-red);
  padding: 3rem 2rem;
  margin-top: 4rem;
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: var(--mb-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand .footer-name {
  font-family: var(--mb-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mb-cream);
  letter-spacing: 0.05em;
}

.footer-brand .footer-tagline {
  font-family: var(--mb-font-script);
  font-size: 1rem;
  color: var(--mb-red);
  margin-top: 0.25rem;
}

.footer-address {
  line-height: 1.8;
  color: rgba(245, 233, 215, 0.75);
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li { margin-bottom: 0.5rem; }

.footer-nav a {
  color: rgba(245, 233, 215, 0.75);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--mb-gold); }

.footer-bottom {
  max-width: var(--mb-max-width);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 233, 215, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(245, 233, 215, 0.45);
}

@media (max-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ---------------------------------------------------------------
   SCHEDULE PAGE
--------------------------------------------------------------- */
.amelia-container {
  max-width: var(--mb-content);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ---------------------------------------------------------------
   BLOG / POSTS
--------------------------------------------------------------- */
.wp-block-post-featured-image img {
  border-radius: var(--mb-radius);
}

/* ---------------------------------------------------------------
   UTILITY CLASSES
--------------------------------------------------------------- */
.text-center { text-align: center; }
.text-red    { color: var(--mb-red); }
.text-green  { color: var(--mb-green); }
.text-script {
  font-family: var(--mb-font-script);
  color: var(--mb-red);
}

/* ---------------------------------------------------------------
   WP BLOCK EDITOR — content width alignment
--------------------------------------------------------------- */
.wp-site-blocks {
  padding-top: 0;
  padding-bottom: 0;
}

.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: var(--mb-content);
  margin-left: auto;
  margin-right: auto;
}

.alignwide { max-width: var(--mb-max-width); }
.alignfull { max-width: 100%; }
