/* =======================================================================
   layout.css — Section layouts, components, responsive
   ======================================================================= */

/* Navigation
----------------------------------------------------------------------- */
#nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
  transition: box-shadow var(--transition);
}

#nav-wrap.scrolled {
  box-shadow: 0 1px 0 var(--border), var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--accent);
}

#nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

#nav li a {
  display: block;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

#nav li a:hover,
#nav li.current a {
  color: var(--accent);
  background: rgba(37,99,235,0.07);
}

/* Hamburger
----------------------------------------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero
----------------------------------------------------------------------- */
.hero {
  background: var(--bg);
  padding: calc(var(--nav-height) + 72px) 0 96px;
  text-align: center;
}

.hero-book {
  max-width: 420px;
  width: 100%;
  margin: 0 auto 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.hero-tagline {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 1rem auto 2.5rem;
  max-width: 480px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
}

/* What You'll Learn
----------------------------------------------------------------------- */
#learn {
  background: var(--accent);
  padding: var(--section-pad) 0;
}

#learn .section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

#learn .section-label {
  color: rgba(255,255,255,0.65);
}

#learn h2 {
  color: #fff;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2.5rem;
}

.learn-item {
  text-align: center;
}

.learn-item i {
  font-size: 2.25rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
  display: block;
}

.learn-item p {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* The Story
----------------------------------------------------------------------- */
#portfolio {
  background: var(--bg);
  padding: var(--section-pad) 0;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.story-grid p {
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* Testimonials
----------------------------------------------------------------------- */
.testimonials-title {
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.testimonial-card blockquote {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
  position: relative;
  padding-top: 1.25rem;
}

.testimonial-card blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.75rem;
  left: -0.25rem;
  font-size: 3.5rem;
  color: var(--accent);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.35;
}

.testimonial-cite {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin: 0;
}

/* About the Author
----------------------------------------------------------------------- */
#about {
  background: var(--bg-alt);
  padding: var(--section-pad) 0;
}

.author-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.author-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

.author-text h2 {
  margin-bottom: 1.25rem;
}

.author-text p {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* Resources / Email Signup
----------------------------------------------------------------------- */
#contact {
  background: var(--bg);
  padding: var(--section-pad) 0;
}

#contact .section-title {
  text-align: center;
}

.resources-preview {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.mailchimp-wrap {
  max-width: 520px;
  margin: 0 auto;
}

/* Mailchimp style overrides */
#mc_embed_signup {
  background: transparent !important;
  font-family: inherit !important;
  font-size: inherit !important;
}

#mc_embed_signup .mc-field-group {
  padding-bottom: 1.25rem !important;
  width: 100% !important;
}

#mc_embed_signup .mc-field-group label {
  font-weight: 500 !important;
  color: var(--text-muted) !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  margin-bottom: 0.375rem !important;
  display: block !important;
}

#mc_embed_signup input.email,
#mc_embed_signup input[type="text"] {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 0.625rem 0.875rem !important;
  font-family: inherit !important;
  font-size: 0.9375rem !important;
  width: 100% !important;
  color: var(--text) !important;
  background: var(--bg) !important;
  transition: border-color var(--transition) !important;
}

#mc_embed_signup input:focus {
  outline: none !important;
  border-color: var(--accent) !important;
}

#mc-embedded-subscribe,
#mc_embed_signup .button {
  background: var(--accent) !important;
  border-radius: var(--radius) !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  height: auto !important;
  padding: 0.75rem 2rem !important;
  transition: background var(--transition) !important;
  cursor: pointer !important;
  display: inline-block !important;
}

#mc-embedded-subscribe:hover,
#mc_embed_signup .button:hover {
  background: var(--accent-hover) !important;
}

/* Consulting
----------------------------------------------------------------------- */
#consulting {
  background: var(--accent);
  padding: var(--section-pad) 0;
}

.consulting-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

#consulting .section-label {
  color: rgba(255,255,255,0.65);
}

#consulting h2 {
  color: #fff;
  margin-bottom: 1rem;
}

#consulting p {
  color: rgba(255,255,255,0.85);
  font-size: 1.0625rem;
}

/* Footer
----------------------------------------------------------------------- */
footer {
  background: var(--text);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  justify-content: center;
}

.footer-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-copy {
  color: rgba(255,255,255,0.35);
  font-size: 0.875rem;
  margin: 0;
}

/* =====================================================================
   Responsive
   ===================================================================== */

/* Tablet: ≤ 960px */
@media (max-width: 960px) {
  :root { --section-pad: 72px; }

  .learn-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }

  .consulting-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Mobile: ≤ 768px */
@media (max-width: 768px) {
  :root { --section-pad: 56px; }

  /* Nav */
  .nav-toggle { display: flex; }

  #nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15,23,42,0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.5rem 0;
    gap: 0;
    display: none;
  }

  body.nav-open #nav { display: flex; }

  #nav li a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    color: rgba(255,255,255,0.82);
    font-size: 0.9375rem;
  }

  #nav li a:hover,
  #nav li.current a {
    color: #fff;
    background: rgba(255,255,255,0.1);
  }

  /* Hero */
  .hero-book { max-width: 300px; }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero-ctas .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* Story */
  .story-grid { grid-template-columns: 1fr; }

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* Author */
  .author-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }

  .footer-grid > div:last-child { text-align: left !important; }
}

/* Small mobile: ≤ 480px */
@media (max-width: 480px) {
  :root { --section-pad: 48px; }

  .learn-grid { grid-template-columns: 1fr; }
}
