/* ============================================================
   Paul The Writer -- style.css
   Palette: 60% cream / 20% sage / 10% forest green / 5% plum / 5% charcoal
   Type: Cormorant Garamond (headings) + Inter (everything else)
============================================================ */

:root {
  --green: #228B22;
  --plum: #8B228B;
  --sage: #A8DCA8;
  --cream: #F6F1E8;
  --cream-alt: #FFF9F2;
  --charcoal: #1F2937;
  --white: #ffffff;

  --green-dark: #1b6e1b;
  --plum-dark: #6f1b6f;
  --sage-dark: #7fc47f;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a {
  color: var(--green-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { color: var(--plum-dark); }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.75em 1em;
  z-index: 1000;
}
.skip-link:focus {
  left: 1em;
  top: 1em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 3px solid var(--charcoal);
  outline-offset: 2px;
}

.btn-green {
  background: var(--green);
  color: var(--white);
}
.btn-green:hover { background: var(--green-dark); color: var(--white); }

.btn-plum {
  background: var(--white);
  color: var(--plum);
  border-color: var(--plum);
}
.btn-plum:hover { background: var(--plum); color: var(--white); }

.btn-charcoal {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
}
.btn-charcoal:hover { background: var(--charcoal); color: var(--white); }

.btn-cream {
  background: var(--cream-alt);
  color: var(--green-dark);
}
.btn-cream:hover { background: var(--white); }

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin: 1.2em 0;
}

.counter-line {
  font-weight: 600;
  color: var(--plum-dark);
  margin-top: 0.5em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--cream-alt);
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
  position: sticky;
  top: 0;
  z-index: 500;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75em 1.25em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: var(--charcoal);
}
.logo-img { border-radius: 50%; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger-bar {
  width: 26px;
  height: 3px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.is-open .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open .hamburger-bar:nth-child(2) { opacity: 0; }
.hamburger.is-open .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.primary-nav ul {
  display: flex;
  gap: 1.5em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.primary-nav a:hover { color: var(--green-dark); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1em 0;
  }
  .primary-nav li { border-top: 1px solid rgba(31,41,55,0.08); }
  .primary-nav a { display: block; padding: 0.85em 0.25em; }
  .header-inner { flex-wrap: wrap; }
}

/* ---------- Layout sections ---------- */
.section {
  padding: 4rem 1.25rem;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-narrow { max-width: 760px; }
.section-cream { background: var(--cream); }
.section-sage { background: var(--sage); }
.section-green {
  background: var(--green);
  color: var(--white);
}
.section-green h2, .section-green p { color: var(--white); }

.section-subheadline {
  font-size: 1.15rem;
  color: var(--plum-dark);
  font-weight: 500;
  margin-bottom: 1em;
}

.section-with-image {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.section-with-image .section-text { flex: 1 1 340px; }
.section-image {
  flex: 0 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(31,41,55,0.15);
}
.section-image-round { border-radius: 50%; }

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 1.25rem 3.5rem;
  background: linear-gradient(180deg, var(--cream-alt) 0%, var(--cream) 100%);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-narrow .hero-inner { max-width: 760px; }
.hero-subheadline {
  font-size: 1.25rem;
  color: var(--plum-dark);
  font-weight: 500;
}

.final-cta { text-align: left; }

/* ---------- Testimonials ---------- */
.testimonial {
  border-left: 4px solid var(--plum);
  background: var(--cream-alt);
  padding: 1.5em 1.75em;
  margin: 2em 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.testimonial p {
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0.6em;
}
.testimonial cite {
  font-style: normal;
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.95rem;
}

/* ---------- Accordion / FAQ ---------- */
.accordion { margin-top: 1.5em; }
.accordion-item {
  border-bottom: 1px solid rgba(31,41,55,0.15);
}
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.1em 0.25em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  min-height: 44px;
}
.accordion-trigger::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--plum);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(45deg);
}
.accordion-panel {
  display: none;
  padding: 0 0.25em 1.2em;
}
.accordion-panel.is-open { display: block; }

/* ---------- Videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5em;
}
.video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius);
}
.video-caption {
  font-weight: 600;
  margin-top: 0.6em;
  margin-bottom: 0;
}

/* ---------- Forms ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  max-width: 560px;
}
.contact-form label {
  font-weight: 600;
  margin-top: 0.8em;
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em;
  border: 1px solid rgba(31,41,55,0.25);
  border-radius: var(--radius);
  background: var(--white);
  min-height: 44px;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button { margin-top: 1.2em; align-self: flex-start; }

.form-message {
  padding: 1em 1.25em;
  border-radius: var(--radius);
  margin-bottom: 1.5em;
  font-weight: 500;
}
.form-message-error {
  background: #fbe4ea;
  color: #7a1f3d;
}
.form-message-success {
  background: var(--sage);
  color: var(--charcoal);
}
.contact-alt { margin-top: 1.5em; }

/* ---------- Half-price block ---------- */
.half-price-block {
  background: var(--cream-alt);
  border: 1px solid rgba(139,34,139,0.25);
  border-radius: var(--radius);
  padding: 1.5em 1.75em;
  margin-top: 1.5em;
}

/* ---------- Scorecard CTA block ---------- */
.cta-scorecard-block {
  background: var(--sage);
  padding: 3rem 1.25rem;
}
.cta-scorecard-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.cta-scorecard-image {
  flex: 0 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(31,41,55,0.15);
}
.cta-scorecard-text { flex: 1 1 340px; }

/* ---------- Blog ---------- */
.blog-list-item {
  padding: 1.5em 0;
  border-bottom: 1px solid rgba(31,41,55,0.12);
}
.blog-list-item:last-child { border-bottom: none; }
.blog-meta {
  font-size: 0.9rem;
  color: var(--plum-dark);
  font-weight: 500;
}
.blog-article h2 { margin-top: 1.6em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--cream);
  padding: 3rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-heading {
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.6em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5em; }
.footer-col a {
  color: var(--sage);
  text-decoration: none;
}
.footer-col a:hover { color: var(--white); }
.footer-tagline { color: rgba(246,241,232,0.75); font-size: 0.9rem; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(246,241,232,0.15);
  font-size: 0.85rem;
  color: rgba(246,241,232,0.6);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .section { padding: 3rem 1.25rem; }
  .section-with-image { flex-direction: column; }
  .cta-scorecard-inner { flex-direction: column; text-align: center; }
  .final-cta { text-align: center; }

  .hero {
    padding: 2rem 1.25rem 2rem;
  }
  .hero h1 {
    font-size: 1.9rem;
    margin-bottom: 0.4em;
  }
  .hero-subheadline {
    font-size: 1.05rem;
    margin-bottom: 0.75em;
  }
  .hero p {
    margin-bottom: 0.7em;
  }
  .cta-group {
    margin: 0.8em 0;
  }
}
