/* =============================================
   Digital Music Tutors – Shared Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* === Reset & Variables === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #141420;
  --charcoal:#2D2D3A;
  --mid:     #6B7280;
  --light:   #F3F4F6;
  --border:  #E5E7EB;
  --white:   #ffffff;
  --serif:   'Playfair Display', Georgia, serif;  /* display headings */
  --sans:    'Lora', Georgia, serif;               /* body / UI text (serif throughout) */
  --max:     1040px;
  --radius-sm: 10px;   /* buttons, inputs, small controls, inner tiles */
  --radius:    12px;   /* cards & panels */
  --radius-lg: 16px;   /* feature cards */
  --shadow-sm: 0 6px 20px rgba(20,20,32,0.12);
  --shadow-md: 0 16px 40px rgba(20,20,32,0.10);
  --shadow-lg: 0 20px 60px rgba(20,20,32,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  font-weight:400;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--black);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1.1em; color: var(--mid); }
p:last-child { margin-bottom: 0; }

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  display: block;
  margin-bottom: 14px;
}

/* === Layout === */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section    { padding: 90px 0; }
.section--alt { background: var(--light); }
.section--dark { background: var(--black); color: var(--white); }

/* === Nav === */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.active { color: var(--black); }

.nav-cta {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--white) !important;
  background: var(--black);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--charcoal); transform: translateY(-2px); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 24px; }
  .nav-cta { margin: 8px 24px 12px; border-radius: var(--radius-sm); }
}

/* === Buttons === */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover { background: var(--charcoal); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-outline {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--black);
}
.btn-outline:hover { background: var(--black); color: var(--white); transform: translateY(-2px); }

.btn-light {
  background: var(--white);
  color: var(--black);
}
.btn-light:hover { background: var(--light); transform: translateY(-2px); }

/* === Hero === */
.hero {
  padding: 110px 0 90px;
  text-align: center;
}
.hero h1 { margin-bottom: 24px; }
.hero .lead {
  font-size: 18px;
  color: var(--mid);
  max-width: 560px;
  margin: 0 auto 40px;
  font-weight:400;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* === Stats === */
.stats-row {
  display: flex;
  gap: 40px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
  margin-top: 56px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-num {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-lbl {
  font-size: 12px;
  color: var(--mid);
  letter-spacing: 0.05em;
}

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 48px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--black);
}
.card-icon {
  width: 44px;
  height: 44px;
  background: var(--light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: background 0.3s;
}
.card:hover .card-icon { background: var(--black); color: white; }
.card-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 10px; font-size: 1.1rem; }

/* === Section header === */
.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 17px; max-width: 560px; }
.section-header.center p { margin: 0 auto; }

