/* Shared mobile-first layout: single-row header, section rhythm.
   Loaded after each page's <style> so these rules can refine local CSS. */

.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  color: #111111;
}

.nav-toggle:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.nav-toggle-bars {
  display: block;
  position: relative;
  width: 18px;
  height: 2px;
  background: #111111;
  border-radius: 1px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #111111;
  border-radius: 1px;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav.is-open .nav-toggle-bars {
  background: transparent;
}

.nav.is-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav.is-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Hero, quote, and devices are stacked full-width sections at every size.
   Two phones need the full desktop width, so the old two-column hero is retired. */
section.hero {
  display: flex !important;
  flex-direction: column;
  grid-template-columns: none !important;
  gap: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
  align-items: stretch;
}

.hero-main {
  display: contents;
  max-width: none;
}

.hero-intro {
  display: block;
  box-sizing: border-box;
  padding: 72px 72px 88px;
}

.hero-intro h1,
.hero-intro .pitch,
.hero-intro .actions {
  max-width: 640px;
}

.voice-band {
  margin-top: 0;
  padding: 88px 72px;
  border-top: 1px solid #E8E8E8;
  background: #ffffff;
}

.voice-band .voice {
  margin-top: 0;
  max-width: 34em;
  padding-left: 0;
}

.voice-band .qmark { display: none; }

.voice-band .voice p {
  padding-left: 0;
}

.voice-band .familiar {
  margin-top: 24px;
  padding-left: 0;
}

.device-band {
  position: relative;
  display: block;
  padding: 96px 72px calc(96px + var(--molly-clear, 72px));
  background: #F7F7F7;
  border-top: 1px solid #E8E8E8;
}

.device-intro {
  max-width: 640px;
  margin: 0 0 56px;
}

.device-intro .lead {
  margin-top: 20px;
}

.device-pair {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
}

.device {
  margin: 0;
  flex: 0 1 348px;
  width: 348px;
  max-width: 100%;
}

.device-band .phone {
  width: 100%;
}

.device-band .act,
.phone .act {
  background: var(--neon);
  color: var(--black);
}

.avatar.build,
.avatar.cfo,
.avatar.team {
  background: #111111;
  color: #ffffff;
}

.avatar.mkt {
  background: var(--neon);
  color: var(--black);
  min-height: 28px;
  padding: 0;
}

body.has-molly section.hero {
  padding-bottom: 0 !important;
}

@media (max-width: 1100px) {
  .hero-intro,
  .voice-band,
  .device-band {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 900px) {
  .device-pair {
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }
  .device {
    width: 100%;
    max-width: 348px;
    flex: none;
  }
}

@media (max-width: 720px) {
  nav.nav {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding: 12px 20px !important;
    grid-template-columns: none;
    grid-template-areas: none;
  }

  nav.nav .wordmark {
    font-size: 22px;
    margin-right: auto;
  }

  .nav-toggle { display: flex; }

  nav.nav .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    width: auto;
    padding: 12px 20px 28px;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid #E8E8E8;
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.08);
  }

  nav.nav.is-open .nav-links {
    display: flex;
  }

  nav.nav .nav-links a {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    padding: 14px 0;
    line-height: 1.2;
  }

  nav.nav .nav-cta {
    font-size: 13px;
    padding: 8px 14px;
  }

  /* Hero becomes three distinct blocks: intro, quote, phone */
  section.hero {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    align-items: stretch;
  }

  .hero-main {
    display: contents;
    max-width: none;
  }

  .hero-intro {
    display: block;
    box-sizing: border-box;
    padding: 40px 20px 72px;
    min-height: 0;
  }

  .hero-intro h1 {
    font-size: 40px;
    line-height: 1.04;
    letter-spacing: -0.05em;
  }

  .hero-intro .pitch {
    margin-top: 28px;
    font-size: 17px;
    line-height: 1.45;
    max-width: 28em;
  }

  .hero-intro .actions {
    margin-top: 36px;
    gap: 24px;
  }

  .voice-band {
    padding: 80px 20px;
  }

  .voice-band .familiar {
    margin-top: 24px;
  }

  .device-band {
    padding: 80px 20px calc(80px + var(--molly-clear, 72px));
  }

  .device-intro {
    margin-bottom: 40px;
  }

  .device-pair {
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }

  .device {
    width: 100%;
    max-width: 300px;
    flex: none;
  }

  /* Keep device chrome readable now that phones have their own section */
  .device-band .island { display: block !important; }
  .device-band .os-bar { display: flex !important; }
  .device-band .phone {
    width: 100%;
    max-width: 300px;
    border-radius: 44px;
    padding: 11px;
  }
  .device-band .phone-screen {
    border-radius: 34px;
    padding: 0 12px 16px;
    min-height: 0;
  }
  .device-band .spoken { font-size: 13px; min-height: 0; }
  .device-band .app-head { padding: 2px 6px 14px; }
  .device-band .app-head .app-name { font-size: 20px; }

  /* Consistent section rhythm across Home, Work, and Contact */
  section.band,
  section.page-hero,
  section.project-block,
  section.more-block,
  section.contact,
  section.contact-grid {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  section.band,
  section.project-block,
  section.more-block,
  section.contact,
  section.contact-grid {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
    border-top: 1px solid #E8E8E8;
  }

  section.page-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 56px !important;
    padding-bottom: 80px !important;
    min-height: calc(100vh - 68px);
    min-height: calc(100dvh - 68px);
    background: #ffffff !important;
  }

  section.page-hero h1 {
    font-size: 40px;
    line-height: 1.04;
  }

  section.page-hero .lead,
  section.page-hero p.lead {
    margin-top: 20px;
    font-size: 17px;
    line-height: 1.5;
  }

  section.band .lead,
  section.project-block .proj-sum,
  section.more-block .more-lead {
    margin-top: 20px;
  }

  .give-grid,
  .tiles,
  .projects,
  .steps,
  .course-slots,
  .more-grid,
  .proj-stage,
  .cta-actions,
  .contact-actions {
    margin-top: 40px;
  }

  section.project-block#the-hall {
    padding-top: 80px !important;
  }

  section.contact,
  section.contact-grid,
  section.more-block,
  footer.site-footer {
    padding-bottom: calc(80px + var(--molly-clear, 72px)) !important;
  }

  .contact-form {
    padding-bottom: var(--molly-clear, 72px);
  }

  .contact-form label[for="message"] {
    margin-top: 8px;
  }

  .contact-form {
    gap: 16px;
  }

  body.has-molly footer.site-footer {
    padding-bottom: calc(48px + var(--molly-clear, 72px)) !important;
  }
}

@media (max-width: 430px) {
  .hero-intro h1,
  section.page-hero h1 {
    font-size: 36px;
  }
}

@media (max-width: 375px) {
  .hero-intro h1,
  section.page-hero h1 {
    font-size: 34px;
  }
}

@media (min-width: 721px) {
  section.page-hero {
    padding-bottom: 72px;
  }
  section.project-block#the-hall {
    padding-top: 72px;
  }
}