/* === Pricing === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  position: relative;
  transition: all 0.3s;
}
.price-card.featured {
  border-color: var(--black);
  box-shadow: var(--shadow-md);
}
.price-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: white;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
}
.price-duration {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 8px;
}
.price-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}
.price-amount {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--black);
  margin: 16px 0 4px;
}
.price-amount span { font-size: 1rem; font-weight: 400; color: var(--mid); font-family: var(--sans); }
.price-desc { font-size: 14px; color: var(--mid); margin-bottom: 24px; line-height: 1.6; }
.price-features { list-style: none; margin: 0 0 28px; }
.price-features li {
  font-size: 14px;
  color: var(--mid);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-features li::before {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--light);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 8 6.5 11.5 13 5'/%3E%3C/svg%3E");
}

/* === FAQ === */
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
}
.faq-icon {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.faq-icon svg { width: 12px; height: 12px; stroke: var(--black); fill: none; stroke-width: 2.5; stroke-linecap: round; transition: transform 0.3s; }
.faq-item.open .faq-icon { background: var(--black); }
.faq-item.open .faq-icon svg { stroke: white; transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-answer-inner { padding: 0 0 24px; font-size: 15px; line-height: 1.8; color: var(--mid); max-width: 700px; }

/* === Blog === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 48px;
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--charcoal); }
.blog-date { font-size: 11px; color: var(--mid); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; display: block; }
.blog-card h3 { font-size: 1.05rem; margin-bottom: 10px; line-height: 1.35; }
.blog-card p { font-size: 14px; flex: 1; }
.blog-link { font-size: 13px; font-weight: 600; color: var(--black); border-bottom: 1px solid var(--border); padding-bottom: 1px; margin-top: 16px; display: inline-block; transition: border-color 0.2s; }
.blog-link:hover { border-color: var(--black); }

/* === Contact Form === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 18px; }
.contact-info p { margin-bottom: 24px; }
.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--mid);
}
.contact-detail svg { width: 18px; height: 18px; stroke: var(--black); fill: none; stroke-width: 2; flex-shrink: 0; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--black); margin-bottom: 7px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--black); }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-success { display: none; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-sm); padding: 20px; color: #166534; font-size: 15px; }

/* === Footer === */
footer {
  background: var(--black);
  color: rgba(255,255,255,0.5);
  padding: 60px 0 32px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: white; margin-bottom: 12px; }
.footer-tagline { font-size: 13px; line-height: 1.7; }
.footer-col h4 { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 14px; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-col ul a:hover { color: white; }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

/* === Article/Blog post === */
.post-hero { padding: 80px 0 60px; }
.post-meta { font-size: 13px; color: var(--mid); margin-bottom: 20px; }
.post-body { max-width: 700px; }
.post-body h2 { margin: 40px 0 16px; font-size: 1.6rem; }
.post-body h3 { margin: 28px 0 12px; }
.post-body p { font-size: 16px; color: var(--mid); margin-bottom: 18px; line-height: 1.8; }
.post-body ul, .post-body ol { margin: 0 0 18px 22px; }
.post-body li { font-size: 16px; color: var(--mid); margin-bottom: 8px; line-height: 1.7; }
.post-body strong { color: var(--black); font-weight: 600; }
.post-body a { color: var(--black); border-bottom: 1px solid var(--border); transition: border-color 0.2s; }
.post-body a:hover { border-color: var(--black); }

/* === Page Hero (inner pages) === */
.page-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}
.page-hero .label { margin-bottom: 14px; }

/* === About === */
.founder-card {
  background: var(--black);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 56px;
  align-items: start;
  margin-top: 60px;
}
.founder-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.founder-name {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}
.founder-role { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 28px; }
.founder-divider { width: 36px; height: 1px; background: rgba(255,255,255,0.2); margin-bottom: 28px; }
.founder-bio { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,0.6); }
.founder-creds { display: flex; flex-direction: column; gap: 14px; }
.cred-item {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.cred-label { font-size: 10px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 5px; }
.cred-value { font-size: 14px; color: rgba(255,255,255,0.8); line-height: 1.5; }

/* === Responsive === */
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .hero { padding: 70px 0 60px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .founder-card { grid-template-columns: 1fr; gap: 32px; padding: 36px 28px; }
  .stats-row { gap: 28px; }
}

/* === Enhancements ============================================= */

/* Anchor links / in-page targets clear the sticky nav */
:target { scroll-margin-top: 84px; }
[id] { scroll-margin-top: 84px; }

/* Keyboard focus: visible ring for accessibility (mouse clicks unaffected) */
:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
  border-radius: 2px;
}
.section--dark :focus-visible,
footer :focus-visible { outline-color: var(--white); }

/* Contact form: touched-and-invalid fields + submit feedback */
.form-group input:user-invalid,
.form-group select:user-invalid,
.form-group textarea:user-invalid { border-color: #dc2626; }
.btn.is-sending { opacity: 0.65; cursor: default; }

/* Scroll-reveal — gated on `reveal-init` (set pre-paint by the head script),
   so elements only hide when JS + motion are both available. */
html.reveal-init .section-header,
html.reveal-init .stats-row,
html.reveal-init .card,
html.reveal-init .price-card,
html.reveal-init .blog-card,
html.reveal-init .tool-card,
html.reveal-init .cs-card,
html.reveal-init .founder-card,
html.reveal-init .faq-item,
html.reveal-init .contact-grid,
html.reveal-init .post-body {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
html.reveal-init .is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Sticky mobile call-to-action bar */
.mobile-cta { display: none; }
@media (max-width: 768px) {
  .mobile-cta {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    background: var(--black);
    color: var(--white);
    text-align: center;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(20,20,32,0.12);
  }
  body.has-mobile-cta { padding-bottom: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
